// Numbas version: exam_results_page_options {"name": "Solve for x where x is the base of a log term", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Solve for x where x is the base of a log term", "tags": [], "metadata": {"description": "

Given an equation where x is the base of a log term, 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:

\n

\\[ \\log_x \\var{a} = \\var{b} \\]

", "advice": "

Beginning with the given equation:

\n

\\[ \\log_{\\, x} \\var{a} = \\var{b}, \\]

\n

first 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\n
\\[ \\begin{align*} a^{\\log_a (m)} & = m\\\\ \\\\ \\text{e.g., } 3^{\\log_3 (7)} & = 7\\\\ \\\\ 6^{\\log_6 (y)} & = y \\end{align*} \\]
\n

\n

Therefore, to cancel out the $\\textbf{LOG}$ to base $x$ in the equation we are given, we must take both sides as a $\\textbf{POWER}$on the base $x$:

\n

\\[ \\begin{align*}\\log_{\\,x} (\\var{a}) & = \\var{b}\\\\ \\phantom{.}^{x^{(\\ \\ \\ )}} \\bigg\\downarrow  &  \\hspace{0.5cm}  \\bigg\\downarrow \\phantom{.}^{x^{(\\ \\ \\ )}} \\\\ x^{\\log_{x}(\\var{a})} & = x^{\\var{b}} \\end{align*}\\]

\n

and we can then use the rule of logs mentioned above to cancel the $\\log_{\\,x}$ with the base $x$ on the left-hand side:

\n

\\[ \\begin{align*}  x^{\\log_x (\\var{a})} & =x^\\var{b}\\\\ \\var{a} & = x^\\var{b}  \\end{align*} \\]

\n

Next, to cancel a power of $\\var{b}$ (the power on the $x$ on the right-hand side), we must take the $\\var{power} \\text{ ROOT}$ of both sides:

\n

\\[ \\sqrt[\\var{b}]{\\var{a}} = \\sqrt[\\var{b}]{x^\\var{b}} \\]

\n

The power of $\\var{b}$ and the $\\var{power} \\text{ ROOT}$ cancel on the right-hand side to give:

\n

\\[ \\begin{align*} \\sqrt[\\var{b}]{\\var{a}} & = x\\\\ \\phantom{.}^{\\text{Calculator work}} \\bigg\\downarrow  &  \\\\ \\var{x} & = x  \\end{align*} \\]

\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": {"x1": {"name": "x1", "group": "Ungrouped variables", "definition": "random(2..10)", "description": "

Possible value of the variable the student must solve for.

\n

In order to keep the numbers relatively small and manageable but still reduce the number of questions that could easily be solved by the student by sight (while still having some variety between questions), the range of values for x1 and x2 are chosen so that, on average, more numbers in the range {3,6,7,9} will be selected.

", "templateType": "anything", "can_override": false}, "RHS_1": {"name": "RHS_1", "group": "Ungrouped variables", "definition": "random(4..6)", "description": "

Possible right-hand side of equation the student must solve.

\n

In order to keep the numbers relatively small and manageable but still reduce the number of questions that could easily be solved by the student by sight (while still having some variety between questions), the range of values for RHS_1 and RHS_2 are chosen so that, on average, more numbers in the range 4 to 6 will be selected.

", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "{x1}^{RHS_1}", "description": "

Possible argument of the log function in the equation.

", "templateType": "anything", "can_override": false}, "x2": {"name": "x2", "group": "Ungrouped variables", "definition": "random(3,6,7,9)", "description": "

Possible value of the variable the student must solve for.

\n

In order to keep the numbers relatively small and manageable but still reduce the number of questions that could easily be solved by the student by sight (while still having some variety between questions), the range of values for x1 and x2 are chosen so that, on average, more numbers in the range {3,6,7,9} will be selected.

", "templateType": "anything", "can_override": false}, "RHS_2": {"name": "RHS_2", "group": "Ungrouped variables", "definition": "random(2..6)", "description": "

Possible right-hand side of equation the student must solve.

\n

In order to keep the numbers relatively small and manageable but still reduce the number of questions that could easily be solved by the student by sight (while still having some variety between questions), the range of values for RHS_1 and RHS_2 are chosen so that, on average, more numbers in the range 4 to 6 will be selected.

", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "{x2}^{RHS_2}", "description": "

Possible argument of the log function in the equation.

", "templateType": "anything", "can_override": false}, "x_vector": {"name": "x_vector", "group": "Ungrouped variables", "definition": "vector(x1,x2)", "description": "

Vector of two possible values for the solution of the equation. (Vector of integers.) Answer to be selected randomly from these two.

