// Numbas version: exam_results_page_options {"name": "Solve for x in an equation where x is a power on e", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Solve for x in an equation where x is a power on e", "tags": [], "metadata": {"description": "

Given an equation involving x as a power on e, the student must solve for x. Hints are included in the question to aid the student as needed.

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "

Solve for $x$ in the following equation, giving your answer to 3 decimal places:

\n

\\[  \\var{a}e^{\\var{b}x} = \\var{c}\\]

", "advice": "

Beginning with the given equation:

\n

\\[ \\var{a}e^{\\var{b}x} = \\var{c}, \\]

\n

\n

we first divide both sides by $\\var{a}$ - the number in front of the exponential term - so that the exponential term will then be on its own:

\n

\n

\n

\\[\\begin{align*} \\frac{\\var{a}e^{\\var{b}x}}{\\var{a}} & = \\frac{\\var{c}}{\\var{a}} \\hspace{2cm} \\{\\textbf{Divide both sides by } \\var{a} \\}\\\\ \\textbf{DIVISION by } \\var{a}  \\hspace{3cm} &\\\\ \\textbf{cancels } \\hspace{1.5cm} \\swarrow \\phantom{\\hspace{1.5cm}} & \\\\ \\textbf{MULTIPLICATION  by }  \\var{a} \\hspace{2.5cm} &\\\\ \\searrow \\hspace{1.65cm} &\\\\ e^{\\var{b}x} & = \\simplify{{c}/{a}}\\end{align*}\\]

\n

\n

Next, note the following rule of logs that allows us to cancel a base and a log to the same base:

\n\n\n\n\n\n\n
\\[ \\begin{align*} \\log_a (a^x) & = x\\\\ \\\\ \\text{e.g., } \\log_4 (4^{10}) & = 10\\\\ \\\\ \\ln (e^{2x}) &= \\log_e(e^{2x}) = 2x \\end{align*}  \\]
\n

\n

Therefore, we can take $\\ln$ (i.e., $\\log_e$) of both sides to get rid of the base $e$ on the left-hand side:

\n

\n

\\[\\begin{align*} \\log_e \\left( e^{\\var{b}x} \\right) & = \\log_e \\left( \\simplify{{c}/{a}}\\right) \\hspace{2cm} \\{\\textbf{Take } \\log_e \\textbf{ of both sides.} \\}\\\\ \\textbf{LOG} \\textbf{ to the base } e \\hspace{0.5cm} \\swarrow \\hspace{1.5cm}&\\\\ \\textbf{cancels the base } \\ e  \\phantom{\\hspace{2.5cm}}& \\\\ \\textbf{ INSIDE the brackets} \\hspace{2.2cm}\\\\ \\searrow \\hspace{1.65cm} \\\\ \\var{b}x & = \\log_e \\left( \\simplify{{c}/{a}}\\right)\\\\ \\\\ \\text{Next, we can divide both sides by } \\var{b} \\text{ to get } x \\text{ on its own:}\\\\ \\\\ \\frac{\\var{b}x}{\\var{b}} & = \\frac{\\log_e \\left( \\simplify{{c}/{a}}\\right)}{\\var{b}} \\hspace{2cm} \\{\\textbf{Divide both sides by } \\var{b} \\}\\\\ \\textbf{DIVISION} \\textbf{ by } \\var{b} \\hspace{3cm} & \\\\ \\textbf{cancels } \\hspace{1.5cm}  \\swarrow \\phantom{\\hspace{1.5cm}} & \\\\ \\textbf{MULTIPLICATION} \\textbf{ by } \\ \\var{b} \\hspace{2.5cm}&\\\\ \\searrow \\hspace{1.65cm}\\\\ x & = \\frac{\\log_e \\left( \\simplify{{c}/{a}}\\right)}{\\var{b}}\\\\ \\\\ & \\hspace{-1cm} \\phantom{.}^{\\text{Calculator work}} \\bigg\\downarrow\\\\ \\\\ x & = \\var{x}\\\\ \\\\ x & = \\var{ans} \\hspace{2cm} \\{\\textbf{Round to }  3 \\textbf{ decimal places} \\}  \\end{align*}\\]

\n

\n

