// Numbas version: exam_results_page_options {"name": "Logarithms: Solving equations 2", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "ungrouped_variables": ["a", "c", "b", "d", "s", "sol2", "sol1"], "name": "Logarithms: Solving equations 2", "tags": ["algebra", "algebraic manipulation", "combining logarithms", "logarithm laws", "logarithms", "rebel", "rebelmaths", "simplifying logarithms", "solving", "solving equations", "Solving equations", "steps", "Steps"], "preamble": {"css": "", "js": ""}, "advice": "
We use the following rules for logs:
\n1. $\\log_a(x^q)=q\\log_a(x)$
\n2. $\\log_a(\\frac{x}{y})=\\log_a(x)-\\log_a(y)$
\n3. $a^x=y \\iff \\log_a y=x$
\nUsing 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:
$x=\\var{sol1}$ and $x=\\var{sol2}$
\nWe should check that these solutions gives positive values for $\\simplify{x+{b}}$ and $\\simplify{x+{c}}$ as otherwise the logs are not defined.
\nThe value $x=\\var{sol1}$ gives:
\nSubstituting this value for $x$ into $\\log_{\\var{a}}(\\simplify{x+{b}})$ we get $\\log_{\\var{a}}(\\simplify{{2*a^d}})$ so OK.
\nSubstituting this value for $x$ into $\\log_{\\var{a}}(\\simplify{x+{c}})$ we get $\\log_{\\var{a}}(\\simplify{{4*a^d}})$ so OK.
\nHence $x=\\var{sol1}$ is a solution to our original equation.
\nThe value $x=\\var{sol2}$ gives:
\nSubstituting this value for $x$ into $\\log_{\\var{a}}(\\simplify{x+{b}})$ we get $\\log_{\\var{a}}(\\simplify{{-a^d}})$ so NOT OK.
\nSubstituting this value for $x$ into $\\log_{\\var{a}}(\\simplify{x+{c}})$ we get $\\log_{\\var{a}}(\\simplify{{a^d}})$ so OK.
\nHence $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$.
\nSo there is only one solution $x=\\var{sol1}$.
", "rulesets": {"std": ["all", "!collectNumbers", "fractionNumbers"]}, "parts": [{"stepsPenalty": 1, "prompt": "\n\\[2\\log_{\\var{a}}(\\simplify{x+{b}})- \\log_{\\var{a}}(\\simplify{(x+{c})})=\\var{d}\\]
\n$x=\\;$ [[0]].
\nIf you want help in solving the equation, click on Show steps. If you do so then you will lose 1 mark.
\nInput all numbers as fractions or integers and not as decimals.
\n ", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"notallowed": {"message": "Input as an integer, not as a decimal.
", "showStrings": false, "strings": ["."], "partialCredit": 0}, "vsetrangepoints": 5, "expectedvariablenames": [], "checkingaccuracy": 0.0001, "vsetrange": [0, 1], "showpreview": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "answersimplification": "std", "scripts": {}, "answer": "{sol1}", "marks": 2, "checkvariablenames": false, "checkingtype": "absdiff", "type": "jme"}], "steps": [{"prompt": "Three rules for logs should be used:
\n1. $\\log_a(x^q)=q\\log_a(x)$
\n2. $\\log_a(\\frac{x}{y})=\\log_a(x)-\\log_a(y)$
\n3. $a^x=y \\iff \\log_a y=x$
\nSo use rule 1 followed by rules 2 and 3 to get an equation for $x$.
", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}], "statement": "\nSolve the following equation for $x$.
\nInput your answer as a fraction or an integer as appropriate and not as a decimal.
\n ", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(2,3)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "b+2*a^(d)", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "s*random(1..20)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "d": {"definition": "random(1,2)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "s": {"definition": "random(1,-1)", "templateType": "anything", "group": "Ungrouped variables", "name": "s", "description": ""}, "sol2": {"definition": "-c+a^d", "templateType": "anything", "group": "Ungrouped variables", "name": "sol2", "description": ""}, "sol1": {"definition": "c-2*b", "templateType": "anything", "group": "Ungrouped variables", "name": "sol1", "description": ""}}, "metadata": {"notes": "5/08/2012:
\nAdded tags.
\nAdded description.
\nChecked calculation.OK.
\nImproved display in content areas.
\nrebelmaths rebel Rebel REBEL
", "description": "\n \t\tSolve for $x$: $\\displaystyle 2\\log_{a}(x+b)- \\log_{a}(x+c)=d$.
\n \t\tMake sure that your choice is a solution by substituting back into the equation.
\n \t\t", "licence": "Creative Commons Attribution 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}]}]}], "contributors": [{"name": "Julie Crowley", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/113/"}]}