// Numbas version: exam_results_page_options {"name": "Simultaneous equations", "duration": 0, "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "allQuestions": true, "shuffleQuestions": false, "percentPass": 0, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "pickQuestions": 0, "navigation": {"onleave": {"action": "none", "message": ""}, "reverse": true, "allowregen": true, "showresultspage": "oncompletion", "preventleave": true, "browse": true, "showfrontpage": true}, "feedback": {"showtotalmark": true, "advicethreshold": 0, "showanswerstate": true, "showactualmark": true, "allowrevealanswer": true}, "type": "exam", "questions": [], "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": [{"name": "Simultaneous equations", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "functions": {}, "ungrouped_variables": [], "tags": ["algebra", "equations", "Linear equations", "linear equations", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations", "system of equations"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": 0, "prompt": "

Find the $x$ and $y$ values that satisfy both of the following equations.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify{{a}x+{b}}$               $(1)$
$y$$=$$\\simplify{{c}x+{d}}$               $(2)$
\n

$x=$ [[0]],   $y=$ [[1]]

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": false, "variableReplacements": [], "maxValue": "xans", "minValue": "xans", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": false, "variableReplacements": [], "maxValue": "yans", "minValue": "yans", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "steps": [{"prompt": "

There are many ways to solve these equations simultaneously. Here is one method.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify{{a}x+{b}}$               $(1)$
$y$$=$$\\simplify{{c}x+{d}}$               $(2)$
\n

Substitute the expression for $y$ given in $(1)$ into $(2)$:
\\[\\simplify{{a}x+{b} ={c}x+{d}}\\]

\n

Collect like terms:
\\[\\simplify{{a-c}x={d-b}}\\]

\n

Solve for $x$:
\\[x=\\var{xans}\\]

Now we know the $x$ value we can determine the corresponding $y$ value by substituting $x=\\var{xans}$ into either equation $(1)$ or $(2)$, below we substitute into $(1)$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify[!collectnumbers]{{a}({xans})+{b}}$
$=$$\\var{yans}$
\n

Therefore the values that satisfy equations $(1)$ and $(2)$ are $x=\\var{xans}$ and $y=\\var{yans}$.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}, {"stepsPenalty": 0, "prompt": "

Solve the following simultaneous equations.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify{{f}x+{g}y}$$=$$\\var{-h}$               $(3)$
$\\simplify{{j}x+{k}y}$$=$$\\var{-l}$               $(4)$
\n

$x=$ [[0]],   $y=$ [[1]]

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "xbans", "minValue": "xbans", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "ybans", "minValue": "ybans", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "steps": [{"prompt": "

There are many ways to solve these equations simultaneously. Here is one method.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify{{f}x+{g}y}$$=$$\\var{-h}$               $(3)$
$\\simplify{{j}x+{k}y}$$=$$\\var{-l}$               $(4)$
\n

Solve one of the equations for one of the variables. Here we solve equation $(1)$ for $y$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\var{g}y$$=$$\\simplify{{-h}-{f}x}$
 
$y$$=$$\\displaystyle{\\simplify{({-h}-{f}x)/({g})}}$               $(5)$
\n

Substitute this expression for $y$ given in $(5)$ into $(4)$:

\n

\\[\\simplify[all,!collectnumbers]{{j}x+{k}(({-h}-{f}x)/({g})) = {-l}}\\]

\n

Collect like terms:
\\[\\simplify[fractionnumbers]{{j-f*k/g}x={-l+h*k/g}}\\]

\n

Solve for $x$:
\\[x=\\var{xbans}\\]

Now we know the $x$ value we can determine the corresponding $y$ value by substituting $x=\\var{xbans}$ into equation $(5)$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\displaystyle{\\simplify[unitdenominator,!collectnumbers]{({-h}-{f}({xbans}))/({g})}}$
 
$=$$\\var{ybans}$
\n

Therefore the values that satisfy equations $(3)$ and $(4)$ are $x=\\var{xbans}$ and $y=\\var{ybans}$.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}, {"stepsPenalty": 0, "prompt": "

Solve the following system of equations.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify{{m}a+{n}b+{p}}$$=$$0$               $(5)$
$\\simplify{{q}a+{r}b+{s}}$$=$$0$               $(6)$
\n

$a=$ [[0]],   $b=$ [[1]]

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "xcans", "minValue": "xcans", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "ycans", "minValue": "ycans", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "steps": [{"prompt": "

There are many ways to solve these equations simultaneously. Here is one method.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\simplify{{m}a+{n}b+{p}}$$=$$0$               $(5)$
$\\simplify{{q}a+{r}b+{s}}$$=$$0$               $(6)$
\n

Solve one of the equations for one of the variables. Here we solve equation $(5)$ for $b$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$\\var{n}b$$=$$\\simplify{{-m}a+{-p}}$
 
$b$$=$$\\displaystyle{\\simplify{({-m}a+{-p})/({n})}}$               $(7)$
\n

Substitute this expression for $b$ given in $(7)$ into $(6)$:

\n

\\[\\simplify[all,!collectnumbers]{{q}a+{r}*(({-m}a+{-p})/{n}) + {s}=0}\\]

\n

Collect like terms:
\\[\\simplify[fractionnumbers]{{q-r*m/n}a={-s+r*p/n}}\\]

\n

Solve for $a$:
\\[a=\\simplify[fractionnumbers]{{xcans}}\\]

Now we know the $a$ value we can determine the corresponding $b$ value by substituting $a=\\simplify[fractionnumbers]{{xcans}}$ into equation $(7)$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$b$$=$$\\displaystyle{\\simplify[unitdenominator,!collectnumbers,fractionnumbers]{({-m}*({xcans})+{-p})/({n})}}$
 
$=$$\\simplify[fractionnumbers]{{ycans}}$
\n

Therefore the values that satisfy equations $(5)$ and $(6)$ are $a=\\simplify[fractionnumbers]{{xcans}}$ and $b=\\simplify[fractionnumbers]{{ycans}}$.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}], "statement": "", "variable_groups": [{"variables": ["xans", "a", "c", "dmb", "b", "d", "yans"], "name": "part a"}, {"variables": ["primes", "kfmgj", "ktf", "gtj", "xbans", "htk", "gtl", "g", "j", "l", "k", "f", "h", "ybans"], "name": "part b"}, {"variables": ["m", "n", "p", "q", "r", "s", "xcans", "ycans"], "name": "part c"}], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"htk": {"definition": "random(1..abs(xbans*kfmgj-1))", "templateType": "anything", "group": "part b", "name": "htk", "description": ""}, "primes": {"definition": "[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199]", "templateType": "anything", "group": "part b", "name": "primes", "description": ""}, "kfmgj": {"definition": "random(-12..12 except [-1,0,1])", "templateType": "anything", "group": "part b", "name": "kfmgj", "description": "

m signifies 'minus'

"}, "xans": {"definition": "random(-10..10)", "templateType": "anything", "group": "part a", "name": "xans", "description": ""}, "gtj": {"definition": "-kfmgj+ktf", "templateType": "anything", "group": "part b", "name": "gtj", "description": ""}, "gtl": {"definition": "xbans*kfmgj+htk", "templateType": "anything", "group": "part b", "name": "gtl", "description": ""}, "ycans": {"definition": "(q*p-s*m)/(r*m-n*q)", "templateType": "anything", "group": "part c", "name": "ycans", "description": ""}, "xcans": {"definition": "(n*s-p*r)/(r*m-n*q)", "templateType": "anything", "group": "part c", "name": "xcans", "description": ""}, "f": {"definition": "ktf/k", "templateType": "anything", "group": "part b", "name": "f", "description": ""}, "dmb": {"definition": "xans*(a-c)", "templateType": "anything", "group": "part a", "name": "dmb", "description": ""}, "xbans": {"definition": "random(-21..12 except 0)", "templateType": "anything", "group": "part b", "name": "xbans", "description": ""}, "a": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "part a", "name": "a", "description": ""}, "c": {"definition": "random(-12..12 except [a,0])", "templateType": "anything", "group": "part a", "name": "c", "description": ""}, "b": {"definition": "d-dmb", "templateType": "anything", "group": "part a", "name": "b", "description": ""}, "d": {"definition": "random(1..dmb)", "templateType": "anything", "group": "part a", "name": "d", "description": ""}, "g": {"definition": "gcd(gtl,gtj)", "templateType": "anything", "group": "part b", "name": "g", "description": "

gcd(gtl,gtj)

"}, "yans": {"definition": "a*(d-b)/(a-c)+b", "templateType": "anything", "group": "part a", "name": "yans", "description": ""}, "h": {"definition": "htk/k", "templateType": "anything", "group": "part b", "name": "h", "description": ""}, "k": {"definition": "gcd(htk,ktf)", "templateType": "anything", "group": "part b", "name": "k", "description": "

old version if(factorise(abs(ktf))[len(factorise(abs(ktf)))-1]=0,1,primes[len(factorise(abs(ktf)))-1])

"}, "j": {"definition": "gtj/g", "templateType": "anything", "group": "part b", "name": "j", "description": ""}, "m": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "part c", "name": "m", "description": ""}, "l": {"definition": "gtl/g", "templateType": "anything", "group": "part b", "name": "l", "description": ""}, "n": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "part c", "name": "n", "description": ""}, "q": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "part c", "name": "q", "description": ""}, "p": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "part c", "name": "p", "description": ""}, "s": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "part c", "name": "s", "description": ""}, "r": {"definition": "random(-12..12 except [0,ceil(n*q/m),floor(n*q/m)])", "templateType": "anything", "group": "part c", "name": "r", "description": ""}, "ybans": {"definition": "(j*h-l*f)/(kfmgj)", "templateType": "anything", "group": "part b", "name": "ybans", "description": ""}, "ktf": {"definition": "random(1..abs(kfmgj-1))", "templateType": "anything", "group": "part b", "name": "ktf", "description": "

t signifies 'times'

"}}, "metadata": {"notes": "

Not sure if there is a way to force brackets around certain large fractions when there is a number multiplying it.

", "description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Simultaneous equations: linear and quadratic, one point", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "functions": {}, "ungrouped_variables": ["root1", "root2", "grad", "sroots", "proots", "yint", "quadxcoeff", "quadccoeff", "ansyvalue"], "tags": ["algebra", "equations", "quadratic", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations", "system of equations"], "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": 0, "prompt": "

Find the $x$ and $y$ values that satisfy both of the following equations. That is, find the point of intersection of the two curves.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify{{grad}x+{yint}}$               $(1)$
$y$$=$$\\simplify{x^2+{quadxcoeff}x+{quadccoeff}}$               $(2)$
\n

$x=$ [[0]],   $y=$ [[1]]

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "root1", "minValue": "root1", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "ansyvalue", "minValue": "ansyvalue", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "steps": [{"prompt": "

There are many ways to solve these equations simultaneously. Here is one method.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify{{grad}x+{yint}}$               $(1)$
$y$$=$$\\simplify{x^2+{quadxcoeff}x+{quadccoeff}}$               $(2)$
\n

Substitute the expression for $y$ given in $(1)$ into $(2)$:
\\[\\simplify{{grad}x+{yint} =x^2+{quadxcoeff}x+{quadccoeff}}\\]

\n

Since we have a quadratic here we get everything onto one side:
\\[0=\\simplify{x^2+{sroots}x+{proots}}\\]

\n

There are various ways to solve a quadratic, in this particular case we can factorise the quadratic:

\n

\\[(\\simplify{x-{root1}})(\\simplify{x-{root2}})=0\\]

\n

Therefore, $x=\\var{root1}$.

\n


Now we know the $x$ value we can determine the corresponding $y$ value by substituting $x=\\var{root1}$ into either equation $(1)$ or $(2)$, below we substitute into $(1)$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify[!collectnumbers]{{grad}({root1})+{yint}}$
$=$$\\var{ansyvalue}$
\n

Therefore the values that satisfy equations $(1)$ and $(2)$ are $x=\\var{root1}$ and $y=\\var{ansyvalue}$.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}], "statement": "", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"quadxcoeff": {"definition": "sroots+grad", "templateType": "anything", "group": "Ungrouped variables", "name": "quadxcoeff", "description": ""}, "ansyvalue": {"definition": "grad*root1+yint", "templateType": "anything", "group": "Ungrouped variables", "name": "ansyvalue", "description": ""}, "yint": {"definition": "random(-6..6 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "yint", "description": ""}, "root1": {"definition": "random(-12..12)", "templateType": "anything", "group": "Ungrouped variables", "name": "root1", "description": ""}, "proots": {"definition": "root1*root2", "templateType": "anything", "group": "Ungrouped variables", "name": "proots", "description": ""}, "quadccoeff": {"definition": "proots+yint", "templateType": "anything", "group": "Ungrouped variables", "name": "quadccoeff", "description": ""}, "sroots": {"definition": "-root1-root2", "templateType": "anything", "group": "Ungrouped variables", "name": "sroots", "description": ""}, "grad": {"definition": "random(-6..6 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "grad", "description": ""}, "root2": {"definition": "root1", "templateType": "anything", "group": "Ungrouped variables", "name": "root2", "description": ""}}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Simultaneous equations: linear and quadratic, two points", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "functions": {}, "ungrouped_variables": ["roots", "root1", "root2", "grad", "sroots", "proots", "yint", "quadxcoeff", "quadccoeff", "ansy1", "ansy2"], "tags": ["algebra", "equations", "quadratic", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations", "system of equations"], "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": "2", "prompt": "

Find the $x$ and $y$ values that satisfy both of the following equations. That is, find the points of intersection of the two curves.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify{{grad}x+{yint}}$               $(1)$
$y$$=$$\\simplify{x^2+{quadxcoeff}x+{quadccoeff}}$               $(2)$
\n

$x_1=$ [[0]],   $y_1=$ [[1]] and $x_2=$ [[2]], $y_2=$ [[3]]

\n

Note: To input your answer please ensure that $x_1<x_2$.

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "root1", "minValue": "root1", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "ansy1", "minValue": "ansy1", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "root2", "minValue": "root2", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "ansy2", "minValue": "ansy2", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "steps": [{"prompt": "

There are many ways to solve these equations simultaneously. Here is one method.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify{{grad}x+{yint}}$               $(1)$
$y$$=$$\\simplify{x^2+{quadxcoeff}x+{quadccoeff}}$               $(2)$
\n

Substitute the expression for $y$ given in $(1)$ into $(2)$:
\\[\\simplify{{grad}x+{yint} =x^2+{quadxcoeff}x+{quadccoeff}}\\]

\n

Since we have a quadratic here we get everything onto one side:
\\[0=\\simplify{x^2+{sroots}x+{proots}}\\]

\n

There are various ways to solve a quadratic, in this particular case we can factorise the quadratic:

\n

\\[(\\simplify{x-{root1}})(\\simplify{x-{root2}})=0\\]

\n

Therefore, $x=\\var{root1},\\,\\var{root2}$.

\n


Now for $x=\\var{root1}$, we can determine the corresponding $y$ value by substituting $x=\\var{root1}$ into either equation $(1)$ or $(2)$. Below we substitute into $(1)$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify[!collectnumbers]{{grad}({root1})+{yint}}$
$=$$\\var{ansy1}$
\n

Now for $x=\\var{root2}$, so we can determine the corresponding $y$ value by substituting $x=\\var{root2}$ into either equation $(1)$ or $(2)$. Below we substitute into $(1)$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify[!collectnumbers]{{grad}({root2})+{yint}}$
$=$$\\var{ansy2}$
\n

Therefore the values that satisfy equations $(1)$ and $(2)$ are $x_1=\\var{root1}$, $y_1=\\var{ansy1}$ and $x_2=\\var{root2}$, $y_2=\\var{ansy2}$.

\n

In other words, the two curves intersect at the points $(\\var{root1},\\var{ansy1})$ and $(\\var{root2},\\var{ansy2})$.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}], "statement": "", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"quadxcoeff": {"definition": "sroots+grad", "templateType": "anything", "group": "Ungrouped variables", "name": "quadxcoeff", "description": ""}, "yint": {"definition": "random(-6..6 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "yint", "description": ""}, "root1": {"definition": "roots[0]", "templateType": "anything", "group": "Ungrouped variables", "name": "root1", "description": ""}, "proots": {"definition": "root1*root2", "templateType": "anything", "group": "Ungrouped variables", "name": "proots", "description": ""}, "quadccoeff": {"definition": "proots+yint", "templateType": "anything", "group": "Ungrouped variables", "name": "quadccoeff", "description": ""}, "ansy2": {"definition": "grad*root2+yint", "templateType": "anything", "group": "Ungrouped variables", "name": "ansy2", "description": ""}, "sroots": {"definition": "-root1-root2", "templateType": "anything", "group": "Ungrouped variables", "name": "sroots", "description": ""}, "ansy1": {"definition": "grad*root1+yint", "templateType": "anything", "group": "Ungrouped variables", "name": "ansy1", "description": ""}, "grad": {"definition": "random(-6..6 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "grad", "description": ""}, "roots": {"definition": "sort(shuffle(-12..12)[0..2])", "templateType": "anything", "group": "Ungrouped variables", "name": "roots", "description": ""}, "root2": {"definition": "roots[1]", "templateType": "anything", "group": "Ungrouped variables", "name": "root2", "description": ""}}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Simultaneous equations: simple quadratic and hyperbola, one point", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "functions": {}, "ungrouped_variables": ["xans", "cubed", "a", "ak", "b", "yans"], "tags": ["algebra", "equations", "hyperbola", "quadratic", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations", "system of equations"], "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": 0, "prompt": "

Find the $x$ and $y$ values that satisfy both of the following equations. That is, find the point of intersection of the two curves.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify{{ak}/({b}x)}$               $(1)$
$y$$=$$\\simplify{{a}x^2/{b}}$               $(2)$
\n

$x=$ [[0]],   $y=$ [[1]]

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "xans", "minValue": "xans", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": false, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "a*xans^2/b", "minValue": "a*xans^2/b", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "steps": [{"prompt": "

Given

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify{{ak}/({b}x)}$               $(1)$
$y$$=$$\\simplify{{a}x^2/{b}}$               $(2)$
\n

substitute the expression for $y$ given in $(1)$ into $(2)$:
\\[\\simplify{{ak}/({b}x) ={a}x^2/{b}}\\]

\n

To get rid of the $x$ in the denominator, let us multiply both sides by $x$
\\[\\simplify{{ak}/({b}) ={a}x^3/{b}}\\]

\n

Since there is only one term with an $x$ in it, we can get $x^3$ by itself

\n

\\[x^3=\\var{cubed}\\]

\n

Therefore, $x=\\sqrt[3]{\\var{cubed}}=\\var{xans}$.

\n


Now we know the $x$ value we can determine the corresponding $y$ value by substituting $x=\\var{xans}$ into either equation $(1)$ or $(2)$, below we substitute into $(2)$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n

$y$

\n
\n

$=$

\n
\n

$\\simplify{{a}/{b}}(\\var{xans})^2$

\n
\n

$=$

\n
\n

$\\simplify{{a*xans^2/b}}$

\n
\n

Therefore the values that satisfy equations $(1)$ and $(2)$ are $x=\\var{xans}$ and $y=\\simplify{{a*xans^2/b}}$.

\n

 

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}], "statement": "", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "preamble": {"css": "", "js": ""}, "variables": {"a": {"definition": "random(-4..4 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "b": {"definition": "random(-12..12 except [a,0,1,-1])", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "yans": {"definition": "a*cubed/b", "templateType": "anything", "group": "Ungrouped variables", "name": "yans", "description": ""}, "xans": {"definition": "random(-12..12 except [0,1] )", "templateType": "anything", "group": "Ungrouped variables", "name": "xans", "description": ""}, "ak": {"definition": "a*cubed", "templateType": "anything", "group": "Ungrouped variables", "name": "ak", "description": ""}, "cubed": {"definition": "xans^3", "templateType": "anything", "group": "Ungrouped variables", "name": "cubed", "description": ""}}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}, {"name": "Simultaneous equations: linear and hyperbola, two points", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "functions": {}, "ungrouped_variables": ["a", "b", "c", "d", "grad", "yint", "num", "quadxcoeff", "quadccoeff", "ansy1", "ansy2", "roots", "root1", "root2"], "tags": ["algebra", "equations", "hyperbola", "quadratic", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations", "system of equations"], "preamble": {"css": "", "js": ""}, "advice": "", "rulesets": {}, "parts": [{"stepsPenalty": "2", "prompt": "

Find the $x$ and $y$ values that satisfy both of the following equations. That is, find the points of intersection of the two curves.

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify{{grad}x+{yint}}$               $(1)$
$y$$=$$\\simplify{{num}/x+{d}}$               $(2)$
\n

$x_1=$ [[0]],   $y_1=$ [[1]] and $x_2=$ [[2]], $y_2=$ [[3]]

\n

Note: To input your answer please ensure that $x_1<x_2$.

\n

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "gaps": [{"allowFractions": true, "variableReplacements": [], "maxValue": "root1", "minValue": "root1", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "ansy1", "minValue": "ansy1", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "root2", "minValue": "root2", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}, {"allowFractions": true, "variableReplacements": [], "maxValue": "ansy2", "minValue": "ansy2", "variableReplacementStrategy": "originalfirst", "correctAnswerFraction": true, "showCorrectAnswer": true, "scripts": {}, "marks": 1, "type": "numberentry", "showPrecisionHint": false}], "steps": [{"prompt": "

Given

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify{{grad}x+{yint}}$               $(1)$
$y$$=$$\\simplify{{num}/x+{d}}$               $(2)$
\n

substitute the expression for $y$ given in $(1)$ into $(2)$:
\\[\\simplify{{grad}x+{yint} ={num}/x+{d}}\\]

\n

To get rid of the $x$ in the denominator, let us multiply both sides by $x$
\\[\\simplify{{grad}x^2+{yint}x ={num}+{d}x}\\]

\n

Notice this equation is a quadratic, we put everything on one side

\n

\\[\\simplify{{grad}x^2+{yint-d}x -{num}=0}\\]

\n

There are various ways to solve a quadratic, in this particular case we can factorise the quadratic:

\n

\\[(\\simplify{{a}x+{b}})(\\simplify{x+{c}})=0\\]

\n

Therefore, $x=\\simplify{{-b}/{a}},\\,\\var{-c}$.

\n


Now for $x=\\simplify[fractionnumbers]{{root1}}$, we can determine the corresponding $y$ value by substituting $x=\\simplify[fractionnumbers]{{root1}}$ into either equation $(1)$ or $(2)$. Below we substitute into $(1)$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify[!collectnumbers,fractionnumbers]{{grad}({root1})+{yint}}$
$=$$\\var{ansy1}$
\n

Now for $x=\\simplify[fractionnumbers]{{root2}}$, so we can determine the corresponding $y$ value by substituting $x=\\simplify[fractionnumbers]{{root2}}$ into either equation $(1)$ or $(2)$. Below we substitute into $(1)$:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify[!collectnumbers,fractionnumbers]{{grad}({root2})+{yint}}$
$=$$\\var{ansy2}$
\n

Therefore the values that satisfy equations $(1)$ and $(2)$ are $x_1=\\simplify[fractionnumbers]{{root1}}$, $y_1=\\var{ansy1}$ and $x_2=\\simplify[fractionnumbers]{{root1}}$, $y_2=\\var{ansy2}$.

\n

In other words, the two curves intersect at the points $\\left(\\simplify[fractionnumbers]{{root1}},\\var{ansy1}\\right)$ and $\\left(\\simplify[fractionnumbers]{{root2}},\\var{ansy2}\\right)$.

", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "scripts": {}, "marks": 0, "type": "information"}], "scripts": {}, "marks": 0, "showCorrectAnswer": true, "type": "gapfill"}], "statement": "", "variable_groups": [], "variablesTest": {"maxRuns": 100, "condition": ""}, "variables": {"a": {"definition": "random(2,3,4,5)", "templateType": "anything", "group": "Ungrouped variables", "name": "a", "description": ""}, "c": {"definition": "random(-12..12 except [b/a,0])", "templateType": "anything", "group": "Ungrouped variables", "name": "c", "description": ""}, "b": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "b", "description": ""}, "quadxcoeff": {"definition": "yint-d", "templateType": "anything", "group": "Ungrouped variables", "name": "quadxcoeff", "description": ""}, "d": {"definition": "random(-12..12 except 0)", "templateType": "anything", "group": "Ungrouped variables", "name": "d", "description": ""}, "yint": {"definition": "a*c+b+d", "templateType": "anything", "group": "Ungrouped variables", "name": "yint", "description": ""}, "grad": {"definition": "a", "templateType": "anything", "group": "Ungrouped variables", "name": "grad", "description": ""}, "quadccoeff": {"definition": "-num", "templateType": "anything", "group": "Ungrouped variables", "name": "quadccoeff", "description": ""}, "num": {"definition": "-b*c", "templateType": "anything", "group": "Ungrouped variables", "name": "num", "description": ""}, "ansy2": {"definition": "grad*(root2)+yint", "templateType": "anything", "group": "Ungrouped variables", "name": "ansy2", "description": ""}, "ansy1": {"definition": "grad*(root1)+yint", "templateType": "anything", "group": "Ungrouped variables", "name": "ansy1", "description": ""}, "root1": {"definition": "roots[0]", "templateType": "anything", "group": "Ungrouped variables", "name": "root1", "description": ""}, "roots": {"definition": "sort([-b/a,-c])", "templateType": "anything", "group": "Ungrouped variables", "name": "roots", "description": ""}, "root2": {"definition": "roots[1]", "templateType": "anything", "group": "Ungrouped variables", "name": "root2", "description": ""}}, "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "type": "question", "showQuestionGroupNames": false, "question_groups": [{"name": "", "pickingStrategy": "all-ordered", "pickQuestions": 0, "questions": []}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "extensions": [], "custom_part_types": [], "resources": []}