$\\textbf{Want some more practice? Click the \"Try another question like this one\" button at the end of the question.}$

", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2..9)", "description": "

Multiple of e.

", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "random(-9 .. 9#0.1)", "description": "

Used to generate the power on the exponential. The power will be equal to b1 unless b1=0, in which case the power will be b1+0.1 (given by variable b below).

", "templateType": "randrange", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(2..10 except a except 2a except 3a except 4a except 5a)", "description": "

Right-hand side of the equation the student must solve (integer).

", "templateType": "anything", "can_override": false}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "1/b*ln(c/a)", "description": "

Variable the student must solve for.

", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "precround(x,3)", "description": "

Answer rounded to 3 decimal places.

", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "if(b1=0,b1+0.1,b1)", "description": "

Power on the exponential.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "gcd(a,c)=1", "maxRuns": 100}, "ungrouped_variables": ["a", "b1", "c", "x", "ans", "b"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": true, "customName": "Solve for $x$", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Hint 1 - how to start", "rawLabel": "", "otherPart": 1, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "Hint 2 - a little more help", "rawLabel": "", "otherPart": 2, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "Hint 3 - finishing the question", "rawLabel": "", "otherPart": 3, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Solve for $x$", "prompt": "

$x = $ [[0]]

", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "2", "scripts": {}, "customMarkingAlgorithm": "studentNumber (The student's answer, parsed as a number):\n if(settings[\"allowFractions\"],\n parsedecimal_or_fraction(studentAnswer,settings[\"notationStyles\"])\n ,\n parsedecimal(studentAnswer,settings[\"notationStyles\"])\n )\n\nisInteger (Is the student's answer an integer?):\n countDP(studentAnswer)=0\n\nisFraction (Is the student's answer a fraction?):\n \"/\" in studentAnswer\n\nnumerator (The numerator of the student's answer, or 0 if not a fraction):\n if(isFraction,\n parseNumber(split(studentAnswer,\"/\")[0],settings[\"notationStyles\"])\n ,\n 0\n )\n\ndenominator (The numerator of the student's answer, or 0 if not a fraction):\n if(isFraction,\n parseNumber(split(studentAnswer,\"/\")[1],settings[\"notationStyles\"])\n ,\n 0\n )\n\ncancelled (Is the student's answer a cancelled fraction?):\n assert(isFraction and gcd(numerator,denominator)=1,\n assert(not settings[\"mustBeReduced\"],\n multiply_credit(settings[\"mustBeReducedPC\"],translate(\"part.numberentry.answer not reduced\"))\n );\n false\n )\n\ncleanedStudentAnswer:\n cleannumber(studentAnswer, settings[\"notationStyles\"])\n\nstudentPrecision:\n switch(\n settings[\"precisionType\"]=\"dp\", max(settings[\"precision\"],countDP(cleanedStudentAnswer)),\n settings[\"precisionType\"]=\"sigfig\", max(settings[\"precision\"],countsigfigs(cleanedStudentAnswer)),\n 0\n )\n\nraw_minvalue:\n switch(\n settings[\"precisionType\"]=\"dp\", precround(settings[\"minvalue\"],studentPrecision),\n settings[\"precisionType\"]=\"sigfig\", siground(settings[\"minvalue\"],studentPrecision),\n settings[\"minvalue\"]\n )\n\nraw_maxvalue:\n switch(\n settings[\"precisionType\"]=\"dp\", precround(settings[\"maxvalue\"],studentPrecision),\n settings[\"precisionType\"]=\"sigfig\", siground(settings[\"maxvalue\"],studentPrecision),\n settings[\"maxvalue\"]\n )\n\nminvalue: min(raw_minvalue,raw_maxvalue)\n\nmaxvalue: max(raw_minvalue,raw_maxvalue)\n\nvalidNumber (Is the student's answer a valid number?):\n if(isNaN(studentNumber),\n warn(translate(\"part.numberentry.answer invalid\"));\n fail(translate(\"part.numberentry.answer invalid\"))\n ,\n true\n )\n\nnumberInRange (Is the student's number in the allowed range?):\n if(studentNumber>=minvalue and studentNumber<=maxvalue,\n correct(\"Well done! For some more practice, click on the $``$Try another question like this one$\\\"$ button at the end of the question.\")\n ,\n incorrect(\"Not there yet. Have you looked at the hints provided below?\");\n end()\n )\n\ncorrectPrecision (Has the student's answer been given to the desired precision?): \n if(togivenprecision(cleanedStudentAnswer,settings['precisionType'],settings['precision'],settings[\"strictPrecision\"]),\n true\n ,\n multiply_credit(settings[\"precisionPC\"],settings[\"precisionMessage\"]);\n false\n )\n\nmark (Mark the student's answer):\n apply(validNumber);\n apply(numberInRange);\n assert(numberInRange,end());\n if(isFraction,\n apply(cancelled)\n ,\n apply(correctPrecision)\n )\n \ninterpreted_answer (The student's answer, to be reused by other parts):\n apply(validNumber);\n studentNumber\n", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Solve for $x$", "minValue": "ans", "maxValue": "ans", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "precisionType": "dp", "precision": "3", "precisionPartialCredit": 0, "precisionMessage": "You have not given your answer to the correct precision.", "strictPrecision": false, "showPrecisionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"type": "information", "useCustomName": true, "customName": "Hint 1 - how to start", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Hint 2 - a little more help", "rawLabel": "", "otherPart": 2, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "Hint 3 - finishing the question", "rawLabel": "", "otherPart": 3, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Beginning with the given equation:

\n

\\[ \\var{a}e^{\\var{b}x} = \\var{c}, \\]

\n

\n

we first divide both sides by $\\var{a}$ - the number in front of the exponential term - so that the exponential term will then be on its own:

\n

\n

\n

\\[\\begin{align*} \\frac{\\var{a}e^{\\var{b}x}}{\\var{a}} & = \\frac{\\var{c}}{\\var{a}} \\hspace{2cm} \\{\\textbf{Divide both sides by } \\var{a} \\}\\\\ \\textbf{DIVISION by } \\var{a}  \\hspace{3cm} &\\\\ \\textbf{cancels } \\hspace{1.5cm} \\swarrow \\phantom{\\hspace{1.5cm}} & \\\\ \\textbf{MULTIPLICATION  by }  \\var{a} \\hspace{2.5cm} &\\\\ \\searrow \\hspace{1.65cm} &\\\\ e^{\\var{b}x} & = \\simplify{{c}/{a}}\\end{align*}\\]

\n

\n

Can you now think of a rule of logs that might help you to simplify the left-hand side and continue on with the question?

\n

To continue the question by yourself, click \"Go back to the previous part\" below or click \"Solve for $x$\" in the question progress bar at the top of the question. Otherwise, if you need some more help, click \"Hint 2 - a little more help\" below for a further hint.

"}, {"type": "information", "useCustomName": true, "customName": "Hint 2 - a little more help", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Hint 1 - how to start", "rawLabel": "", "otherPart": 1, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}, {"label": "Hint 3 - finishing the question", "rawLabel": "", "otherPart": 3, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "showPenaltyHint": true, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Our equation is now a little simpler than before. Since we now have

\n

\\[e^{\\var{b}x} = \\simplify{{c}/{a}}, \\]

\n

we can simplify the left-hand side by using the following rule of logs that allows us to cancel a base and a log to the same base:

\n\n\n\n\n\n\n
\\[ \\begin{align*} \\log_a (a^x) & = x\\\\ \\\\ \\text{e.g., } \\log_4 (4^{10}) & = 10\\\\ \\\\ \\ln (e^{2x}) &= \\log_e(e^{2x}) = 2x \\end{align*}  \\]
\n

\n

Therefore, we can take $\\ln$ (i.e., $\\log_e$) of both sides to get rid of the base $e$ on the left-hand side:

\n

\n

\\[\\begin{align*} \\log_e \\left( e^{\\var{b}x} \\right) & = \\log_e \\left( \\simplify{{c}/{a}}\\right) \\hspace{2cm} \\{\\textbf{Take } \\log_e \\textbf{ of both sides.} \\}\\\\ \\textbf{LOG} \\textbf{ to the base } e \\hspace{0.5cm} \\swarrow \\hspace{1.5cm}&\\\\ \\textbf{cancels the base } \\ e  \\phantom{\\hspace{2.5cm}}& \\\\ \\textbf{ INSIDE the brackets} \\hspace{2.2cm}\\\\ \\searrow \\hspace{1.65cm} \\\\ \\var{b}x & = \\log_e \\left( \\simplify{{c}/{a}}\\right) \\end{align*}\\]

\n

\n

Can you now find the value of $x$?

\n

To continue with the question yourself, click \"Solve for $x$\" in the question progress bar at the top of the question. Otherwise, if you need more help, click \"Hint 3 - finishing the question\" below for help with the final steps.

"}, {"type": "information", "useCustomName": true, "customName": "Hint 3 - finishing the question", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "

Now our equation is

\n

\n

\\[ \\var{b}x = \\log_e \\left( \\simplify{{c}/{a}}\\right)\\]

\n

\n

To get $x$ on its own, we must get rid of the $\\var{b}$ that is being $\\textbf{MULTIPLIED}$ by $x$. We therefore $\\textbf{DIVIDE BOTH SIDES}$ by $\\var{b}$:

\n

\n

\\[\\begin{align*}  \\frac{\\var{b}x}{\\var{b}} & = \\frac{\\log_e \\left( \\simplify{{c}/{a}}\\right)}{\\var{b}} \\hspace{2cm} \\{\\textbf{Divide both sides by } \\var{b} \\}\\\\ \\textbf{DIVISION by } \\var{b} \\hspace{3cm} & \\\\ \\textbf{cancels } \\hspace{1.5cm}  \\swarrow \\phantom{\\hspace{1.5cm}} & \\\\ \\textbf{MULTIPLICATION by } \\ \\var{b} \\hspace{2.5cm}&\\\\ \\searrow \\hspace{1.65cm}\\\\ x & = \\frac{\\log_e \\left( \\simplify{{c}/{a}}\\right)}{\\var{b}}\\\\ \\\\ & \\hspace{-1cm}\\phantom{.}^{\\text{Calculator work}} \\bigg\\downarrow\\\\ \\\\ x & = \\var{x}\\\\ \\\\ x & = \\var{ans} \\hspace{2cm} \\{\\textbf{Round to } 3 \\textbf{ decimal places} \\}  \\end{align*}\\]

\n

\n

$\\textbf{Want some more practice? Click the \"Try another question like this one\" button at the end of the question.}$

"}], "partsMode": "explore", "maxMarks": "2", "objectives": [{"name": "Solve for $x$", "limit": "2"}], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}]}]}], "contributors": [{"name": "Clodagh Carroll", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/384/"}]}