// Numbas version: exam_results_page_options {"name": "W2b: Solve an equation in algebraic fractions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"preamble": {"css": "", "js": ""}, "functions": {}, "advice": "

Cross-multiply to get:
\$\\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}}.\$

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

"}, "extensions": [], "parts": [{"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 ", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "steps": [{"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 ", "extendBaseMarkingAlgorithm": true, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "unitTests": [], "type": "information", "customMarkingAlgorithm": "", "adaptiveMarkingPenalty": 0, "marks": 0, "scripts": {}, "variableReplacements": [], "showFeedbackIcon": true, "customName": "", "useCustomName": false}], "stepsPenalty": 1, "unitTests": [], "type": "gapfill", "sortAnswers": false, "customMarkingAlgorithm": "", "adaptiveMarkingPenalty": 0, "gaps": [{"extendBaseMarkingAlgorithm": true, "answerSimplification": "std", "showPreview": true, "checkingType": "absdiff", "showFeedbackIcon": true, "customName": "", "checkVariableNames": false, "notallowed": {"partialCredit": 0, "message": "

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

", "strings": ["."], "showStrings": false}, "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "valuegenerators": [], "vsetRangePoints": 5, "answer": "{an1}/{an2}", "failureRate": 1, "vsetRange": [0, 1], "type": "jme", "adaptiveMarkingPenalty": 0, "customMarkingAlgorithm": "", "marks": 2, "scripts": {}, "variableReplacements": [], "unitTests": [], "checkingAccuracy": 0.0001, "useCustomName": false}], "marks": 0, "scripts": {}, "variableReplacements": [], "showFeedbackIcon": true, "customName": "", "useCustomName": false}], "tags": [], "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.

\n \n ", "ungrouped_variables": ["a", "c", "b", "d", "g", "m", "q", "p", "s", "r", "t", "an2", "an1"], "name": "W2b: Solve an equation in algebraic fractions", "variable_groups": [], "variablesTest": {"condition": "", "maxRuns": 100}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Timur Zaripov", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3272/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Timur Zaripov", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3272/"}]}