// Numbas version: exam_results_page_options {"name": "Solving a Linear and a Non-linear system of equations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"description": "

Solving a Linear and a Non-linear system of equations

", "licence": "Creative Commons Attribution 4.0 International"}, "rulesets": {}, "statement": "

Given two equations:

\n

\\(\\var{a1}x+\\var{b1}y=\\var{r1}\\)

\n

and

\n

\\(\\var{c1}x^2+\\var{d1}y^2=\\var{r2}\\)

\n

There are two solutions for \\(x\\) that satisfy both of these equations and for each \\(x\\) value there exists a corresponding \\(y\\) value that forms a solution pair.

", "preamble": {"js": "", "css": ""}, "functions": {}, "variable_groups": [], "variables": {"a1": {"name": "a1", "definition": "random(2..10#1)", "templateType": "randrange", "group": "Ungrouped variables", "description": ""}, "r1": {"name": "r1", "definition": "random(10..20#1)", "templateType": "randrange", "group": "Ungrouped variables", "description": ""}, "c1": {"name": "c1", "definition": "random(1..5#1)", "templateType": "randrange", "group": "Ungrouped variables", "description": ""}, "r2": {"name": "r2", "definition": "random(20..50#1)", "templateType": "randrange", "group": "Ungrouped variables", "description": ""}, "b1": {"name": "b1", "definition": "random(2..10#1)", "templateType": "randrange", "group": "Ungrouped variables", "description": ""}, "d1": {"name": "d1", "definition": "random(2..5#1)", "templateType": "randrange", "group": "Ungrouped variables", "description": ""}}, "name": "Solving a Linear and a Non-linear system of equations", "variablesTest": {"condition": "(2*{a1}*{d1}*{r1})^2>4*({b1}^2*{c1}+{d1}*{a1}^2)*({d1}*{r1}^2-{b1}^2*{r2})", "maxRuns": 100}, "advice": "

To solve a system that involves a linear equation and a non-linear equation we must use the substitution method.

\n

\\(\\var{a1}x+\\var{b1}y=\\var{r1}\\)

\n

\\(\\var{c1}x^2+\\var{d1}y^2=\\var{r2}\\)

\n

The first equation is a linear equaton, we use this to write one variable in terms of the other. 

\n

For example, we could make y the subject of this equation 

\n

\\(y=\\frac{\\var{r1}-\\var{a1}x}{\\var{b1}}\\)

\n

We can then insert this for every \\(y\\) in the non-linear equation to get

\n

\\(\\var{c1}x^2+\\var{d1}*\\left(\\frac{\\var{r1}-\\var{a1}x}{\\var{b1}}\\right)^2=\\var{r2}\\)

\n

\\(\\var{c1}x^2+\\var{d1}*\\frac{(\\var{r1}-\\var{a1}x)^2}{\\var{b1}^2}=\\var{r2}\\)

\n

Multiplying across by \\(\\simplify{{b1}^2}\\) gives

\n

\\(\\simplify{{c1}*{b1}^2}x^2+\\var{d1}(\\var{r1}-\\var{a1}x)^2-\\simplify{{r2}*{b1}^2}=0\\)

\n

\\(\\simplify{{c1}*{b1}^2}x^2+\\var{d1}\\left(\\simplify{{r1}^2}-\\simplify{2*{r1}*{a1}}x+\\simplify{{a1}^2}x^2\\right)-\\simplify{{r2}*{b1}^2}=0\\)

\n

Gathering the like terms together gives

\n

\\(\\simplify{({c1}*{b1}^2+{d1}*{a1}^2)x^2-(2*{a1}*{d1}*{r1})x+({d1}*{r1}^2-{r2}*{b1}^2)}=0\\)

\n

This is a quadratic equation.

\n

Recall the formula for solving a quadratic equation of the form  \\(ax^2+bx+c=0\\)  is given by

\n

\\(x=\\frac{-b\\pm \\sqrt{b^2-4ac}}{2a}\\)

\n

In this example \\(a = \\simplify{({c1}*{b1}^2+{d1}*{a1}^2)}, b = \\simplify{-(2*{a1}*{d1}*{r1})}\\) and \\(c = \\simplify{{d1}*{r1}^2-{r2}*{b1}^2}\\)

\n

Once we have each \\(x\\) value we insert it into   \\(y=\\frac{\\var{r1}-\\var{a1}x}{\\var{b1}}\\)   to find the corresponding \\(y\\) value.

", "parts": [{"showCorrectAnswer": true, "prompt": "

Input the larger of the two \\(x\\) values.      \\(x = \\) [[0]]

\n

Input the \\(y\\) value that corresponds to the previous answer.     \\(y = \\) [[1]]

\n

\n

Input the lesser of the two \\(x\\) values that satisfies both equations.     \\(x = \\) [[2]]

\n

Input the \\(y\\) value that corresponds to the previous answer.     \\(y = \\) [[3]]

", "variableReplacementStrategy": "originalfirst", "scripts": {}, "showFeedbackIcon": true, "marks": 0, "gaps": [{"showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "maxValue": "(2*{a1}*{d1}*{r1}+sqrt{(2*{a1}*{d1}*{r1})^2-4*({b1}^2*{c1}+{d1}*{a1}^2)*({d1}*{r1}^2-{b1}^2*{r2})})/(2*({b1}^2*{c1}+{d1}*{a1}^2))", "showPrecisionHint": true, "strictPrecision": false, "type": "numberentry", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "allowFractions": false, "minValue": "(2*{a1}*{d1}*{r1}+sqrt{(2*{a1}*{d1}*{r1})^2-4*({b1}^2*{c1}+{d1}*{a1}^2)*({d1}*{r1}^2-{b1}^2*{r2})})/(2*({b1}^2*{c1}+{d1}*{a1}^2))", "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "precision": "3", "marks": 1, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "precisionType": "dp", "precisionPartialCredit": 0}, {"showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "maxValue": "(2*{r1}*{b1}*{c1}-sqrt{(2*{r1}*{b1}*{c1})^2-4*({c1}*{b1}^2+{d1}*{a1}^2)*({c1}*{r1}^2-{r2}*{a1}^2)})/(2*({c1}*{b1}^2+{d1}*{a1}^2))", "showPrecisionHint": true, "strictPrecision": false, "type": "numberentry", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "allowFractions": false, "minValue": "(2*{r1}*{b1}*{c1}-sqrt{(2*{r1}*{b1}*{c1})^2-4*({c1}*{b1}^2+{d1}*{a1}^2)*({c1}*{r1}^2-{r2}*{a1}^2)})/(2*({c1}*{b1}^2+{d1}*{a1}^2))", "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "precision": "3", "marks": 1, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "precisionType": "dp", "precisionPartialCredit": 0}, {"showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "maxValue": "(2*{a1}*{d1}*{r1}-sqrt{(2*{a1}*{d1}*{r1})^2-4*({b1}^2*{c1}+{d1}*{a1}^2)*({d1}*{r1}^2-{b1}^2*{r2})})/(2*({b1}^2*{c1}+{d1}*{a1}^2))", "showPrecisionHint": true, "strictPrecision": false, "type": "numberentry", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "allowFractions": false, "minValue": "(2*{a1}*{d1}*{r1}-sqrt{(2*{a1}*{d1}*{r1})^2-4*({b1}^2*{c1}+{d1}*{a1}^2)*({d1}*{r1}^2-{b1}^2*{r2})})/(2*({b1}^2*{c1}+{d1}*{a1}^2))", "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "precision": "3", "marks": 1, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "precisionType": "dp", "precisionPartialCredit": 0}, {"showFeedbackIcon": true, "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "variableReplacements": [], "maxValue": "(2*{r1}*{b1}*{c1}+sqrt{(2*{r1}*{b1}*{c1})^2-4*({c1}*{b1}^2+{d1}*{a1}^2)*({c1}*{r1}^2-{r2}*{a1}^2)})/(2*({c1}*{b1}^2+{d1}*{a1}^2))", "showPrecisionHint": true, "strictPrecision": false, "type": "numberentry", "mustBeReduced": false, "notationStyles": ["plain", "en", "si-en"], "showCorrectAnswer": true, "allowFractions": false, "minValue": "(2*{r1}*{b1}*{c1}+sqrt{(2*{r1}*{b1}*{c1})^2-4*({c1}*{b1}^2+{d1}*{a1}^2)*({c1}*{r1}^2-{r2}*{a1}^2)})/(2*({c1}*{b1}^2+{d1}*{a1}^2))", "scripts": {}, "precisionMessage": "You have not given your answer to the correct precision.", "precision": "3", "marks": 1, "mustBeReducedPC": 0, "correctAnswerStyle": "plain", "precisionType": "dp", "precisionPartialCredit": 0}], "type": "gapfill", "variableReplacements": []}], "extensions": [], "tags": [], "ungrouped_variables": ["a1", "b1", "r1", "c1", "d1", "r2"], "type": "question", "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}]}], "contributors": [{"name": "Frank Doheny", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/789/"}]}