// Numbas version: finer_feedback_settings {"name": "Simultaneous equations: linear and quadratic, two points", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Simultaneous equations: linear and quadratic, two points", "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": {}, "extensions": [], "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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify{{grad}x+{yint}}$               $(1)$
$y$$=$$\\simplify{x^2+{quadxcoeff}x+{quadccoeff}}$               $(2)$
\n

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

\n

", "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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$y$$=$$\\simplify{{grad}x+{yint}}$               $(1)$
$y$$=$$\\simplify{x^2+{quadxcoeff}x+{quadccoeff}}$               $(2)$
\n

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

\n

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

\n

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

\n

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

\n

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

\n


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

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

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

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

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

\n

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

"}], "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", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}]}