", "templateType": "anything", "can_override": false}, "a_vector": {"name": "a_vector", "group": "Ungrouped variables", "definition": "vector(a1,a2)", "description": "

Vector of two possible values for the argument of the log function. (Vector of integers.)

", "templateType": "anything", "can_override": false}, "b_vector": {"name": "b_vector", "group": "Ungrouped variables", "definition": "vector(RHS_1,RHS_2)", "description": "

Vector of two possible values for the right-hand side of the equation the student must solve. (Vector of integers.)

", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "

Determines the component of the variables a_vector, b_vector and x_vector that are used to calculate the values of the variables a, b and x.

", "templateType": "anything", "can_override": false}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "x_vector[n]", "description": "

Variable the student must solve for.

", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "a_vector[n]", "description": "

Argument of the log term in the equation the student must solve. (Integer.)

", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "b_vector[n]", "description": "

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

", "templateType": "anything", "can_override": false}, "power_vector": {"name": "power_vector", "group": "Ungrouped variables", "definition": "[\"SQUARE\",\"CUBE\",\"FOURTH\",\"FIFTH\",\"SIXTH\"]", "description": "

List of possible options for the (randomly generated) root that is required to eliminate the power on x in the worked solution.

", "templateType": "anything", "can_override": false}, "power": {"name": "power", "group": "Ungrouped variables", "definition": "power_vector[b-2]", "description": "

The (randomly generated) root that is required to eliminate the power on x in the worked solution.

", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "a1<5000 and a2<5000", "maxRuns": 100}, "ungrouped_variables": ["x1", "x2", "RHS_1", "RHS_2", "a1", "a2", "x_vector", "a_vector", "b_vector", "n", "x", "a", "b", "power_vector", "power"], "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": null, "prompt": "

See if you can start the question by yourself first. If you need a hint to get started, click on \"Hint 1 - how to start\" below.

\n

$x = $ [[0]]

\n

", "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(studentanswer,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": "{x}", "maxValue": "{x}", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": 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

\\[ \\log_{\\, x} \\var{a} = \\var{b}, \\]

\n

first 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\n
\\[ \\begin{align*} a^{\\log_a (m)} & = m\\\\ \\\\ \\text{e.g., } 3^{\\log_3 (7)} & = 7\\\\ \\\\ 6^{\\log_6 (y)} & = y \\end{align*} \\]
\n

\n

Therefore, to cancel out the $\\textbf{LOG}$ to base $x$ in the equation we are given, we must take both sides as a $\\textbf{POWER}$on the base $x$:

\n

\\[ \\begin{align*}\\log_{\\,x} (\\var{a}) & = \\var{b}\\\\ \\phantom{.}^{x^{(\\ \\ \\ )}} \\bigg\\downarrow  &  \\hspace{0.5cm}  \\bigg\\downarrow \\phantom{.}^{x^{(\\ \\ \\ )}} \\\\ x^{\\log_{x}(\\var{a})} & = x^{\\var{b}} \\end{align*}\\]

\n

Can you now use the rule of logs mentioned above to tidy up the left-hand side a bit?

\n

See if you can continue on with the question. To continue with the question 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 more help, click \"Hint 2 - a little more help\" below for a further hint.

\n

"}, {"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": "

Now that we have 

\n

\\[x^{\\log_x (\\var{a})} = x^{\\var{b}},\\]

\n

we can use the rule of logs mentioned earlier to cancel the $\\log_{\\,x}$ with the base $x$ on the left-hand side:

\n

\\[ \\begin{align*}  x^{\\log_x (\\var{a})} & = x^\\var{b}\\\\ \\Rightarrow \\var{a} & = x^\\var{b}  \\end{align*} \\]

\n

Now, can you work out how to get rid of the power of $\\var{b}$ (the power on the $x$ on the right-hand side)?

\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": "

The equation we have now is:

\n

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

\n

\n

To cancel a power of $\\var{b}$ (the power on the $x$ on the right-hand side), we must take the $\\var{power} \\text{ ROOT}$ of both sides:

\n

\\[ \\sqrt[\\var{b}]{\\var{a}} = \\sqrt[\\var{b}]{x^\\var{b}} \\]

\n

The power of $\\var{b}$ and the $\\var{power} \\text{ ROOT}$ cancel on the right-hand side to give:

\n

\\[ \\begin{align*} \\sqrt[\\var{b}]{\\var{a}} & = x\\\\ \\phantom{.}^{\\text{Calculator work}} \\bigg\\downarrow  &  \\\\ \\var{x} & = x  \\end{align*} \\]

\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/"}]}