// Numbas version: exam_results_page_options {"name": "W2b: Solve an equation in algebraic fractions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"preventleave": false, "showfrontpage": false, "allowregen": true}, "question_groups": [{"questions": [{"contributors": [{"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/", "name": "Newcastle University Mathematics and Statistics"}, {"profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3272/", "name": "Timur Zaripov"}], "name": "W2b: Solve an equation in algebraic fractions", "tags": [], "preamble": {"css": "", "js": ""}, "ungrouped_variables": ["a", "c", "b", "d", "g", "m", "q", "p", "s", "r", "t", "an2", "an1"], "variable_groups": [], "functions": {}, "parts": [{"gaps": [{"checkVariableNames": false, "extendBaseMarkingAlgorithm": true, "adaptiveMarkingPenalty": 0, "checkingAccuracy": 0.0001, "vsetRangePoints": 5, "valuegenerators": [], "answerSimplification": "std", "type": "jme", "scripts": {}, "showFeedbackIcon": true, "notallowed": {"showStrings": false, "partialCredit": 0, "message": "

Input as a fraction or an integer, not as a decimal.

", "strings": ["."]}, "variableReplacementStrategy": "originalfirst", "vsetRange": [0, 1], "useCustomName": false, "marks": 2, "showPreview": true, "showCorrectAnswer": true, "failureRate": 1, "customName": "", "checkingType": "absdiff", "unitTests": [], "answer": "{an1}/{an2}", "customMarkingAlgorithm": "", "variableReplacements": []}], "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "sortAnswers": false, "marks": 0, "variableReplacements": [], "prompt": "\n

\$\\simplify{({p}*x+{s}) / ({a} * x + {b}) = ({q}*x+{t}) / ({c} * x + {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 \n \n ", "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "customName": "", "type": "gapfill", "scripts": {}, "stepsPenalty": 1, "steps": [{"extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "useCustomName": false, "marks": 0, "prompt": "\n

Cross-multiply to get:
\$\\simplify{({p}*x+{s})*({c} * x + {d})=({q}*x+{t})*({a} * x + {b})}\$
Multiplying out to get \$\\simplify{{p*c}x^2 +{p*d+c*s}x+{s*d}={q*a}x^2 +{q*b+t*a}x+{t*b}}.\$ Subtract the $x^2$ term from each side to leave a linear equation:

\n

Solve this equation for $x$.

\n \n ", "showCorrectAnswer": true, "adaptiveMarkingPenalty": 0, "customName": "", "type": "information", "scripts": {}, "unitTests": [], "showFeedbackIcon": true, "customMarkingAlgorithm": "", "variableReplacements": []}], "showFeedbackIcon": true, "customMarkingAlgorithm": "", "unitTests": []}], "variablesTest": {"maxRuns": 100, "condition": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

Solve for $x$: $\\displaystyle \\frac{px+s}{ax+b} = \\frac{qx+t}{cx+d}$ with $pc=qa$.

"}, "variables": {"s": {"group": "Ungrouped variables", "name": "s", "templateType": "anything", "definition": "random(-3..3 except 0)", "description": ""}, "d": {"group": "Ungrouped variables", "name": "d", "templateType": "anything", "definition": "random(-3..3 except 0)", "description": ""}, "b": {"group": "Ungrouped variables", "name": "b", "templateType": "anything", "definition": "random(-3..3 except 0)", "description": ""}, "m": {"group": "Ungrouped variables", "name": "m", "templateType": "anything", "definition": "random(1..3)", "description": ""}, "c": {"group": "Ungrouped variables", "name": "c", "templateType": "anything", "definition": "m*a/g", "description": ""}, "an2": {"group": "Ungrouped variables", "name": "an2", "templateType": "anything", "definition": "p*d+s*c-a*t-b*q", "description": ""}, "p": {"group": "Ungrouped variables", "name": "p", "templateType": "anything", "definition": "random(1..5)", "description": ""}, "q": {"group": "Ungrouped variables", "name": "q", "templateType": "anything", "definition": "p*c/a", "description": ""}, "t": {"group": "Ungrouped variables", "name": "t", "templateType": "anything", "definition": "random(-3..3 except r)", "description": ""}, "g": {"group": "Ungrouped variables", "name": "g", "templateType": "anything", "definition": "gcd(a,p)", "description": ""}, "an1": {"group": "Ungrouped variables", "name": "an1", "templateType": "anything", "definition": "b*t-s*d", "description": ""}, "r": {"group": "Ungrouped variables", "name": "r", "templateType": "anything", "definition": "(p*d+c*s-b*q)/a", "description": ""}, "a": {"group": "Ungrouped variables", "name": "a", "templateType": "anything", "definition": "random(1..5 except [p,abs(b)])", "description": ""}}, "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.

\$\\simplify{({p}*x+{s})*({c} * x + {d})=({q}*x+{t})*({a} * x + {b})}\$
Multiplying out we get \$\\simplify{{p*c}x^2 +{p*d+c*s}x+{s*d}={q*a}x^2 +{q*b+t*a}x+{t*b}}\$ Subtracting ${\\var{a*q}}x^2$ from each side we are left with \$\\simplify{{p*d+c*s}x+{s*d}={q*b+t*a}x+{t*b}}\$ which we solve as a linear equation: \$\\simplify{{p*d+c*s-q*b-t*a}x={t*b-s*d}}\$ and so \$\\simplify{x={an1}/{an2}}.\$