// Numbas version: exam_results_page_options {"name": "David'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": [{"functions": {}, "metadata": {"description": "

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

", "notes": "

5/08/2012:

\n

Added tags.

\n

Added description.

\n

Checked calculation.OK.

\n

Improved display in content areas.

\n

rebelmaths rebel Rebel REBEL

", "licence": "Creative Commons Attribution 4.0 International"}, "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 ", "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"description": "", "name": "a", "templateType": "anything", "definition": "random(2..5)", "group": "Ungrouped variables"}, "c": {"description": "", "name": "c", "templateType": "anything", "definition": "b-random(1..20)", "group": "Ungrouped variables"}, "b": {"description": "", "name": "b", "templateType": "anything", "definition": "random(1..20)", "group": "Ungrouped variables"}, "d": {"description": "", "name": "d", "templateType": "anything", "definition": "random(1,2)", "group": "Ungrouped variables"}}, "parts": [{"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "stepsPenalty": 1, "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 ", "marks": 0, "gaps": [{"answersimplification": "std", "checkingaccuracy": 0.0001, "type": "jme", "vsetrangepoints": 5, "checkingtype": "absdiff", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "checkvariablenames": false, "notallowed": {"partialCredit": 0, "strings": ["."], "showStrings": false, "message": "

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

"}, "variableReplacements": [], "scripts": {}, "vsetrange": [0, 1], "showpreview": true, "marks": 2, "answer": "{b-c*a^d}/{a^d-1}", "expectedvariablenames": []}], "steps": [{"variableReplacements": [], "variableReplacementStrategy": "originalfirst", "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$.

", "marks": 0, "showCorrectAnswer": true, "scripts": {}, "type": "information"}], "showCorrectAnswer": true, "scripts": {}, "type": "gapfill"}], "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}}(x+\\var{c})=\\simplify{{a^d}}(x+\\var{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} \\]
We should check that this solution gives positive values for $x+\\var{b}$ and $\\simplify{x+{c}}$ as otherwise the logs are not defined.

\n

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

\n

For $\\log_{\\var{a}}(\\simplify{x+{c}})$ we get on substituting for $x$, $\\log_{\\var{a}}(\\simplify{({b-c })/{a^d-1}})$ so OK.

\n

Hence the value we found for $x$ is a solution to the original equation.

", "tags": ["algebra", "algebraic manipulation", "combining logarithms", "logarithm laws", "logarithms", "rebel", "rebelmaths", "simplifying logarithms", "solving equations", "Solving equations", "steps", "Steps"], "variable_groups": [], "preamble": {"js": "", "css": ""}, "showQuestionGroupNames": false, "name": "David's copy of Logarithms: Solving equations 1", "ungrouped_variables": ["a", "c", "b", "d"], "question_groups": [{"pickQuestions": 0, "questions": [], "name": "", "pickingStrategy": "all-ordered"}], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers", "!noLeadingMinus"]}, "type": "question", "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "David Martin", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/130/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}, {"name": "David Martin", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/130/"}]}