// Numbas version: exam_results_page_options {"name": "Solve an equation in logarithms", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "s*random(1..8)", "description": "", "name": "b"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(2,3)", "description": "", "name": "a"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "b+2*a^(d)", "description": "", "name": "c"}, "s": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,-1)", "description": "", "name": "s"}, "sol1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "c-2*b", "description": "", "name": "sol1"}, "sol2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-c+a^d", "description": "", "name": "sol2"}, "d": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1,2)", "description": "", "name": "d"}}, "ungrouped_variables": ["a", "c", "b", "d", "s", "sol2", "sol1"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Solve an equation in logarithms", "functions": {}, "showQuestionGroupNames": false, "parts": [{"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.

", "marks": 0, "scripts": {}, "gaps": [{"answer": "{sol1}", "vsetrange": [0, 1], "checkingaccuracy": 0.0001, "checkvariablenames": false, "expectedvariablenames": [], "notallowed": {"message": "

Input as an integer, not as a decimal.

", "showStrings": false, "partialCredit": 0, "strings": ["."]}, "showpreview": true, "checkingtype": "absdiff", "scripts": {}, "answersimplification": "std", "type": "jme", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 2, "vsetrangepoints": 5}], "type": "gapfill", "showCorrectAnswer": true, "steps": [{"prompt": "

Three rules for logs should be used:

\n

1. $n\\log_a(m)=\\log_a(m^n)$

\n

2. $\\log_a(b)-\\log_a(c)=\\log_a(b/c)$

\n

3. $\\log_a(p)=r \\Rightarrow p=a^r$

\n

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

", "scripts": {}, "type": "information", "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "variableReplacements": [], "marks": 0}], "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "stepsPenalty": 1}], "statement": "

Solve the following equation for $x$.

\n

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

", "tags": ["algebra", "algebraic manipulation", "checked2015", "combining logarithms", "logarithm laws", "logarithms", "MAS1601", "mas1601", "simplifying logarithms", "solving", "solving equations", "Solving equations", "steps", "Steps"], "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers"]}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

5/08/2012:

\n

Added tags.

\n

Added description.

\n

Checked calculation.OK.

\n

Improved display in content areas.

", "licence": "Creative Commons Attribution 4.0 International", "description": "

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

\n

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

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

We use the following three rules for logs :

\n

1. $n\\log_a(m)=\\log_a(m^n)$

\n

2. $\\log_a(b)-\\log_a(c)=\\log_a(b/c)$

\n

3. $\\log_a(p)=r \\Rightarrow p=a^r$

\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}$.

", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}