// Numbas version: finer_feedback_settings {"name": "Simultaneous equations: linear and hyperbola, 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 hyperbola, two points", "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": {}, "extensions": [], "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", "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/"}]}