{"group":{"id":1,"name":"Community","lockable":false,"created_at":"2012-01-18T18:02:15.000Z","updated_at":"2026-04-06T14:01:22.000Z","description":"Problems submitted by members of the MATLAB Central community.","is_default":true,"created_by":161519,"badge_id":null,"featured":false,"trending":false,"solution_count_in_trending_period":0,"trending_last_calculated":"2026-04-06T00:00:00.000Z","image_id":null,"published":true,"community_created":false,"status_id":2,"is_default_group_for_player":false,"deleted_by":null,"deleted_at":null,"restored_by":null,"restored_at":null,"description_opc":null,"description_html":null,"published_at":null},"problems":[{"id":56623,"title":"Acid-Base Chemistry: Which side of the reaction is more favorable?","description":"In an Acid-Base reaction, there is always going to be an acid, a base, a conjugate acid, and a conjugate base. When provided with the pKa values for the acid and the conjugate acid, it is possible to determine which side will exist in a greater concentration, i.e. is more favorable.\r\nTo determine which side is more favorable, use the equation:\r\n\r\nIf the products are favored, then K \u003e 1. If the reactants are favored, the K \u003c 1. If neither side is favored, the K = 1.\r\nWrite a function that recieves the pKa values of the acid and conjugate acid, respectively, as an array and outputs which side of the reaction is more favorable. If the reactants are favored, the function should yield \"reactants\", and vise versa. If the pKa for both the acid and the conjugate acid are equal, the the function should output \"neither side is favored\"","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 229px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 114.5px; transform-origin: 407px 114.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eIn an Acid-Base reaction, there is always going to be an acid, a base, a conjugate acid, and a conjugate base. When provided with the pKa values for the acid and the conjugate acid, it is possible to determine which side will exist in a greater concentration, i.e. is more favorable.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eTo determine which side is more favorable, use the equation:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 25px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 12.5px; text-align: left; transform-origin: 384px 12.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSU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ATeFUNTT2tDlurWiDfAzPE6LLafrwFx3nlCHhpee912nKy7uynnrDvix2Ps/cX0yrcB37jlIuZL0ZT8y0rNbAJvJQ/1AkAfcq7r5z2UKd97oNkP6YhGgWvOmpG2zdtE+lLJarK/pj6O9syNXByGtgEXlWTo1M4G38aqaTfPuO7bWdljyrmlLKN+tQT8dK7tvwspfbZ1ZE1+9LVqE7ndVMDV1ID68CrNuhWp5f72OoPOtSE3BcJfUrZRrpxhIvNo0Rdil0GS+mzkvjCmVW7klNpduqiNbAOvGrzZLUHSC03iNbetbpm2x8rGOnbsWQblVrUX07ZtLdRoapUfx3otuo4F/Vdtel62wkVIzqa10wNTA1s+OtB9YceKGndH2hQHGhLSJ195egXZQ5XgYDts4P9oXmrjKY26fptueFY7Re+kI7oxz7QVXv0pjFODUwN7KiBVZ7XMsuomt7xFMvzzXkZNk9W3ZdXO0EAyX/Zx3jsqIYbLu9DQT8I9RyQ1pdFLJ9fG4R9X4fs0Y8jVHhb9nsB9r6y/DxtnPdODVx7DSzBq99ovFROf/xH7VFbp8B9cWAXOUBOz1DSUDze8t08KCDmeNpVYk+dc7DqbC/bhYhiXjVyfUHrRfZrvmtq4EpqYFuF/ZXs9AE7ZQ+YM6mcKspjBXh1HMwBXzsfPTVw/TQwwev6jfns8dTAldDABK8rMYyzE1MD108DE7yu35jPHk8NXAkNTPC6EsM4OzE1cP00MMHr+o357PHUwJXQwASvKzGMsxNTA9dPAxO8rt+Yzx5PDVwJDfwvhSYabWkUZwYAAAAASUVORK5CYII=\" width=\"151.5\" height=\"24\" style=\"width: 151.5px; height: 24px;\"\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eIf the products are favored, then K \u0026gt; 1. If the reactants are favored, the K \u0026lt; 1. If neither side is favored, the K = 1.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eWrite a function that recieves the pKa values of the acid and conjugate acid, respectively, as an array and outputs which side of the reaction is more favorable. If the reactants are favored, the function should yield \"reactants\", and vise versa. If the pKa for both the acid and the conjugate acid are equal, the the function should output \"neither side is favored\"\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function favorable = Acid_Base_rxn(pKa_data)\r\n  favorable = pKa_data;\r\nend","test_suite":"%%\r\npKa_data = [-2.1,6.6];\r\n\r\nfavorable = 'products';\r\nassert(isequal(Acid_Base_rxn(pKa_data),favorable))\r\n%%\r\npKa_data = [1.0,14.4];\r\n\r\nfavorable = 'products';\r\nassert(isequal(Acid_Base_rxn(pKa_data),favorable))\r\n%%\r\npKa_data = [12.1,4.9];\r\n\r\nfavorable = 'reactants';\r\nassert(isequal(Acid_Base_rxn(pKa_data),favorable))\r\n%%\r\npKa_data = [8.3,8.3];\r\n\r\nfavorable = 'neither side is favored';\r\nassert(isequal(Acid_Base_rxn(pKa_data),favorable))\r\n\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":2620300,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":15,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2022-11-20T02:41:38.000Z","updated_at":"2026-04-02T09:29:21.000Z","published_at":"2022-11-20T02:41:38.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIn an Acid-Base reaction, there is always going to be an acid, a base, a conjugate acid, and a conjugate base. When provided with the pKa values for the acid and the conjugate acid, it is possible to determine which side will exist in a greater concentration, i.e. is more favorable.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTo determine which side is more favorable, use the equation:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"true\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eK=10^{pKa_{conj.\\\\; acid} - pKa_{acid}}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf the products are favored, then K \u0026gt; 1. If the reactants are favored, the K \u0026lt; 1. If neither side is favored, the K = 1.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function that recieves the pKa values of the acid and conjugate acid, respectively, as an array and outputs which side of the reaction is more favorable. If the reactants are favored, the function should yield \\\"reactants\\\", and vise versa. If the pKa for both the acid and the conjugate acid are equal, the the function should output \\\"neither side is favored\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"}],"problem_search":{"errors":[],"problems":[{"id":56623,"title":"Acid-Base Chemistry: Which side of the reaction is more favorable?","description":"In an Acid-Base reaction, there is always going to be an acid, a base, a conjugate acid, and a conjugate base. When provided with the pKa values for the acid and the conjugate acid, it is possible to determine which side will exist in a greater concentration, i.e. is more favorable.\r\nTo determine which side is more favorable, use the equation:\r\n\r\nIf the products are favored, then K \u003e 1. If the reactants are favored, the K \u003c 1. If neither side is favored, the K = 1.\r\nWrite a function that recieves the pKa values of the acid and conjugate acid, respectively, as an array and outputs which side of the reaction is more favorable. If the reactants are favored, the function should yield \"reactants\", and vise versa. If the pKa for both the acid and the conjugate acid are equal, the the function should output \"neither side is favored\"","description_html":"\u003cdiv style = \"text-align: start; line-height: 20.44px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, monospace; font-style: normal; font-size: 14px; font-weight: 400; text-decoration: none solid rgb(0, 0, 0); white-space: normal; \"\u003e\u003cdiv style=\"block-size: 229px; display: block; min-width: 0px; padding-block-start: 0px; padding-top: 0px; perspective-origin: 407px 114.5px; transform-origin: 407px 114.5px; vertical-align: baseline; \"\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eIn an Acid-Base reaction, there is always going to be an acid, a base, a conjugate acid, and a conjugate base. When provided with the pKa values for the acid and the conjugate acid, it is possible to determine which side will exist in a greater concentration, i.e. is more favorable.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eTo determine which side is more favorable, use the equation:\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 25px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 12.5px; text-align: left; transform-origin: 384px 12.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"vertical-align:-5px\"\u003e\u003cimg src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAS8AAAAwCAYAAABAKfwiAAAAAXNSR0IArs4c6QAAEg1JREFUeF7t3QW09U1VBvAHGztQMcHADsBuBLETLAxK7O4uEERZYDd2oNiBQYiCGGCC3d3dreuns7817/87Mefec+49597Za33re885/5jZs+eZvZ+9Z+4tMmVqYGpgauAENXCLE2zzbPLUwNTA1EAmeE0jmBqYGjhJDUzwOslhm42eGpgamOA1bWBqYGrgJDUwweskh202empgamCC1+nZwBsmecZFs/8iyVOTvHaSZ+t++5skP3t6XZwt3lEDL5Lk5Vbc8+Qkt0zyyovf2ATbOGmZ4HV6w/dWST4iyZ1b0x+Z5POS/HiSuyT5ziTP0UDrY5M89vS6OFu8owZeLMndknxuu+8fknx8kq9r4PWpST6g/Xb/JF+Q5C93fMfRXT7B6+iGZKhBH5XkIUl+va2q/97uune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7XMsuomt7xFMvzzXkZNk9W3ZdXO0EAyX/Zx3jsqIYbLu9DQT8I9RyQ1pdFLJ9fG4R9X4fs0Y8jVHhb9nsB9r6y/DxtnPdODVx7DSzBq99ovFROf/xH7VFbp8B9cWAXOUBOz1DSUDze8t08KCDmeNpVYk+dc7DqbC/bhYhiXjVyfUHrRfZrvmtq4EpqYFuF/ZXs9AE7ZQ+YM6mcKspjBXh1HMwBXzsfPTVw/TQwwev6jfns8dTAldDABK8rMYyzE1MD108DE7yu35jPHk8NXAkNTPC6EsM4OzE1cP00MMHr+o357PHUwJXQwASvKzGMsxNTA9dPAxO8rt+Yzx5PDVwJDfwvhSYabWkUZwYAAAAASUVORK5CYII=\" width=\"151.5\" height=\"24\" style=\"width: 151.5px; height: 24px;\"\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 21px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 10.5px; text-align: left; transform-origin: 384px 10.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eIf the products are favored, then K \u0026gt; 1. If the reactants are favored, the K \u0026lt; 1. If neither side is favored, the K = 1.\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003cdiv style=\"block-size: 63px; font-family: Helvetica, Arial, sans-serif; line-height: 21px; margin-block-end: 9px; margin-block-start: 2px; margin-bottom: 9px; margin-inline-end: 10px; margin-inline-start: 4px; margin-left: 4px; margin-right: 10px; margin-top: 2px; perspective-origin: 384px 31.5px; text-align: left; transform-origin: 384px 31.5px; white-space: pre-wrap; margin-left: 4px; margin-top: 2px; margin-bottom: 9px; margin-right: 10px; \"\u003e\u003cspan style=\"block-size: auto; display: inline; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; perspective-origin: 0px 0px; transform-origin: 0px 0px; \"\u003e\u003cspan style=\"\"\u003eWrite a function that recieves the pKa values of the acid and conjugate acid, respectively, as an array and outputs which side of the reaction is more favorable. If the reactants are favored, the function should yield \"reactants\", and vise versa. If the pKa for both the acid and the conjugate acid are equal, the the function should output \"neither side is favored\"\u003c/span\u003e\u003c/span\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e","function_template":"function favorable = Acid_Base_rxn(pKa_data)\r\n  favorable = pKa_data;\r\nend","test_suite":"%%\r\npKa_data = [-2.1,6.6];\r\n\r\nfavorable = 'products';\r\nassert(isequal(Acid_Base_rxn(pKa_data),favorable))\r\n%%\r\npKa_data = [1.0,14.4];\r\n\r\nfavorable = 'products';\r\nassert(isequal(Acid_Base_rxn(pKa_data),favorable))\r\n%%\r\npKa_data = [12.1,4.9];\r\n\r\nfavorable = 'reactants';\r\nassert(isequal(Acid_Base_rxn(pKa_data),favorable))\r\n%%\r\npKa_data = [8.3,8.3];\r\n\r\nfavorable = 'neither side is favored';\r\nassert(isequal(Acid_Base_rxn(pKa_data),favorable))\r\n\r\n","published":true,"deleted":false,"likes_count":2,"comments_count":0,"created_by":2620300,"edited_by":null,"edited_at":null,"deleted_by":null,"deleted_at":null,"solvers_count":15,"test_suite_updated_at":null,"rescore_all_solutions":false,"group_id":1,"created_at":"2022-11-20T02:41:38.000Z","updated_at":"2026-04-02T09:29:21.000Z","published_at":"2022-11-20T02:41:38.000Z","restored_at":null,"restored_by":null,"spam":null,"simulink":false,"admin_reviewed":false,"description_opc":"{\"parts\":[{\"partUri\":\"/matlab/document.xml\",\"contentType\":\"application/vnd.mathworks.matlab.code.document+xml\",\"content\":\"\u003c?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?\u003e\u003cw:document xmlns:w=\\\"http://schemas.openxmlformats.org/wordprocessingml/2006/main\\\"\u003e\u003cw:body\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIn an Acid-Base reaction, there is always going to be an acid, a base, a conjugate acid, and a conjugate base. When provided with the pKa values for the acid and the conjugate acid, it is possible to determine which side will exist in a greater concentration, i.e. is more favorable.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eTo determine which side is more favorable, use the equation:\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:customXml w:element=\\\"equation\\\"\u003e\u003cw:customXmlPr\u003e\u003cw:attr w:name=\\\"displayStyle\\\" w:val=\\\"true\\\"/\u003e\u003c/w:customXmlPr\u003e\u003cw:r\u003e\u003cw:t\u003eK=10^{pKa_{conj.\\\\; acid} - pKa_{acid}}\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:customXml\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eIf the products are favored, then K \u0026gt; 1. If the reactants are favored, the K \u0026lt; 1. If neither side is favored, the K = 1.\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003cw:p\u003e\u003cw:pPr\u003e\u003cw:pStyle w:val=\\\"text\\\"/\u003e\u003cw:jc w:val=\\\"left\\\"/\u003e\u003c/w:pPr\u003e\u003cw:r\u003e\u003cw:t\u003eWrite a function that recieves the pKa values of the acid and conjugate acid, respectively, as an array and outputs which side of the reaction is more favorable. If the reactants are favored, the function should yield \\\"reactants\\\", and vise versa. If the pKa for both the acid and the conjugate acid are equal, the the function should output \\\"neither side is favored\\\"\u003c/w:t\u003e\u003c/w:r\u003e\u003c/w:p\u003e\u003c/w:body\u003e\u003c/w:document\u003e\",\"relationship\":null}],\"relationships\":[{\"relationshipType\":\"http://schemas.mathworks.com/matlab/code/2013/relationships/document\",\"target\":\"/matlab/document.xml\",\"relationshipId\":\"rId1\"}]}"}],"term":"tag:\"reactions\"","current_player_id":null,"fields":[{"name":"page","type":"integer","callback":null,"default":1,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"per_page","type":"integer","callback":null,"default":50,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"sort","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":null,"prepend":true},{"name":"body","type":"text","callback":null,"default":"*:*","directive":null,"facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":false},{"name":"group","type":"string","callback":null,"default":null,"directive":"group","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"difficulty_rating_bin","type":"string","callback":null,"default":null,"directive":"difficulty_rating_bin","facet":true,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"id","type":"integer","callback":null,"default":null,"directive":"id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"tag","type":"string","callback":null,"default":null,"directive":"tag","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"product","type":"string","callback":null,"default":null,"directive":"product","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_at","type":"timeframe","callback":{},"default":null,"directive":"created_at","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"profile_id","type":"integer","callback":null,"default":null,"directive":"author_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"created_by","type":"string","callback":null,"default":null,"directive":"author","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player_id","type":"integer","callback":null,"default":null,"directive":"solver_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"player","type":"string","callback":null,"default":null,"directive":"solver","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"solvers_count","type":"integer","callback":null,"default":null,"directive":"solvers_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"comments_count","type":"integer","callback":null,"default":null,"directive":"comments_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"likes_count","type":"integer","callback":null,"default":null,"directive":"likes_count","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leader_id","type":"integer","callback":null,"default":null,"directive":"leader_id","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true},{"name":"leading_solution","type":"integer","callback":null,"default":null,"directive":"leading_solution","facet":null,"facet_method":"and","operator":null,"param":"term","static":null,"prepend":true}],"filters":[{"name":"asset_type","type":"string","callback":null,"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":null,"static":"\"cody:problem\"","prepend":true},{"name":"profile_id","type":"integer","callback":{},"default":null,"directive":null,"facet":null,"facet_method":"and","operator":null,"param":"author_id","static":null,"prepend":true}],"query":{"params":{"per_page":50,"term":"tag:\"reactions\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"reactions\"","","\"","reactions","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f17b14a3218\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f17b14a3178\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f17b14a28b8\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f17b14a3498\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f17b14a33f8\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f17b14a3358\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f17b14a32b8\u003e":"tag:\"reactions\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f17b14a32b8\u003e":"tag:\"reactions\""},"queried_facets":{}},"query_backend":{"connection":{"configuration":{"index_url":"http://index-op-v2/solr/","query_url":"http://search-op-v2/solr/","direct_access_index_urls":["http://index-op-v2/solr/"],"direct_access_query_urls":["http://search-op-v2/solr/"],"timeout":10,"vhost":"search","exchange":"search.topic","heartbeat":30,"pre_index_mode":false,"host":"rabbitmq-eks","port":5672,"username":"cody-search","password":"78X075ddcV44","virtual_host":"search","indexer":"amqp","http_logging":"true","core":"cody"},"query_connection":{"uri":"http://search-op-v2/solr/cody/","proxy":null,"connection":{"parallel_manager":null,"headers":{"User-Agent":"Faraday v1.0.1"},"params":{},"options":{"params_encoder":"Faraday::FlatParamsEncoder","proxy":null,"bind":null,"timeout":null,"open_timeout":null,"read_timeout":null,"write_timeout":null,"boundary":null,"oauth":null,"context":null,"on_data":null},"ssl":{"verify":true,"ca_file":null,"ca_path":null,"verify_mode":null,"cert_store":null,"client_cert":null,"client_key":null,"certificate":null,"private_key":null,"verify_depth":null,"version":null,"min_version":null,"max_version":null},"default_parallel_manager":null,"builder":{"adapter":{"name":"Faraday::Adapter::NetHttp","args":[],"block":null},"handlers":[{"name":"Faraday::Response::RaiseError","args":[],"block":null}],"app":{"app":{"ssl_cert_store":{"verify_callback":null,"error":null,"error_string":null,"chain":null,"time":null},"app":{},"connection_options":{},"config_block":null}}},"url_prefix":"http://search-op-v2/solr/cody/","manual_proxy":false,"proxy":null},"update_format":"RSolr::JSON::Generator","update_path":"update","options":{"url":"http://search-op-v2/solr/cody"}}},"query":{"params":{"per_page":50,"term":"tag:\"reactions\"","current_player":null,"sort":"map(difficulty_value,0,0,999) asc"},"parser":"MathWorks::Search::Solr::QueryParser","directives":{"term":{"directives":{"tag":[["tag:\"reactions\"","","\"","reactions","\""]]}}},"facets":{"#\u003cMathWorks::Search::Field:0x00007f17b14a3218\u003e":null,"#\u003cMathWorks::Search::Field:0x00007f17b14a3178\u003e":null},"filters":{"#\u003cMathWorks::Search::Field:0x00007f17b14a28b8\u003e":"\"cody:problem\""},"fields":{"#\u003cMathWorks::Search::Field:0x00007f17b14a3498\u003e":1,"#\u003cMathWorks::Search::Field:0x00007f17b14a33f8\u003e":50,"#\u003cMathWorks::Search::Field:0x00007f17b14a3358\u003e":"map(difficulty_value,0,0,999) asc","#\u003cMathWorks::Search::Field:0x00007f17b14a32b8\u003e":"tag:\"reactions\""},"user_query":{"#\u003cMathWorks::Search::Field:0x00007f17b14a32b8\u003e":"tag:\"reactions\""},"queried_facets":{}},"options":{"fields":["id","difficulty_rating"]},"join":" "},"results":[{"id":56623,"difficulty_rating":"easy"}]}}