// Numbas version: finer_feedback_settings {"name": "Logarithms: Solving equations 6", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"functions": {}, "name": "Logarithms: Solving equations 6", "tags": ["logarithmic equations", "logarithms", "logs", "quadratic equation", "solving a quadratic equation", "solving equations involving powers", "solving logarithmic equations"], "advice": "\n
In the equation
\\[\\var{c}\\left(\\var{a^2}^x \\right)+ \\var{d}\\left(\\var{a}^{x+1}\\right)=\\var{b}\\]
Let $y=\\var{a}^x$ and since $\\var{a^2}^x=(\\var{a}^2)^x=\\left(\\var{a}^x\\right)^2 $ on substitution this becomes:
\\[\\begin{eqnarray*} \\var{c}y^2 + \\var{d}\\left(\\var{a}y\\right)&=&\\var{b} \\\\ \\\\ \\Rightarrow \\var{c}y^2 + \\var{a*d}y&=&\\var{b}\\Rightarrow \\var{c}y^2 + \\var{a*d}y-\\var{b}=0\\\\ \\\\ \\Rightarrow (\\var{c}y+\\var{al})(y-\\var{abs(be)})&=&0 \\mbox{ on factorisation.} \\end{eqnarray*} \\]
This quadratic has solutions $\\displaystyle y=\\simplify[std]{{-al}/{c}},\\;\\;y=\\var{-be}$.
But $y=\\var{a}^x \\gt 0$ for all $x$ and so $\\displaystyle y=\\simplify[std]{{-al}/{c}}$ cannot be a solution for the original equation.
\nWe are left with $y=\\var{-be}$ which gives:
\\[\\begin{eqnarray*} \\var{a}^x &=& \\var{-be}\\\\ \\Rightarrow x\\ln(\\var{a})&=&\\ln(\\var{-be})\\\\ \\Rightarrow x&=&\\frac{\\ln(\\var{-be})}{\\ln(\\var{a})} = \\var{ans1} \\end{eqnarray*} \\]
to 3 decimal places.
\n ", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "parts": [{"prompt": "\n$x=\\;\\;$[[0]]
\nInput your answer to 3 decimal places.
\n ", "gaps": [{"minvalue": "ans1-tol", "type": "numberentry", "maxvalue": "ans1+tol", "marks": 2.0, "showPrecisionHint": false}], "type": "gapfill", "marks": 0.0}], "extensions": [], "statement": "\nSolve the following equation for $x$. Note that there is only one solution.
\n\\[\\var{c}\\left(\\var{a^2}^x \\right)+ \\var{d}\\left(\\var{a}^{x+1}\\right)=\\var{b}\\]
\nHint: remember that $\\left(A^2\\right)^x=\\left(A^x\\right)^2$ for any number $A$.
\n ", "variable_groups": [], "progress": "ready", "type": "question", "variables": {"a": {"definition": "random(4..9)", "name": "a"}, "be": {"definition": "random(-9..-2)", "name": "be"}, "c": {"definition": "random(2..6)", "name": "c"}, "b": {"definition": "-al*be", "name": "b"}, "d": {"definition": "if(c=2 or c=4,random(3,5,7,9),if(c=3,random(2,4,5,7,8),if(c=5,random(2,3,4,6,7),random(5,7,11))))", "name": "d"}, "ans1": {"definition": "precround(tans1,3)", "name": "ans1"}, "al": {"definition": "d*a-be*c", "name": "al"}, "tol": {"definition": 0.0, "name": "tol"}, "tans1": {"definition": "ln(-be)/ln(a)", "name": "tans1"}}, "metadata": {"notes": "2/07/2012:
\nAdded tags.
\nAdded that the solution is to 3 decimal places.
\nForced exact solution to 3 decimal places - no tolerance.
\nImproved display.
\n19/07/2012:
\nAdded description.
\nChecked calculation.
\nNew tolerance variable tol=0 for the answer.
\n\n
25/07/2012:
\nAdded tags.
\nIs it necessary to include the hint? It is a rather basic mathematical identity.
\n\n
In the Advice section moved \\Rightarrow so that it is at the beginning of the line instead of the end of the previous line.
\n\n
\n
Question appears to be working correctly.
\n", "description": "
Solve for $x$: $c(a^2)^x + d(a)^{x+1}=b$ (there is only one solution for this example).
", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}]}