// Numbas version: exam_results_page_options {"name": "Regina's copy of Logarithms: Solving Equations 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["a", "c", "b", "d", "s", "sol2", "sol1"], "variablesTest": {"condition": "", "maxRuns": 100}, "extensions": [], "functions": {}, "preamble": {"css": "", "js": ""}, "tags": [], "variable_groups": [], "parts": [{"gaps": [{"vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "notallowed": {"strings": ["."], "partialCredit": 0, "message": "

Input as an integer, not as a decimal.

", "showStrings": false}, "showCorrectAnswer": true, "answersimplification": "std", "variableReplacements": [], "scripts": {}, "marks": 2, "checkingaccuracy": 0.0001, "expectedvariablenames": [], "checkingtype": "absdiff", "showpreview": true, "checkvariablenames": false, "vsetrangepoints": 5, "type": "jme", "answer": "{sol1}"}], "showCorrectAnswer": true, "variableReplacements": [], "scripts": {}, "variableReplacementStrategy": "originalfirst", "steps": [{"showCorrectAnswer": true, "variableReplacements": [], "scripts": {}, "variableReplacementStrategy": "originalfirst", "showFeedbackIcon": true, "type": "information", "marks": 0, "prompt": "

Three rules for logs should be used:

\n

1. $\\log_a(x^q)=q\\log_a(x)$

\n

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

\n

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

\n

So use rule 1 followed by rules 2 and 3 to get an equation for $x$.

"}], "showFeedbackIcon": true, "stepsPenalty": 1, "type": "gapfill", "marks": 0, "prompt": "

\\[2\\log_{\\var{a}}(\\simplify{x+{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.

"}], "advice": "

We use the following rules for logs:

\n

1. $\\log_a(x^q)=q\\log_a(x)$

\n

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

\n

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

\n

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

\n

$x=\\var{sol1}$ and $x=\\var{sol2}$

\n

We should check that these solutions gives positive values for $\\simplify{x+{b}}$ and $\\simplify{x+{c}}$ as otherwise the logs are not defined.

\n

The value $x=\\var{sol1}$ gives: 

\n

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

\n

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

\n

Hence $x=\\var{sol1}$ is a solution to our original equation.

\n

The value $x=\\var{sol2}$ gives:

\n

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

\n

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

\n

Hence $x=\\var{sol2}$ is NOT a solution to our original equation as $\\log_{\\var{a}}(\\simplify{x+{b}})$ is not defined for this value of $x$.

\n

So there is only one solution $x=\\var{sol1}$.

", "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "\n \t\t

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

\n \t\t

Make sure that your choice is a solution by substituting back into the equation.

\n \t\t"}, "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers"]}, "variables": {"b": {"templateType": "anything", "description": "", "definition": "s*random(1..20)", "group": "Ungrouped variables", "name": "b"}, "sol2": {"templateType": "anything", "description": "", "definition": "-c+a^d", "group": "Ungrouped variables", "name": "sol2"}, "sol1": {"templateType": "anything", "description": "", "definition": "c-2*b", "group": "Ungrouped variables", "name": "sol1"}, "d": {"templateType": "anything", "description": "", "definition": "random(1,2)", "group": "Ungrouped variables", "name": "d"}, "c": {"templateType": "anything", "description": "", "definition": "b+2*a^(d)", "group": "Ungrouped variables", "name": "c"}, "s": {"templateType": "anything", "description": "", "definition": "random(1,-1)", "group": "Ungrouped variables", "name": "s"}, "a": {"templateType": "anything", "description": "", "definition": "random(2,3)", "group": "Ungrouped variables", "name": "a"}}, "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 ", "name": "Regina's copy of Logarithms: Solving Equations 2", "type": "question", "contributors": [{"name": "Regina Kobus", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1991/"}]}]}], "contributors": [{"name": "Regina Kobus", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1991/"}]}