// Numbas version: finer_feedback_settings {"name": "Logarithms: Solving equations 3", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Logarithms: Solving equations 3", "tags": [], "metadata": {"description": "

Solve for $x$: $\\log(ax+b)-\\log(cx+d)=s$

", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "\n

Solve the following equation for $x$.

\n

\\[\\simplify[std]{log({a1}x+{b1})-log({c1}x+{d1})={e1}}\\]

\n ", "advice": "\n

First use one of the logarith laws which states (for logarithms to any base)

\n

\\[\\log(a)-\\log(b)=\\log\\left(\\frac{a}{b}\\right)\\]

\n

So the equation can be written as:

\n

\\[\\log_{10}\\left(\\simplify[std]{({a1}x+{b1})/({c1}x+{d1})}\\right)=\\var{e1}\\]
Now exponentiate both sides to get:
\\[\\simplify[std,!otherNumbers]{({a1}x+{b1})/({c1}x+{d1})}=10^{\\var{e1}} \\Rightarrow \\simplify[std,!otherNumbers]{{a1}x+{b1}=10^{e1}({c1}x+{d1})}\\]
Collect together terms in $x$ on the left and everything else on the right of the equation gives:
\\[\\simplify[std,!otherNumbers]{x({a1}-10^{e1}*{c1})=10^{e1}*{d1}-{b1}}\\]
Finally rearrange to get:
\\[\\simplify[std]{x=(10^{e1}*{d1}-{b1})/({a1}-10^{e1}*{c1})={10^e1*d1-b1}/{a1-10^e1*c1}}\\]
which to 3 decimal places evaluates to
\\[x=\\var{ans}.\\]

\n ", "rulesets": {"std": ["all", "fractionNumbers", "!collectNumbers", "!noLeadingMinus"]}, "extensions": [], "variables": {"e1": {"name": "e1", "group": "Ungrouped variables", "definition": "random(1..2)", "description": "", "templateType": "anything"}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything"}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "9+random(1..9)", "description": "", "templateType": "anything"}, "tol": {"name": "tol", "group": "Ungrouped variables", "definition": "0", "description": "", "templateType": "anything"}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "precround(tans,3)", "description": "", "templateType": "anything"}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "d1*random(1..9)", "description": "", "templateType": "anything"}, "tans": {"name": "tans", "group": "Ungrouped variables", "definition": "(d1*10^e1-b1)/(a1-c1*10^e1)", "description": "", "templateType": "anything"}, "d1": {"name": "d1", "group": "Ungrouped variables", "definition": "random(1..9)", "description": "", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["e1", "a1", "b1", "tol", "ans", "c1", "tans", "d1"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "\n

Input the solution for $x$ here:

\n

$x=\\;\\;$ [[0]]

\n

Input your answer to 3 decimal places.

\n ", "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "3", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ans-tol", "maxValue": "ans+tol", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Wan Mekwi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4058/"}]}]}], "contributors": [{"name": "Bill Foster", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/6/"}, {"name": "Wan Mekwi", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/4058/"}]}