// Numbas version: finer_feedback_settings {"name": "Simultaneous equations", "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "duration": 0, "percentPass": 0, "showQuestionGroupNames": false, "shuffleQuestionGroups": false, "showstudentname": true, "question_groups": [{"name": "Group", "pickingStrategy": "all-ordered", "pickQuestions": 1, "questionNames": ["", "", "", "", "", "", "", "", ""], "variable_overrides": [[], [], [], [], [], [], [], [], []], "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/"}], "tags": ["algebra", "Algebra", "equations", "Linear equations", "linear equations", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations", "system of equations"], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"htk": {"name": "htk", "group": "part b", "definition": "random(1..abs(xbans*kfmgj-1))", "description": "", "templateType": "anything", "can_override": false}, "primes": {"name": "primes", "group": "part b", "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]", "description": "", "templateType": "anything", "can_override": false}, "kfmgj": {"name": "kfmgj", "group": "part b", "definition": "random(-12..12 except [-1,0,1])", "description": "
m signifies 'minus'
", "templateType": "anything", "can_override": false}, "xans": {"name": "xans", "group": "part a", "definition": "random(-10..10)", "description": "", "templateType": "anything", "can_override": false}, "gtj": {"name": "gtj", "group": "part b", "definition": "-kfmgj+ktf", "description": "", "templateType": "anything", "can_override": false}, "gtl": {"name": "gtl", "group": "part b", "definition": "xbans*kfmgj+htk", "description": "", "templateType": "anything", "can_override": false}, "ycans": {"name": "ycans", "group": "part c", "definition": "(q*p-s*m)/(r*m-n*q)", "description": "", "templateType": "anything", "can_override": false}, "xcans": {"name": "xcans", "group": "part c", "definition": "(n*s-p*r)/(r*m-n*q)", "description": "", "templateType": "anything", "can_override": false}, "f": {"name": "f", "group": "part b", "definition": "ktf/k", "description": "", "templateType": "anything", "can_override": false}, "dmb": {"name": "dmb", "group": "part a", "definition": "xans*(a-c)", "description": "", "templateType": "anything", "can_override": false}, "xbans": {"name": "xbans", "group": "part b", "definition": "random(-21..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "part a", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "part a", "definition": "random(-12..12 except [a,0])", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "part a", "definition": "d-dmb", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "part a", "definition": "random(1..dmb)", "description": "", "templateType": "anything", "can_override": false}, "g": {"name": "g", "group": "part b", "definition": "gcd(gtl,gtj)", "description": "gcd(gtl,gtj)
", "templateType": "anything", "can_override": false}, "yans": {"name": "yans", "group": "part a", "definition": "a*(d-b)/(a-c)+b", "description": "", "templateType": "anything", "can_override": false}, "h": {"name": "h", "group": "part b", "definition": "htk/k", "description": "", "templateType": "anything", "can_override": false}, "k": {"name": "k", "group": "part b", "definition": "gcd(htk,ktf)", "description": "old version if(factorise(abs(ktf))[len(factorise(abs(ktf)))-1]=0,1,primes[len(factorise(abs(ktf)))-1])
", "templateType": "anything", "can_override": false}, "j": {"name": "j", "group": "part b", "definition": "gtj/g", "description": "", "templateType": "anything", "can_override": false}, "m": {"name": "m", "group": "part c", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "l": {"name": "l", "group": "part b", "definition": "gtl/g", "description": "", "templateType": "anything", "can_override": false}, "n": {"name": "n", "group": "part c", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "q": {"name": "q", "group": "part c", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "p": {"name": "p", "group": "part c", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "part c", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "r": {"name": "r", "group": "part c", "definition": "random(-12..12 except [0,ceil(n*q/m),floor(n*q/m)])", "description": "", "templateType": "anything", "can_override": false}, "ybans": {"name": "ybans", "group": "part b", "definition": "(j*h-l*f)/(kfmgj)", "description": "", "templateType": "anything", "can_override": false}, "ktf": {"name": "ktf", "group": "part b", "definition": "random(1..abs(kfmgj-1))", "description": "t signifies 'times'
", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": [], "variable_groups": [{"name": "part a", "variables": ["xans", "a", "c", "dmb", "b", "d", "yans"]}, {"name": "part b", "variables": ["primes", "kfmgj", "ktf", "gtj", "xbans", "htk", "gtl", "g", "j", "l", "k", "f", "h", "ybans"]}, {"name": "part c", "variables": ["m", "n", "p", "q", "r", "s", "xcans", "ycans"]}], "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": "Find the $x$ and $y$ values that satisfy both of the following equations.
\n| $y$ | \n$=$ | \n$\\simplify{{a}x+{b}}$ | \n$(1)$ | \n
| $y$ | \n$=$ | \n$\\simplify{{c}x+{d}}$ | \n$(2)$ | \n
$x=$ [[0]], $y=$ [[1]]
\n", "stepsPenalty": "2", "steps": [{"type": "information", "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": "There are many ways to solve these equations simultaneously. Here is one method.
\n| $y$ | \n$=$ | \n$\\simplify{{a}x+{b}}$ | \n$(1)$ | \n
| $y$ | \n$=$ | \n$\\simplify{{c}x+{d}}$ | \n$(2)$ | \n
Substitute the expression for $y$ given in $(1)$ into $(2)$:
\\[\\simplify{{a}x+{b} ={c}x+{d}}\\]
Collect like terms:
\\[\\simplify{{a-c}x={d-b}}\\]
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)$:
| $y$ | \n$=$ | \n$\\simplify[!collectnumbers]{{a}({xans})+{b}}$ | \n
| \n | $=$ | \n$\\var{yans}$ | \n
Therefore the values that satisfy equations $(1)$ and $(2)$ are $x=\\var{xans}$ and $y=\\var{yans}$.
"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "xans", "maxValue": "xans", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "yans", "maxValue": "yans", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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": "Solve the following simultaneous equations.
\n| $\\simplify{{f}x+{g}y}$ | \n$=$ | \n$\\var{-h}$ | \n$(3)$ | \n
| $\\simplify{{j}x+{k}y}$ | \n$=$ | \n$\\var{-l}$ | \n$(4)$ | \n
$x=$ [[0]], $y=$ [[1]]
\n", "stepsPenalty": "2", "steps": [{"type": "information", "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": "There are many ways to solve these equations simultaneously. Here is one method.
\n| $\\simplify{{f}x+{g}y}$ | \n$=$ | \n$\\var{-h}$ | \n$(3)$ | \n
| $\\simplify{{j}x+{k}y}$ | \n$=$ | \n$\\var{-l}$ | \n$(4)$ | \n
Solve one of the equations for one of the variables. Here we solve equation $(3)$ for $y$:
\n\\begin{align}\\var{g}y&=\\simplify{{-h}-{f}x}\\\\y&=\\simplify{({-h}-{f}x)/({g})}\\quad(5)\\end{align}
\n\\begin{align}y&=\\simplify{({-h}-{f}x)/({g})}\\quad(5)\\end{align}
\nSubstitute this expression for $y$ given in $(5)$ into $(4)$:
\n\\[\\simplify[all,!collectnumbers]{{j}x+{k}(({-h}-{f}x)/({g})) = {-l}}\\]
\nCollect like terms:
\\[\\simplify[fractionnumbers]{{j-f*k/g}x={-l+h*k/g}}\\]
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)$:
\\begin{align}y&=\\simplify[unitdenominator,!collectnumbers]{({-h}-{f}({xbans}))/({g})}\\\\&=\\var{ybans}\\end{align}
\nTherefore the values that satisfy equations $(3)$ and $(4)$ are $x=\\var{xbans}$ and $y=\\var{ybans}$.
"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "xbans", "maxValue": "xbans", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ybans", "maxValue": "ybans", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}, {"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": "Solve the following system of equations.
\n| $\\simplify{{m}a+{n}b+{p}}$ | \n$=$ | \n$0$ | \n$(5)$ | \n
| $\\simplify{{q}a+{r}b+{s}}$ | \n$=$ | \n$0$ | \n$(6)$ | \n
$a=$ [[0]], $b=$ [[1]]
\n", "stepsPenalty": "2", "steps": [{"type": "information", "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": "There are many ways to solve these equations simultaneously. Here is one method.
\n| $\\simplify{{m}a+{n}b+{p}}$ | \n$=$ | \n$0$ | \n$(5)$ | \n
| $\\simplify{{q}a+{r}b+{s}}$ | \n$=$ | \n$0$ | \n$(6)$ | \n
Solve one of the equations for one of the variables. Here we solve equation $(5)$ for $b$:
\n| $\\var{n}b$ | \n$=$ | \n$\\simplify{{-m}a+{-p}}$ | \n\n |
| \n | \n | \n | \n |
| $b$ | \n$=$ | \n$\\displaystyle{\\simplify{({-m}a+{-p})/({n})}}$ | \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}\\]
\nCollect like terms:
\\[\\simplify[fractionnumbers]{{q-r*m/n}a={-s+r*p/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)$:
| $b$ | \n$=$ | \n$\\displaystyle{\\simplify[unitdenominator,!collectnumbers,fractionnumbers]{({-m}*({xcans})+{-p})/({n})}}$ | \n
| \n | \n | \n |
| \n | $=$ | \n$\\simplify[fractionnumbers]{{ycans}}$ | \n
Therefore the values that satisfy equations $(5)$ and $(6)$ are $a=\\simplify[fractionnumbers]{{xcans}}$ and $b=\\simplify[fractionnumbers]{{ycans}}$.
"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "xcans", "maxValue": "xcans", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ycans", "maxValue": "ycans", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"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/"}], "tags": ["algebra", "Algebra", "equations", "quadratic", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations", "system of equations"], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"quadxcoeff": {"name": "quadxcoeff", "group": "Ungrouped variables", "definition": "sroots+grad", "description": "", "templateType": "anything", "can_override": false}, "ansyvalue": {"name": "ansyvalue", "group": "Ungrouped variables", "definition": "grad*root1+yint", "description": "", "templateType": "anything", "can_override": false}, "yint": {"name": "yint", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "can_override": false}, "root1": {"name": "root1", "group": "Ungrouped variables", "definition": "random(-12..12)", "description": "", "templateType": "anything", "can_override": false}, "proots": {"name": "proots", "group": "Ungrouped variables", "definition": "root1*root2", "description": "", "templateType": "anything", "can_override": false}, "quadccoeff": {"name": "quadccoeff", "group": "Ungrouped variables", "definition": "proots+yint", "description": "", "templateType": "anything", "can_override": false}, "sroots": {"name": "sroots", "group": "Ungrouped variables", "definition": "-root1-root2", "description": "", "templateType": "anything", "can_override": false}, "grad": {"name": "grad", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "can_override": false}, "root2": {"name": "root2", "group": "Ungrouped variables", "definition": "root1", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["root1", "root2", "grad", "sroots", "proots", "yint", "quadxcoeff", "quadccoeff", "ansyvalue"], "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": "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| $y$ | \n$=$ | \n$\\simplify{{grad}x+{yint}}$ | \n$(1)$ | \n
| $y$ | \n$=$ | \n$\\simplify{x^2+{quadxcoeff}x+{quadccoeff}}$ | \n$(2)$ | \n
$x=$ [[0]], $y=$ [[1]]
\n", "stepsPenalty": "2", "steps": [{"type": "information", "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": "There are many ways to solve these equations simultaneously. Here is one method.
\n| $y$ | \n$=$ | \n$\\simplify{{grad}x+{yint}}$ | \n$(1)$ | \n
| $y$ | \n$=$ | \n$\\simplify{x^2+{quadxcoeff}x+{quadccoeff}}$ | \n$(2)$ | \n
Substitute the expression for $y$ given in $(1)$ into $(2)$:
\\[\\simplify{{grad}x+{yint} =x^2+{quadxcoeff}x+{quadccoeff}}\\]
Since we have a quadratic here we get everything onto one side:
\\[0=\\simplify{x^2+{sroots}x+{proots}}\\]
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\\]
\nTherefore, $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)$:
| $y$ | \n$=$ | \n$\\simplify[!collectnumbers]{{grad}({root1})+{yint}}$ | \n
| \n | $=$ | \n$\\var{ansyvalue}$ | \n
Therefore the values that satisfy equations $(1)$ and $(2)$ are $x=\\var{root1}$ and $y=\\var{ansyvalue}$.
"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "root1", "maxValue": "root1", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "ansyvalue", "maxValue": "ansyvalue", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"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/"}], "tags": ["algebra", "Algebra", "equations", "quadratic", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations", "system of equations"], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"quadxcoeff": {"name": "quadxcoeff", "group": "Ungrouped variables", "definition": "sroots+grad", "description": "", "templateType": "anything", "can_override": false}, "yint": {"name": "yint", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "can_override": false}, "root1": {"name": "root1", "group": "Ungrouped variables", "definition": "roots[0]", "description": "", "templateType": "anything", "can_override": false}, "proots": {"name": "proots", "group": "Ungrouped variables", "definition": "root1*root2", "description": "", "templateType": "anything", "can_override": false}, "quadccoeff": {"name": "quadccoeff", "group": "Ungrouped variables", "definition": "proots+yint", "description": "", "templateType": "anything", "can_override": false}, "ansy2": {"name": "ansy2", "group": "Ungrouped variables", "definition": "grad*root2+yint", "description": "", "templateType": "anything", "can_override": false}, "sroots": {"name": "sroots", "group": "Ungrouped variables", "definition": "-root1-root2", "description": "", "templateType": "anything", "can_override": false}, "ansy1": {"name": "ansy1", "group": "Ungrouped variables", "definition": "grad*root1+yint", "description": "", "templateType": "anything", "can_override": false}, "grad": {"name": "grad", "group": "Ungrouped variables", "definition": "random(-6..6 except 0)", "description": "", "templateType": "anything", "can_override": false}, "roots": {"name": "roots", "group": "Ungrouped variables", "definition": "sort(shuffle(-12..12)[0..2])", "description": "", "templateType": "anything", "can_override": false}, "root2": {"name": "root2", "group": "Ungrouped variables", "definition": "roots[1]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["roots", "root1", "root2", "grad", "sroots", "proots", "yint", "quadxcoeff", "quadccoeff", "ansy1", "ansy2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "marked_original_order (Mark the gaps in the original order, mainly to establish if every gap has a valid answer):\n map(\n mark_part(gap[\"path\"],studentAnswer),\n [gap,studentAnswer],\n zip(gaps,studentAnswer)\n )\n \ninterpreted_answers (The interpreted answers for each gap, in the original order):\n map(\n res[\"values\"][\"interpreted_answer\"],\n res,\n marked_original_order\n )\n \nanswers (The student's answers to each gap): interpreted_answers\n \ngap_feedback (Feedback on each of the gaps):\n map(\n try(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n gap, gaps[gap_number],\n name, gap[\"name\"],\n noFeedbackIcon, not gap[\"settings\"][\"showFeedbackIcon\"],\n non_warning_feedback, filter(x[\"op\"]<>\"warning\",x,result[\"feedback\"]),\n assert(noFeedbackIcon,\n assert(name=\"\" or len(gaps)=1 or len(non_warning_feedback)=0,feedback(translate('part.gapfill.feedback header',[\"name\": name])))\n );\n concat_feedback(non_warning_feedback, if(marks>0,result[\"marks\"]/marks,1/len(gaps)), noFeedbackIcon);\n result\n ),\n err,\n fail(translate(\"part.gapfill.error marking gap\",[\"name\": gaps[gap_number][\"name\"], \"message\": err]))\n ),\n [gap_number, answer_number],\n zip(gap_adaptive_order, gap_adaptive_order)\n )\n \nall_valid (Are the answers to all of the gaps valid?):\n all(map(res[\"valid\"], res, marked_original_order))\n \ncheck_answers:\nif(\n answers[2]=answers[0],\n sub_credit(1/2, \"Numbers cannot be the same. \"),\n feedback(\"\")\n)\n \nmark:\n assert(all_valid or not settings[\"sortAnswers\"], fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(check_answers);\n apply(gap_feedback)\n \ninterpreted_answer:\n answers\n \npre_submit:\n map(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n check_pre_submit(gaps[gap_number][\"path\"], answer, exec_path)\n ),\n [gap_number,answer_number],\n zip(gap_order,answer_order)\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "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| $y$ | \n$=$ | \n$\\simplify{{grad}x+{yint}}$ | \n$(1)$ | \n
| $y$ | \n$=$ | \n$\\simplify{x^2+{quadxcoeff}x+{quadccoeff}}$ | \n$(2)$ | \n
$x_1=$ [[0]], $y_1=$ [[1]] and $x_2=$ [[2]], $y_2=$ [[3]]
\n", "stepsPenalty": "4", "steps": [{"type": "information", "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": "There are many ways to solve these equations simultaneously. Here is one method.
\n| $y$ | \n$=$ | \n$\\simplify{{grad}x+{yint}}$ | \n$(1)$ | \n
| $y$ | \n$=$ | \n$\\simplify{x^2+{quadxcoeff}x+{quadccoeff}}$ | \n$(2)$ | \n
Substitute the expression for $y$ given in $(1)$ into $(2)$:
\\[\\simplify{{grad}x+{yint} =x^2+{quadxcoeff}x+{quadccoeff}}\\]
Since we have a quadratic here we get everything onto one side:
\\[0=\\simplify{x^2+{sroots}x+{proots}}\\]
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\\]
\nTherefore, $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)$:
| $y$ | \n$=$ | \n$\\simplify[!collectnumbers]{{grad}({root1})+{yint}}$ | \n
| \n | $=$ | \n$\\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| $y$ | \n$=$ | \n$\\simplify[!collectnumbers]{{grad}({root2})+{yint}}$ | \n
| \n | $=$ | \n$\\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}$.
\nIn other words, the two curves intersect at the points $(\\var{root1},\\var{ansy1})$ and $(\\var{root2},\\var{ansy2})$.
"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "root2", "maxValue": "root2", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "root1", "maxValue": "root1", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansy2", "maxValue": "ansy2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansy1", "maxValue": "ansy1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "root1", "maxValue": "root1", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "root2", "maxValue": "root2", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansy1", "maxValue": "ansy1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansy2", "maxValue": "ansy2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Simultaneous equations: quadratic 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/"}], "tags": ["algebra", "Algebra", "equations", "quadratic", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations", "system of equations"], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"root1": {"name": "root1", "group": "Ungrouped variables", "definition": "roots[0]", "description": "", "templateType": "anything", "can_override": false}, "proots": {"name": "proots", "group": "Ungrouped variables", "definition": "root1*root2", "description": "", "templateType": "anything", "can_override": false}, "ansy2": {"name": "ansy2", "group": "Ungrouped variables", "definition": "a2*root2^2+b2*root2+c2", "description": "", "templateType": "anything", "can_override": false}, "sroots": {"name": "sroots", "group": "Ungrouped variables", "definition": "-root1-root2", "description": "", "templateType": "anything", "can_override": false}, "ansy1": {"name": "ansy1", "group": "Ungrouped variables", "definition": "a2*root1^2+b2*root1+c2", "description": "", "templateType": "anything", "can_override": false}, "roots": {"name": "roots", "group": "Ungrouped variables", "definition": "sort(shuffle(-12..12)[0..2])", "description": "", "templateType": "anything", "can_override": false}, "root2": {"name": "root2", "group": "Ungrouped variables", "definition": "roots[1]", "description": "", "templateType": "anything", "can_override": false}, "a1": {"name": "a1", "group": "Ungrouped variables", "definition": "1+a2", "description": "", "templateType": "anything", "can_override": false}, "a2": {"name": "a2", "group": "Ungrouped variables", "definition": "random(-4..3#0.5 except [-1,0])", "description": "", "templateType": "anything", "can_override": false}, "b2": {"name": "b2", "group": "Ungrouped variables", "definition": "random(-10..10)-max(root1,root2)", "description": "", "templateType": "anything", "can_override": false}, "b1": {"name": "b1", "group": "Ungrouped variables", "definition": "b2-root1-root2", "description": "", "templateType": "anything", "can_override": false}, "c2": {"name": "c2", "group": "Ungrouped variables", "definition": "if(proots=0, \n random(-12..12),\n random(-proots..0))", "description": "", "templateType": "anything", "can_override": false}, "c1": {"name": "c1", "group": "Ungrouped variables", "definition": "proots+c2", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["roots", "root1", "root2", "sroots", "proots", "a2", "a1", "b2", "b1", "c2", "c1", "ansy1", "ansy2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "marked_original_order (Mark the gaps in the original order, mainly to establish if every gap has a valid answer):\n map(\n mark_part(gap[\"path\"],studentAnswer),\n [gap,studentAnswer],\n zip(gaps,studentAnswer)\n )\n \ninterpreted_answers (The interpreted answers for each gap, in the original order):\n map(\n res[\"values\"][\"interpreted_answer\"],\n res,\n marked_original_order\n )\n \nanswers (The student's answers to each gap): interpreted_answers\n \ngap_feedback (Feedback on each of the gaps):\n map(\n try(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n gap, gaps[gap_number],\n name, gap[\"name\"],\n noFeedbackIcon, not gap[\"settings\"][\"showFeedbackIcon\"],\n non_warning_feedback, filter(x[\"op\"]<>\"warning\",x,result[\"feedback\"]),\n assert(noFeedbackIcon,\n assert(name=\"\" or len(gaps)=1 or len(non_warning_feedback)=0,feedback(translate('part.gapfill.feedback header',[\"name\": name])))\n );\n concat_feedback(non_warning_feedback, if(marks>0,result[\"marks\"]/marks,1/len(gaps)), noFeedbackIcon);\n result\n ),\n err,\n fail(translate(\"part.gapfill.error marking gap\",[\"name\": gaps[gap_number][\"name\"], \"message\": err]))\n ),\n [gap_number, answer_number],\n zip(gap_adaptive_order, gap_adaptive_order)\n )\n \nall_valid (Are the answers to all of the gaps valid?):\n all(map(res[\"valid\"], res, marked_original_order))\n \ncheck_answers:\nif(\n answers[2]=answers[0],\n sub_credit(1/2, \"Numbers cannot be the same. \"),\n feedback(\"\")\n)\n \nmark:\n assert(all_valid or not settings[\"sortAnswers\"], fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(check_answers);\n apply(gap_feedback)\n \ninterpreted_answer:\n answers\n \npre_submit:\n map(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n check_pre_submit(gaps[gap_number][\"path\"], answer, exec_path)\n ),\n [gap_number,answer_number],\n zip(gap_order,answer_order)\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "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$\\begin{align}y&=\\simplify{{a1}x^2+{b1}x+{c1}}\\tag{1}\\\\y&=\\simplify{{a2}x^2+{b2}x+{c2}}\\tag{2}\\end{align}$
\n\n$x_1=$ [[0]], $y_1=$ [[1]] and $x_2=$ [[2]], $y_2=$ [[3]]
\n", "stepsPenalty": "4", "steps": [{"type": "information", "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": "There are many ways to solve these equations simultaneously. Here is one method.
\n$\\begin{align}y&=\\simplify[fractionnumbers]{{a1}x^2+{b1}x+{c1}}\\tag{1}\\\\y&=\\simplify[fractionnumbers]{{a2}x^2+{b2}x+{c2}}\\tag{2}\\end{align}$
\nSubstitute the expression for $y$ given in $(1)$ into $(2)$:
\\[\\simplify[fractionnumbers]{{a1}x^2+{b1}x+{c1}} =\\simplify[fractionnumbers]{{a2}x^2+{b2}x+{c2}}\\]
Since we have a quadratic here we get everything onto one side:
\\[\\simplify{x^2+{sroots}x+{proots}}=0\\]
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\\]
\nTherefore, $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 $(2)$:
| $y$ | \n$=$ | \n$\\simplify[!collectnumbers, fractionnumbers]{{a2}*{root1}^2+{b2}*{root1}+{c2}}$ | \n
| \n | $=$ | \n$\\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 $(2)$:
\n| $y$ | \n$=$ | \n$\\simplify[!collectnumbers, fractionnumbers]{{a2}*{root2}^2+{b2}*{root2}+{c2}}$ | \n
| \n | $=$ | \n$\\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}$.
\nIn other words, the two curves intersect at the points $(\\var{root1},\\var{ansy1})$ and $(\\var{root2},\\var{ansy2})$.
"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "root2", "maxValue": "root2", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "root1", "maxValue": "root1", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansy2", "maxValue": "ansy2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansy1", "maxValue": "ansy1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "root1", "maxValue": "root1", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "root2", "maxValue": "root2", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansy1", "maxValue": "ansy1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansy2", "maxValue": "ansy2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Simultaneous equations: circle and line, 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/"}], "tags": ["algebra", "Algebra", "equations", "quadratic", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations", "system of equations"], "metadata": {"description": "This uses formulas from http://ambrnet.com/TrigoCalc/Circles2/circle2intersection/CircleCircleIntersection.htm
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"ansy2": {"name": "ansy2", "group": "Ungrouped variables", "definition": "rational((b+d)/2+(d-b)*(r0^2-r1^2)/(2bigD^2)-2*sgn(b)*(a-c)*delta/bigD^2)", "description": "", "templateType": "anything", "can_override": false}, "ansy1": {"name": "ansy1", "group": "Ungrouped variables", "definition": "rational((b+d)/2+(d-b)*(r0^2-r1^2)/(2bigD^2)+sgn(b)*2*(a-c)*delta/bigD^2)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-t[0]..0)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "a+s[0]", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "b-sgn(b)*s[1]", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(random(-t[1]..-1),random(1..t[1]))", "description": "", "templateType": "anything", "can_override": false}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "t[1]", "description": "", "templateType": "anything", "can_override": false}, "ansx1": {"name": "ansx1", "group": "Ungrouped variables", "definition": "rational((a+c)/2+(c-a)*(r0^2-r1^2)/(2bigD^2)-sgn(b)*2*(b-d)*delta/bigD^2)", "description": "", "templateType": "anything", "can_override": false}, "ansx2": {"name": "ansx2", "group": "Ungrouped variables", "definition": "rational((a+c)/2+(c-a)*(r0^2-r1^2)/(2bigD^2)+2*sgn(b)*(b-d)*delta/bigD^2)", "description": "", "templateType": "anything", "can_override": false}, "r0": {"name": "r0", "group": "Ungrouped variables", "definition": "s[2]", "description": "", "templateType": "anything", "can_override": false}, "triple_temp": {"name": "triple_temp", "group": "Ungrouped variables", "definition": "random([[3,4,5], [5,12,13], [7,24,25]])\n//[8,15,17], [9,40,41]])\n//[11,60,61], [13,84,85]]) \n//[15,112,113], [16,63,65], [12,35,37]\n//[19,180,181], [20,21,29], [20,99,101],\n//[23,264,265], [24,143,145], [25,312,313], [27,364,365], [28,45,53],\n//[28,195,197]])\n//, [31,480,481], [32,255,257], [33,56,65],\n//[33,544,545], [35,612,613], [36,77,85], [36,323,325], [37,684,685],\n//[39,80,89], [40,399,401], [41,840,841], [43,924,925],\n//[44,117,125], [44,483,485], [48,55,73], [48,575,577], [51,140,149],\n//[52,165,173], [52,675,677], [56,783,785], [57,176,185], [60,91,109],\n//[60,221,229], [60,899,901], [65,72,97], [68,285,293], [69,260,269],\n//[75,308,317], [76,357,365], [84,187,205], [84,437,445], [85,132,157],\n//[87,416,425], [88,105,137], [92,525,533], [93,476,485], [95,168,193],\n//[96,247,265], [100,621,629], [104,153,185], [105,208,233], [105,608,617],)", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random([scalar*triple_temp[0], scalar*triple_temp[1], scalar*triple_temp[2]],[scalar*triple_temp[1], scalar*triple_temp[0], scalar*triple_temp[2]])", "description": "", "templateType": "anything", "can_override": false}, "scalar": {"name": "scalar", "group": "Ungrouped variables", "definition": "random(1,2,3,4)", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "[2*s[0],2*s[1],2*s[2]]", "description": "", "templateType": "anything", "can_override": false}, "bigD": {"name": "bigD", "group": "Ungrouped variables", "definition": "r0", "description": "using formulas from http://ambrnet.com/TrigoCalc/Circles2/circle2intersection/CircleCircleIntersection.htm
", "templateType": "anything", "can_override": false}, "delta": {"name": "delta", "group": "Ungrouped variables", "definition": "t[0]*t[1]/4", "description": "", "templateType": "anything", "can_override": false}, "r2": {"name": "r2", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything", "can_override": false}, "cx": {"name": "cx", "group": "Ungrouped variables", "definition": "((2*a-2*c)/(-2*b+2*d))", "description": "", "templateType": "anything", "can_override": false}, "cc": {"name": "cc", "group": "Ungrouped variables", "definition": "(r0^2-r1^2-(a^2-c^2+b^2-d^2))/(-2*b+2*d)}-{b}", "description": "", "templateType": "anything", "can_override": false}, "denom": {"name": "denom", "group": "Ungrouped variables", "definition": "rational_approximation(1+cx^2)[1]", "description": "", "templateType": "anything", "can_override": false}, "quadc": {"name": "quadc", "group": "Ungrouped variables", "definition": "rational(denom*(a^2+cc^2-r0^2))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "bigD<50\n", "maxRuns": 100}, "ungrouped_variables": ["triple_temp", "scalar", "s", "t", "r0", "r1", "a", "c", "b", "d", "ansy1", "ansy2", "ansx1", "ansx2", "bigD", "delta", "r2", "cx", "cc", "denom", "quadc"], "variable_groups": [{"name": "Unnamed group", "variables": []}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "marked_original_order (Mark the gaps in the original order, mainly to establish if every gap has a valid answer):\n map(\n mark_part(gap[\"path\"],studentAnswer),\n [gap,studentAnswer],\n zip(gaps,studentAnswer)\n )\n \ninterpreted_answers (The interpreted answers for each gap, in the original order):\n map(\n res[\"values\"][\"interpreted_answer\"],\n res,\n marked_original_order\n )\n \nanswers (The student's answers to each gap): interpreted_answers\n \ngap_feedback (Feedback on each of the gaps):\n map(\n try(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n gap, gaps[gap_number],\n name, gap[\"name\"],\n noFeedbackIcon, not gap[\"settings\"][\"showFeedbackIcon\"],\n non_warning_feedback, filter(x[\"op\"]<>\"warning\",x,result[\"feedback\"]),\n assert(noFeedbackIcon,\n assert(name=\"\" or len(gaps)=1 or len(non_warning_feedback)=0,feedback(translate('part.gapfill.feedback header',[\"name\": name])))\n );\n concat_feedback(non_warning_feedback, if(marks>0,result[\"marks\"]/marks,1/len(gaps)), noFeedbackIcon);\n result\n ),\n err,\n fail(translate(\"part.gapfill.error marking gap\",[\"name\": gaps[gap_number][\"name\"], \"message\": err]))\n ),\n [gap_number, answer_number],\n zip(gap_adaptive_order, gap_adaptive_order)\n )\n \nall_valid (Are the answers to all of the gaps valid?):\n all(map(res[\"valid\"], res, marked_original_order))\n \ncheck_answers:\nif(\n answers[2]=answers[0],\n sub_credit(1/2, \"Numbers cannot be the same. \"),\n feedback(\"\")\n)\n \nmark:\n assert(all_valid or not settings[\"sortAnswers\"], fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(check_answers);\n apply(gap_feedback)\n \ninterpreted_answer:\n answers\n \npre_submit:\n map(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n check_pre_submit(gaps[gap_number][\"path\"], answer, exec_path)\n ),\n [gap_number,answer_number],\n zip(gap_order,answer_order)\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Find the $x$ and $y$ values that satisfy both of the following equations. That is, find the points of intersection of the circle and the line.
\n$\\begin{align}\\simplify{(x-{a})^2+(y-{b})^2}&=\\var{r0^2}\\tag{1}\\\\
y&=\\simplify[fractionnumbers]{{(2*a-2*c)/(-2*b+2*d)}x+{(r0^2-r1^2-(a^2-c^2+b^2-d^2))/(-2*b+2*d)}}\\tag{2}\\end{align}$
$x_1=$[[0]], $y_1=$[[1]] and $x_2=$[[2]], $y_2=$[[3]]
\n", "stepsPenalty": "4", "steps": [{"type": "information", "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": "$\\begin{align}\\simplify{(x-{a})^2+(y-{b})^2}&=\\var{r0^2}\\tag{1}\\\\
y&=\\simplify[fractionnumbers]{{(2*a-2*c)/(-2*b+2*d)}x+{(r0^2-r1^2-(a^2-c^2+b^2-d^2))/(-2*b+2*d)}}\\tag{2}\\end{align}$
We will substitute equation 2 into equation 1 to eliminate the $y$ variable and find values for $x$:
\n$\\begin{align}
\\simplify{(x-{a})^2+(y-{b})^2}&=\\var{r0^2}\\\\
\\simplify[fractionnumbers,all]{(x-{a})^2+({(2*a-2*c)/(-2*b+2*d)}x+{(r0^2-r1^2-(a^2-c^2+b^2-d^2))/(-2*b+2*d)}-{b})^2}&=\\var{r0^2}\\end{align}$
We expand the brackets, get everything on the left-hand side and collect like terms to have:
\n$\\begin{align}
\\simplify[fractionnumbers]{x^2-{2a}x+{a^2}+{cx^2}x^2+{2*cx*cc}x+{cc^2}}&=\\var{r0^2}\\\\
\\simplify[fractionnumbers]{x^2-{2a}x+{a^2}+{cx^2}x^2+{2*cx*cc}x+{cc^2}-{r0^2}}&=0\\\\
\\simplify[fractionnumbers, all]{x^2-{2a}x+{a^2}+{cx^2}x^2+{2*cx*cc}x+{cc^2}-{r0^2}}&=0\\\\
\\end{align}$
At this point, we could use the quadratic formula but it's best to tidy up our quadratic equation by multiplying each term by the largest denominator to remove the fractions. So we multiply both sides of the equation by $\\var{denom}$:
\n\\[\\simplify[fractionnumbers, all]{{denom*(1+cx^2)}x^2+{denom*(-2a+2*cx*cc)}x+{quadc}=0}\\]
\nand then use the quadratic formula to solve the quadratic:
\n$\\begin{align}
x&=\\dfrac{-b\\pm\\sqrt{b^2-4ac}}{2a}\\\\
&=\\dfrac{\\var{-denom*(-2a+2*cx*cc)}\\pm\\sqrt{(\\var{denom*(-2a+2*cx*cc)})^2-4(\\var{denom*(1+cx^2)})(\\var{quadc})}}{2\\times\\var{denom*(1+cx^2)}}\\\\
&=\\dfrac{\\var{-denom*(-2a+2*cx*cc)}\\pm\\sqrt{\\var{(-denom*2a+denom*2*cx*cc)^2-4*(denom+denom*cx^2)*(quadc)}}}{\\var{2*denom*(1+cx^2)}}\\\\
&=\\dfrac{\\var{-denom*(-2a+2*cx*cc)}\\pm\\var{sqrt((denom*(-2a+2*cx*cc))^2-4*denom*(1+cx^2)*quadc)}}{\\var{2*denom*(1+cx^2)}}\\\\
&=\\var[fractionnumbers]{ansx1}, \\, \\var[fractionnumbers]{ansx2}
\\end{align}$
Therefore the values that satisfy equations $(1)$ and $(2)$ are $x_1=\\var[fractionnumbers]{ansx1}$, $y_1=\\var[fractionnumbers]{ansy1}$ and $x_2=\\var[fractionnumbers]{ansx2}$, $y_2=\\var[fractionnumbers]{ansy2}$.
\nIn other words, the circle and the line intersect at the points $(\\var[fractionnumbers]{ansx1},\\var[fractionnumbers]{ansy1})$ and $(\\var[fractionnumbers]{ansx2},\\var[fractionnumbers]{ansy2})$.
"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansx2", "maxValue": "ansx2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansx1", "maxValue": "ansx1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansy2", "maxValue": "ansy2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansy1", "maxValue": "ansy1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansx1", "maxValue": "ansx1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansx2", "maxValue": "ansx2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansy1", "maxValue": "ansy1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansy2", "maxValue": "ansy2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Simultaneous equations: circle and circle, horizontal or vertical, 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/"}], "tags": ["algebra", "Algebra", "equations", "quadratic", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations", "system of equations"], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"ansy2": {"name": "ansy2", "group": "Ungrouped variables", "definition": "if(horizontal=1,b+triple[1],b+triple[0])", "description": "", "templateType": "anything", "can_override": false}, "ansy1": {"name": "ansy1", "group": "Ungrouped variables", "definition": "if(horizontal=1,b-triple[1],b+triple[0])", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-20..10)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "if(horizontal=1,a+triple[0]+t,a)", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "if(horizontal=1,b,b+triple[0]+t)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-20..10)", "description": "", "templateType": "anything", "can_override": false}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "sqrt(t^2+triple[1]^2)", "description": "", "templateType": "anything", "can_override": false}, "ansx1": {"name": "ansx1", "group": "Ungrouped variables", "definition": "if(horizontal=1,a+triple[0],a-triple[1])", "description": "", "templateType": "anything", "can_override": false}, "ansx2": {"name": "ansx2", "group": "Ungrouped variables", "definition": "if(horizontal=1,a+triple[0],a+triple[1])", "description": "", "templateType": "anything", "can_override": false}, "r0": {"name": "r0", "group": "Ungrouped variables", "definition": "triple[2]", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "random(1..r0)", "description": "degenerative pythagorean triad
", "templateType": "anything", "can_override": false}, "horizontal": {"name": "horizontal", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "0 = vertical, 1= horizontal
", "templateType": "anything", "can_override": false}, "triple": {"name": "triple", "group": "Ungrouped variables", "definition": "random([[3,4,5], [5,12,13], [7,24,25] ,[8,15,17], [9,40,41], [11,60,61], [13,84,85]]) ", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["horizontal", "a", "b", "triple", "t", "r1", "r0", "ansx1", "ansx2", "ansy1", "ansy2", "c", "d"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "marked_original_order (Mark the gaps in the original order, mainly to establish if every gap has a valid answer):\n map(\n mark_part(gap[\"path\"],studentAnswer),\n [gap,studentAnswer],\n zip(gaps,studentAnswer)\n )\n \ninterpreted_answers (The interpreted answers for each gap, in the original order):\n map(\n res[\"values\"][\"interpreted_answer\"],\n res,\n marked_original_order\n )\n \nanswers (The student's answers to each gap): interpreted_answers\n \ngap_feedback (Feedback on each of the gaps):\n map(\n try(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n gap, gaps[gap_number],\n name, gap[\"name\"],\n noFeedbackIcon, not gap[\"settings\"][\"showFeedbackIcon\"],\n non_warning_feedback, filter(x[\"op\"]<>\"warning\",x,result[\"feedback\"]),\n assert(noFeedbackIcon,\n assert(name=\"\" or len(gaps)=1 or len(non_warning_feedback)=0,feedback(translate('part.gapfill.feedback header',[\"name\": name])))\n );\n concat_feedback(non_warning_feedback, if(marks>0,result[\"marks\"]/marks,1/len(gaps)), noFeedbackIcon);\n result\n ),\n err,\n fail(translate(\"part.gapfill.error marking gap\",[\"name\": gaps[gap_number][\"name\"], \"message\": err]))\n ),\n [gap_number, answer_number],\n zip(gap_adaptive_order, gap_adaptive_order)\n )\n \nall_valid (Are the answers to all of the gaps valid?):\n all(map(res[\"valid\"], res, marked_original_order))\n \ncheck_answers:\nif(\n answers[2]=answers[0] and answers[1]=answers[3],\n sub_credit(1/2, \"Numbers cannot be the same. \"),\n feedback(\"\")\n)\n \nmark:\n assert(all_valid or not settings[\"sortAnswers\"], fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(check_answers);\n apply(gap_feedback)\n \ninterpreted_answer:\n answers\n \npre_submit:\n map(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n check_pre_submit(gaps[gap_number][\"path\"], answer, exec_path)\n ),\n [gap_number,answer_number],\n zip(gap_order,answer_order)\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "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$\\begin{align}\\simplify{(x-{a})^2+(y-{b})^2}&=\\var{r0^2}\\tag{1}\\\\\\simplify{(x-{c})^2+(y-{d})^2}&=\\var{r1^2}\\tag{2}\\end{align}$
\n\n$x_1=$[[0]], $y_1=$[[1]] and $x_2=$[[2]], $y_2=$[[3]]
\n", "stepsPenalty": "4", "steps": [{"type": "information", "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": "$\\begin{align}\\simplify{(x-{a})^2+(y-{b})^2}&=\\var{r0^2}\\tag{1}\\\\\\simplify{(x-{c})^2+(y-{d})^2}&=\\var{r1^2}\\tag{2}\\end{align}$
\nPerform the subtraction $(1)-(2)$ (by which we mean the left-hand side of equation 1 minus the left-hand side of equation 2 will equal the right-hand side of equation 1 minus the right-hand side of equation 2):
\\[ \\simplify{(x-{a})^2+(y-{b})^2-(x-{c})^2-(y-{d})^2}=\\simplify{{r0^2-r1^2}}\\]
Let's expand and collect like terms:
\\[\\simplify{{-2*a+2*c}x+{-2*b+2*d}y+{a^2-c^2+b^2-d^2}={r0^2-r1^2}}\\]
In this case, we have a linear equation which we can solve:
\n\\[\\simplify[fractionnumbers]{x={ansx1}}\\tag{3}\\]
\n\\[\\simplify[fractionnumbers]{y={ansy1}}\\tag{3}\\]
\nWe will substitute this into equation 1 for this solution to find the corresponding $x$$y$ values. We could also substitute into equation 2 instead.
\n$\\begin{align}\\simplify[!collectnumbers]{({ansx1}-{a})^2+(y-{b})^2}&=\\var{r0^2}\\\\\\simplify{({ansx1}-{a})^2+(y-{b})^2}&=\\var{r0^2}\\\\\\simplify{(y-{b})^2}&=\\var{r0^2-(ansx1-a)^2}\\\\\\simplify{y-{b}}&=\\pm\\sqrt{\\var{r0^2-(ansx1-a)^2}}\\\\\\simplify{y-{b}}&=\\pm\\var{triple[1]}\\\\y&=\\var{b}\\pm\\var{triple[1]}\\\\y&=\\var{ansy1},\\,\\var{ansy2}\\end{align}$
\n$\\begin{align}\\simplify[!collectnumbers]{(x-{a})^2+({ansy1}-{b})^2}&=\\var{r0^2}\\\\\\simplify{(x-{a})^2+({ansy1}-{b})^2}&=\\var{r0^2}\\\\\\simplify{(x-{a})^2}&=\\var{r0^2-(ansy1-b)^2}\\\\\\simplify{x-{a}}&=\\pm\\sqrt{\\var{r0^2-(ansy1-b)^2}}\\\\\\simplify{x-{a}}&=\\pm\\var{triple[1]}\\\\x&=\\var{a}\\pm\\var{triple[1]}\\\\x&=\\var{ansx1},\\,\\var{ansx2}\\end{align}$
\nTherefore the values that satisfy equations $(1)$ and $(2)$ are $x_1=\\var{ansx1}$, $y_1=\\var{ansy1}$ and $x_2=\\var{ansx2}$, $y_2=\\var{ansy2}$.
\nIn other words, the two curves intersect at the points $(\\var{ansx1},\\var{ansy1})$ and $(\\var{ansx2},\\var{ansy2})$.
"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansx2", "maxValue": "ansx2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansx1", "maxValue": "ansx1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansy2", "maxValue": "ansy2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansy1", "maxValue": "ansy1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansx1", "maxValue": "ansx1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansx2", "maxValue": "ansx2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansy1", "maxValue": "ansy1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansy2", "maxValue": "ansy2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"name": "Simultaneous equations: circle and circle, diagonal, 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/"}], "tags": ["algebra", "Algebra", "equations", "quadratic", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations", "system of equations"], "metadata": {"description": "This uses formulas from http://ambrnet.com/TrigoCalc/Circles2/circle2intersection/CircleCircleIntersection.htm
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"ansy2": {"name": "ansy2", "group": "Ungrouped variables", "definition": "rational((b+d)/2+(d-b)*(r0^2-r1^2)/(2bigD^2)-2*sgn(b)*(a-c)*delta/bigD^2)", "description": "", "templateType": "anything", "can_override": false}, "ansy1": {"name": "ansy1", "group": "Ungrouped variables", "definition": "rational((b+d)/2+(d-b)*(r0^2-r1^2)/(2bigD^2)+sgn(b)*2*(a-c)*delta/bigD^2)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-t[0]..0)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "a+s[0]", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "b-sgn(b)*s[1]", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(random(-t[1]..-1),random(1..t[1]))", "description": "", "templateType": "anything", "can_override": false}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "t[1]", "description": "", "templateType": "anything", "can_override": false}, "ansx1": {"name": "ansx1", "group": "Ungrouped variables", "definition": "rational((a+c)/2+(c-a)*(r0^2-r1^2)/(2bigD^2)-sgn(b)*2*(b-d)*delta/bigD^2)", "description": "", "templateType": "anything", "can_override": false}, "ansx2": {"name": "ansx2", "group": "Ungrouped variables", "definition": "rational((a+c)/2+(c-a)*(r0^2-r1^2)/(2bigD^2)+2*sgn(b)*(b-d)*delta/bigD^2)", "description": "", "templateType": "anything", "can_override": false}, "r0": {"name": "r0", "group": "Ungrouped variables", "definition": "s[2]", "description": "", "templateType": "anything", "can_override": false}, "triple_temp": {"name": "triple_temp", "group": "Ungrouped variables", "definition": "random([[3,4,5], [5,12,13], [7,24,25]])\n//[8,15,17], [9,40,41]])\n//[11,60,61], [13,84,85]]) \n//[15,112,113], [16,63,65], [12,35,37]\n//[19,180,181], [20,21,29], [20,99,101],\n//[23,264,265], [24,143,145], [25,312,313], [27,364,365], [28,45,53],\n//[28,195,197]])\n//, [31,480,481], [32,255,257], [33,56,65],\n//[33,544,545], [35,612,613], [36,77,85], [36,323,325], [37,684,685],\n//[39,80,89], [40,399,401], [41,840,841], [43,924,925],\n//[44,117,125], [44,483,485], [48,55,73], [48,575,577], [51,140,149],\n//[52,165,173], [52,675,677], [56,783,785], [57,176,185], [60,91,109],\n//[60,221,229], [60,899,901], [65,72,97], [68,285,293], [69,260,269],\n//[75,308,317], [76,357,365], [84,187,205], [84,437,445], [85,132,157],\n//[87,416,425], [88,105,137], [92,525,533], [93,476,485], [95,168,193],\n//[96,247,265], [100,621,629], [104,153,185], [105,208,233], [105,608,617],)", "description": "", "templateType": "anything", "can_override": false}, "s": {"name": "s", "group": "Ungrouped variables", "definition": "random([scalar*triple_temp[0], scalar*triple_temp[1], scalar*triple_temp[2]],[scalar*triple_temp[1], scalar*triple_temp[0], scalar*triple_temp[2]])", "description": "", "templateType": "anything", "can_override": false}, "scalar": {"name": "scalar", "group": "Ungrouped variables", "definition": "random(1,2,3,4)", "description": "", "templateType": "anything", "can_override": false}, "t": {"name": "t", "group": "Ungrouped variables", "definition": "[2*s[0],2*s[1],2*s[2]]", "description": "", "templateType": "anything", "can_override": false}, "bigD": {"name": "bigD", "group": "Ungrouped variables", "definition": "r0", "description": "using formulas from http://ambrnet.com/TrigoCalc/Circles2/circle2intersection/CircleCircleIntersection.htm
", "templateType": "anything", "can_override": false}, "delta": {"name": "delta", "group": "Ungrouped variables", "definition": "t[0]*t[1]/4", "description": "", "templateType": "anything", "can_override": false}, "r2": {"name": "r2", "group": "Ungrouped variables", "definition": "1", "description": "", "templateType": "anything", "can_override": false}, "cx": {"name": "cx", "group": "Ungrouped variables", "definition": "((2*a-2*c)/(-2*b+2*d))", "description": "", "templateType": "anything", "can_override": false}, "cc": {"name": "cc", "group": "Ungrouped variables", "definition": "(r0^2-r1^2-(a^2-c^2+b^2-d^2))/(-2*b+2*d)}-{b}", "description": "", "templateType": "anything", "can_override": false}, "denom": {"name": "denom", "group": "Ungrouped variables", "definition": "rational_approximation(1+cx^2)[1]", "description": "", "templateType": "anything", "can_override": false}, "quadc": {"name": "quadc", "group": "Ungrouped variables", "definition": "rational(denom*(a^2+cc^2-r0^2))", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "bigD<50\n", "maxRuns": 100}, "ungrouped_variables": ["triple_temp", "scalar", "s", "t", "r0", "r1", "a", "c", "b", "d", "ansy1", "ansy2", "ansx1", "ansx2", "bigD", "delta", "r2", "cx", "cc", "denom", "quadc"], "variable_groups": [{"name": "Unnamed group", "variables": []}], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "marked_original_order (Mark the gaps in the original order, mainly to establish if every gap has a valid answer):\n map(\n mark_part(gap[\"path\"],studentAnswer),\n [gap,studentAnswer],\n zip(gaps,studentAnswer)\n )\n \ninterpreted_answers (The interpreted answers for each gap, in the original order):\n map(\n res[\"values\"][\"interpreted_answer\"],\n res,\n marked_original_order\n )\n \nanswers (The student's answers to each gap): interpreted_answers\n \ngap_feedback (Feedback on each of the gaps):\n map(\n try(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n gap, gaps[gap_number],\n name, gap[\"name\"],\n noFeedbackIcon, not gap[\"settings\"][\"showFeedbackIcon\"],\n non_warning_feedback, filter(x[\"op\"]<>\"warning\",x,result[\"feedback\"]),\n assert(noFeedbackIcon,\n assert(name=\"\" or len(gaps)=1 or len(non_warning_feedback)=0,feedback(translate('part.gapfill.feedback header',[\"name\": name])))\n );\n concat_feedback(non_warning_feedback, if(marks>0,result[\"marks\"]/marks,1/len(gaps)), noFeedbackIcon);\n result\n ),\n err,\n fail(translate(\"part.gapfill.error marking gap\",[\"name\": gaps[gap_number][\"name\"], \"message\": err]))\n ),\n [gap_number, answer_number],\n zip(gap_adaptive_order, gap_adaptive_order)\n )\n \nall_valid (Are the answers to all of the gaps valid?):\n all(map(res[\"valid\"], res, marked_original_order))\n \ncheck_answers:\nif(\n answers[2]=answers[0],\n sub_credit(1/2, \"Numbers cannot be the same. \"),\n feedback(\"\")\n)\n \nmark:\n assert(all_valid or not settings[\"sortAnswers\"], fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(check_answers);\n apply(gap_feedback)\n \ninterpreted_answer:\n answers\n \npre_submit:\n map(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n check_pre_submit(gaps[gap_number][\"path\"], answer, exec_path)\n ),\n [gap_number,answer_number],\n zip(gap_order,answer_order)\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "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$\\begin{align}\\simplify{(x-{a})^2+(y-{b})^2}&=\\var{r0^2}\\tag{1}\\\\\\simplify{(x-{c})^2+(y-{d})^2}&=\\var{r1^2}\\tag{2}\\end{align}$
\n\n$x_1=$[[0]], $y_1=$[[1]] and $x_2=$[[2]], $y_2=$[[3]]
\n", "stepsPenalty": "4", "steps": [{"type": "information", "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": "$\\begin{align}\\simplify{(x-{a})^2+(y-{b})^2}&=\\var{r0^2}\\tag{1}\\\\
\\simplify{(x-{c})^2+(y-{d})^2}&=\\var{r1^2}\\tag{2}\\end{align}$
Perform the subtraction $(1)-(2)$ (by which we mean the left-hand side of equation 1 minus the left-hand side of equation 2 will equal the right-hand side of equation 1 minus the right-hand side of equation 2):
\\[ \\simplify{(x-{a})^2+(y-{b})^2-(x-{c})^2-(y-{d})^2}=\\simplify{{r0^2-r1^2}}\\]
Let's expand and collect like terms:
\\[\\simplify{{-2*a+2*c}x+{-2*b+2*d}y+{a^2-c^2+b^2-d^2}={r0^2-r1^2}}\\]
In this case, we have a linear equation which we can solve for either $x$ or $y$. In this solution, we choose to solve for $y$:
\n\\[\\simplify[fractionnumbers]{y={(2*a-2*c)/(-2*b+2*d)}x+{(r0^2-r1^2-(a^2-c^2+b^2-d^2))/(-2*b+2*d)}}\\tag{3}\\]
\nWe could substitute this into either equation 1 or 2 to eliminate the $y$ variable and find values for $x$. In this solution, we choose to substitute equation 3 into equation 1:
\n$\\begin{align}
\\simplify{(x-{a})^2+(y-{b})^2}&=\\var{r0^2}\\\\
\\simplify[fractionnumbers,all]{(x-{a})^2+({(2*a-2*c)/(-2*b+2*d)}x+{(r0^2-r1^2-(a^2-c^2+b^2-d^2))/(-2*b+2*d)}-{b})^2}&=\\var{r0^2}\\end{align}$
We expand the brackets, get everything on the left-hand side and collect like terms to have:
\n$\\begin{align}
\\simplify[fractionnumbers]{x^2-{2a}x+{a^2}+{cx^2}x^2+{2*cx*cc}x+{cc^2}}&=\\var{r0^2}\\\\
\\simplify[fractionnumbers]{x^2-{2a}x+{a^2}+{cx^2}x^2+{2*cx*cc}x+{cc^2}-{r0^2}}&=0\\\\
\\simplify[fractionnumbers, all]{x^2-{2a}x+{a^2}+{cx^2}x^2+{2*cx*cc}x+{cc^2}-{r0^2}}&=0\\\\
\\end{align}$
At this point, we could use the quadratic formula but it's best to tidy up our quadratic equation by multiplying each term by the largest denominator to remove the fractions. So we multiply both sides of the equation by $\\var{denom}$:
\n\\[\\simplify[fractionnumbers, all]{{denom*(1+cx^2)}x^2+{denom*(-2a+2*cx*cc)}x+{quadc}=0}\\]
\nand then use the quadratic formula to solve the quadratic:
\n$\\begin{align}
x&=\\dfrac{-b\\pm\\sqrt{b^2-4ac}}{2a}\\\\
&=\\dfrac{\\var{-denom*(-2a+2*cx*cc)}\\pm\\sqrt{(\\var{denom*(-2a+2*cx*cc)})^2-4(\\var{denom*(1+cx^2)})(\\var{quadc})}}{2\\times\\var{denom*(1+cx^2)}}\\\\
&=\\dfrac{\\var{-denom*(-2a+2*cx*cc)}\\pm\\sqrt{\\var{(-denom*2a+denom*2*cx*cc)^2-4*(denom+denom*cx^2)*(quadc)}}}{\\var{2*denom*(1+cx^2)}}\\\\
&=\\dfrac{\\var{-denom*(-2a+2*cx*cc)}\\pm\\var{sqrt((denom*(-2a+2*cx*cc))^2-4*denom*(1+cx^2)*quadc)}}{\\var{2*denom*(1+cx^2)}}\\\\
&=\\var[fractionnumbers]{ansx1}, \\, \\var[fractionnumbers]{ansx2}
\\end{align}$
Therefore the values that satisfy equations $(1)$ and $(2)$ are $x_1=\\var[fractionnumbers]{ansx1}$, $y_1=\\var[fractionnumbers]{ansy1}$ and $x_2=\\var[fractionnumbers]{ansx2}$, $y_2=\\var[fractionnumbers]{ansy2}$.
\nIn other words, the two curves intersect at the points $(\\var[fractionnumbers]{ansx1},\\var[fractionnumbers]{ansy1})$ and $(\\var[fractionnumbers]{ansx2},\\var[fractionnumbers]{ansy2})$.
"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansx2", "maxValue": "ansx2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansx1", "maxValue": "ansx1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansy2", "maxValue": "ansy2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansy1", "maxValue": "ansy1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansx1", "maxValue": "ansx1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansx2", "maxValue": "ansx2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansy1", "maxValue": "ansy1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansy2", "maxValue": "ansy2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"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/"}], "tags": ["algebra", "Algebra", "equations", "hyperbola", "quadratic", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations", "system of equations"], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-4..4 except 0)", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "if(abs(xans)=10, random(-10..10 except [a,0,1,-1,7,-7]),random(-12..12 except [a,0,1,-1]))", "description": "", "templateType": "anything", "can_override": false}, "xans": {"name": "xans", "group": "Ungrouped variables", "definition": "random(-12..12 except [0,1] )", "description": "", "templateType": "anything", "can_override": false}, "ak": {"name": "ak", "group": "Ungrouped variables", "definition": "a*cubed", "description": "", "templateType": "anything", "can_override": false}, "cubed": {"name": "cubed", "group": "Ungrouped variables", "definition": "xans^3", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": "1000"}, "ungrouped_variables": ["xans", "cubed", "a", "ak", "b"], "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": "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| $y$ | \n$=$ | \n$\\simplify{{ak}/({b}x)}$ | \n$(1)$ | \n
| $y$ | \n$=$ | \n$\\simplify{{a}x^2/{b}}$ | \n$(2)$ | \n
$x=$ [[0]], $y=$ [[1]]
\n", "stepsPenalty": "2", "steps": [{"type": "information", "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": "Given
\n| $y$ | \n$=$ | \n$\\simplify{{ak}/({b}x)}$ | \n$(1)$ | \n
| $y$ | \n$=$ | \n$\\simplify{{a}x^2/{b}}$ | \n$(2)$ | \n
substitute the expression for $y$ given in $(1)$ into $(2)$:
\\[\\simplify{{ak}/({b}x) ={a}x^2/{b}}\\]
To get rid of the $x$ in the denominator, let us multiply both sides by $x$
\\[\\simplify{{ak}/({b}) ={a}x^3/{b}}\\]
Since there is only one term with an $x$ in it, we can get $x^3$ by itself
\n\\[x^3=\\var{cubed}\\]
\nTherefore, $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 $y$ \n | \n\n $=$ \n | \n\n $\\simplify{{a}/{b}}(\\var{xans})^2$ \n | \n
| \n | \n $=$ \n | \n\n $\\simplify[fractionnumbers]{{a*xans^2/b}}$ \n | \n
Therefore the values that satisfy equations $(1)$ and $(2)$ are $x=\\var{xans}$ and $y=\\simplify[fractionnumbers]{{a*xans^2/b}}$.
\n"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "xans", "maxValue": "xans", "correctAnswerFraction": false, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "minValue": "a*xans*xans/b", "maxValue": "a*xans*xans/b", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}, {"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/"}], "tags": ["algebra", "Algebra", "equations", "hyperbola", "quadratic", "Simultaneous equations", "simultaneous equations", "solving equations", "Solving equations", "system of equations"], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"a": {"name": "a", "group": "Ungrouped variables", "definition": "random(2,3,4,5)", "description": "", "templateType": "anything", "can_override": false}, "c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-12..12 except [b/a,0])", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "quadxcoeff": {"name": "quadxcoeff", "group": "Ungrouped variables", "definition": "yint-d", "description": "", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "yint": {"name": "yint", "group": "Ungrouped variables", "definition": "a*c+b+d", "description": "", "templateType": "anything", "can_override": false}, "grad": {"name": "grad", "group": "Ungrouped variables", "definition": "a", "description": "", "templateType": "anything", "can_override": false}, "quadccoeff": {"name": "quadccoeff", "group": "Ungrouped variables", "definition": "-num", "description": "", "templateType": "anything", "can_override": false}, "num": {"name": "num", "group": "Ungrouped variables", "definition": "-b*c", "description": "", "templateType": "anything", "can_override": false}, "ansy2": {"name": "ansy2", "group": "Ungrouped variables", "definition": "grad*(root2)+yint", "description": "", "templateType": "anything", "can_override": false}, "ansy1": {"name": "ansy1", "group": "Ungrouped variables", "definition": "grad*(root1)+yint", "description": "", "templateType": "anything", "can_override": false}, "root1": {"name": "root1", "group": "Ungrouped variables", "definition": "roots[0]", "description": "", "templateType": "anything", "can_override": false}, "roots": {"name": "roots", "group": "Ungrouped variables", "definition": "sort([-b/a,-c])", "description": "", "templateType": "anything", "can_override": false}, "root2": {"name": "root2", "group": "Ungrouped variables", "definition": "roots[1]", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["a", "b", "c", "d", "grad", "yint", "num", "quadxcoeff", "quadccoeff", "ansy1", "ansy2", "roots", "root1", "root2"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "marked_original_order (Mark the gaps in the original order, mainly to establish if every gap has a valid answer):\n map(\n mark_part(gap[\"path\"],studentAnswer),\n [gap,studentAnswer],\n zip(gaps,studentAnswer)\n )\n \ninterpreted_answers (The interpreted answers for each gap, in the original order):\n map(\n res[\"values\"][\"interpreted_answer\"],\n res,\n marked_original_order\n )\n \nanswers (The student's answers to each gap): interpreted_answers\n \ngap_feedback (Feedback on each of the gaps):\n map(\n try(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n gap, gaps[gap_number],\n name, gap[\"name\"],\n noFeedbackIcon, not gap[\"settings\"][\"showFeedbackIcon\"],\n non_warning_feedback, filter(x[\"op\"]<>\"warning\",x,result[\"feedback\"]),\n assert(noFeedbackIcon,\n assert(name=\"\" or len(gaps)=1 or len(non_warning_feedback)=0,feedback(translate('part.gapfill.feedback header',[\"name\": name])))\n );\n concat_feedback(non_warning_feedback, if(marks>0,result[\"marks\"]/marks,1/len(gaps)), noFeedbackIcon);\n result\n ),\n err,\n fail(translate(\"part.gapfill.error marking gap\",[\"name\": gaps[gap_number][\"name\"], \"message\": err]))\n ),\n [gap_number, answer_number],\n zip(gap_adaptive_order, gap_adaptive_order)\n )\n \nall_valid (Are the answers to all of the gaps valid?):\n all(map(res[\"valid\"], res, marked_original_order))\n \ncheck_answers:\nif(\n answers[2]=answers[0],\n sub_credit(1/2, \"Numbers cannot be the same. \"),\n feedback(\"\")\n)\n \nmark:\n assert(all_valid or not settings[\"sortAnswers\"], fail(translate(\"question.can not submit\")));\n apply(answers);\n apply(check_answers);\n apply(gap_feedback)\n \ninterpreted_answer:\n answers\n \npre_submit:\n map(\n let(\n answer, studentAnswer[answer_number],\n result, submit_part(gaps[gap_number][\"path\"],answer),\n check_pre_submit(gaps[gap_number][\"path\"], answer, exec_path)\n ),\n [gap_number,answer_number],\n zip(gap_order,answer_order)\n )", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "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| $y$ | \n$=$ | \n$\\simplify{{grad}x+{yint}}$ | \n$(1)$ | \n
| $y$ | \n$=$ | \n$\\simplify{{num}/x+{d}}$ | \n$(2)$ | \n
$x_1=$ [[0]], $y_1=$ [[1]] and $x_2=$ [[2]], $y_2=$ [[3]]
\n\n", "stepsPenalty": "4", "steps": [{"type": "information", "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": "Given
\n| $y$ | \n$=$ | \n$\\simplify{{grad}x+{yint}}$ | \n$(1)$ | \n
| $y$ | \n$=$ | \n$\\simplify{{num}/x+{d}}$ | \n$(2)$ | \n
substitute the expression for $y$ given in $(1)$ into $(2)$:
\\[\\simplify{{grad}x+{yint} ={num}/x+{d}}\\]
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}\\]
Notice this equation is a quadratic, we put everything on one side
\n\\[\\simplify{{grad}x^2+{yint-d}x -{num}=0}\\]
\nThere 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\\]
\nTherefore, $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)$:
| $y$ | \n$=$ | \n$\\simplify[!collectnumbers,fractionnumbers]{{grad}({root1})+{yint}}$ | \n
| \n | $=$ | \n$\\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| $y$ | \n$=$ | \n$\\simplify[!collectnumbers,fractionnumbers]{{grad}({root2})+{yint}}$ | \n
| \n | $=$ | \n$\\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}$.
\nIn other words, the two curves intersect at the points $\\left(\\simplify[fractionnumbers]{{root1}},\\var{ansy1}\\right)$ and $\\left(\\simplify[fractionnumbers]{{root2}},\\var{ansy2}\\right)$.
"}], "gaps": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "root2", "maxValue": "root2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "root1", "maxValue": "root1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansy2", "maxValue": "ansy2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansy1", "maxValue": "ansy1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "root1", "maxValue": "root1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "root2", "maxValue": "root2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "numberentry", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "alternatives": [{"type": "numberentry", "useCustomName": false, "customName": "", "marks": "1", "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "alternativeFeedbackMessage": "", "useAlternativeFeedback": false, "minValue": "ansy1", "maxValue": "ansy1", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "minValue": "ansy2", "maxValue": "ansy2", "correctAnswerFraction": true, "allowFractions": true, "mustBeReduced": false, "mustBeReducedPC": 0, "displayAnswer": "", "showFractionHint": false, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always"}]}], "allowPrinting": true, "navigation": {"allowregen": true, "reverse": true, "browse": true, "allowsteps": true, "showfrontpage": false, "navigatemode": "sequence", "onleave": {"action": "none", "message": ""}, "preventleave": false, "typeendtoleave": false, "startpassword": "", "autoSubmit": true, "allowAttemptDownload": false, "downloadEncryptionKey": "", "showresultspage": "oncompletion"}, "timing": {"allowPause": true, "timeout": {"action": "none", "message": ""}, "timedwarning": {"action": "none", "message": ""}}, "feedback": {"enterreviewmodeimmediately": true, "showactualmarkwhen": "always", "showtotalmarkwhen": "always", "showanswerstatewhen": "always", "showpartfeedbackmessageswhen": "always", "showexpectedanswerswhen": "inreview", "showadvicewhen": "never", "allowrevealanswer": true, "intro": "", "end_message": "", "results_options": {"printquestions": true, "printadvice": true}, "feedbackmessages": [], "reviewshowexpectedanswer": true, "showanswerstate": true, "reviewshowfeedback": true, "showactualmark": true, "showtotalmark": true, "reviewshowscore": true, "reviewshowadvice": false}, "diagnostic": {"knowledge_graph": {"topics": [], "learning_objectives": []}, "script": "diagnosys", "customScript": ""}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}], "extensions": [], "custom_part_types": [], "resources": []}