// Numbas version: exam_results_page_options {"name": "Simon's copy of Logarithms: Solving equations 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "name": "Simon's copy of Logarithms: Solving equations 1", "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "functions": {}, "extensions": [], "preamble": {"css": "", "js": ""}, "advice": "

We use the following two rules for logs :

\n

1. $\\log_a(\\frac{x}{y})=\\log_a(x)-\\log_a(y)$

\n

2. $a^x=y \\iff \\log_a y=x$

\n

Using rule 1 we get
\\[\\log_{\\var{a}}(x+\\var{b})- \\log_{\\var{a}}(\\simplify{(x+{c})})=\\log_{\\var{a}}\\left(\\simplify{(x+{b})/(x+{c})}\\right)\\]
So the equation to solve becomes:
\\[\\log_{\\var{a}}\\left(\\simplify{(x+{b})/(x+{c})}\\right)=\\var{d}\\]
and using rule 2 this gives:
\\[ \\begin{eqnarray} \\simplify{(x+{b})/(x+{c})}&=&{\\var{a}}^{\\var{d}}\\\\\\Rightarrow x+\\var{b}&=&{\\var{a}}^{\\var{d}}(\\simplify{x+{c}})=\\simplify{{a^d}}(\\simplify{x+{c}})\\\\\\Rightarrow x+\\var{b}&=&\\simplify{{a}^{d}*x+{a}^{d}*{c}}\\\\\\Rightarrow \\simplify{{a^d-1}x}&=&\\simplify[std]{{b}-{c}*{a^d}={b-c*a^d}}\\\\\\Rightarrow x&=&\\simplify{{b-c*a^d}/{a^d-1}} \\end{eqnarray} \\]

\n

NOTE: We should check that this solution gives positive values for $x+\\var{b}$ and $\\simplify{x+{c}}$ as otherwise the logs in our original question are not defined.

\n

Substituting this value for $x$ into $\\log_{\\var{a}}(\\simplify{x+{b}})$ we get $\\log_{\\var{a}}(\\simplify{({b-c }{a^d})/{a^d-1}})$.

\n

Substituting this value for $x$ into $\\log_{\\var{a}}(\\simplify{x+{c}})$ we get $\\log_{\\var{a}}(\\simplify{({b-c })/{a^d-1}})$.

\n

Since these are both logs of positive numbers (and hence well-defined) this means that the value we found for $x$ is indeed a solution to the original equation.

", "variables": {"d": {"group": "Ungrouped variables", "name": "d", "description": "", "templateType": "anything", "definition": "random(1,2)"}, "b": {"group": "Ungrouped variables", "name": "b", "description": "", "templateType": "anything", "definition": "random(1..20)"}, "c": {"group": "Ungrouped variables", "name": "c", "description": "", "templateType": "anything", "definition": "b-random(1..20)"}, "a": {"group": "Ungrouped variables", "name": "a", "description": "", "templateType": "anything", "definition": "random(2..5)"}}, "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "statement": "\n

Solve the following equation for $x$.

\n

Input your answer as a fraction or an integer as appropriate and not as a decimal.

\n ", "parts": [{"sortAnswers": false, "scripts": {}, "gaps": [{"answer": "{b-c*a^d}/{a^d-1}", "vsetRangePoints": 5, "scripts": {}, "checkingType": "absdiff", "showPreview": true, "customMarkingAlgorithm": "", "answerSimplification": "std", "notallowed": {"showStrings": false, "strings": ["."], "partialCredit": 0, "message": "

Input as a fraction or an integer, not as a decimal.

"}, "unitTests": [], "showCorrectAnswer": true, "expectedVariableNames": [], "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "type": "jme", "checkVariableNames": false, "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 2, "checkingAccuracy": 0.0001, "failureRate": 1}], "stepsPenalty": 1, "customMarkingAlgorithm": "", "steps": [{"prompt": "

Two rules for logs should be used:

\n

1. $\\log_a(\\frac{x}{y})=\\log_a(x)-\\log_a(y)$

\n

2. $a^x=y \\iff \\log_a y=x$

\n

Use rule 1 followed by rule 2 to get an equation for $x$.

", "extendBaseMarkingAlgorithm": true, "scripts": {}, "showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "customMarkingAlgorithm": "", "type": "information", "variableReplacements": [], "marks": 0, "unitTests": [], "showCorrectAnswer": true}], "unitTests": [], "showCorrectAnswer": true, "prompt": "\n

\\[\\log_{\\var{a}}(x+\\var{b})- \\log_{\\var{a}}(\\simplify{(x+{c})})=\\var{d}\\]

\n

$x=\\;$ [[0]]

\n

If you want help in solving the equation, click on Show steps. If you do so then you will lose 1 mark.

\n

Input all numbers as fractions or integers and not as decimals.

\n ", "extendBaseMarkingAlgorithm": true, "showFeedbackIcon": true, "type": "gapfill", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "marks": 0}], "ungrouped_variables": ["a", "c", "b", "d"], "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Solve for $x$:  $\\log_{a}(x+b)- \\log_{a}(x+c)=d$

"}, "type": "question", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "Simon Thomas", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3148/"}]}