// Numbas version: finer_feedback_settings {"name": "Substituting values into algebraic expressions", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Substituting values into algebraic expressions", "tags": ["algebra", "Algebra", "evaluating", "substituting", "Substitution", "substitution"], "metadata": {"description": "", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "", "advice": "", "rulesets": {}, "extensions": [], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true}, "constants": [], "variables": {"disans": {"name": "disans", "group": "Discriminant", "definition": "bval^2-4*aval*cval", "description": "", "templateType": "anything", "can_override": false}, "yval": {"name": "yval", "group": "Circle", "definition": "random(-7..7 except [0,cval,xval])", "description": "", "templateType": "anything", "can_override": false}, "aval": {"name": "aval", "group": "Discriminant", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "cirans": {"name": "cirans", "group": "Circle", "definition": "(xval-aval)^2+(yval-cval)^2", "description": "", "templateType": "anything", "can_override": false}, "xval": {"name": "xval", "group": "Circle", "definition": "random(-7..7 except [0,aval])", "description": "", "templateType": "anything", "can_override": false}, "bval": {"name": "bval", "group": "Discriminant", "definition": "random(-12..12)", "description": "", "templateType": "anything", "can_override": false}, "cval": {"name": "cval", "group": "Discriminant", "definition": "random(-5..5 except 0)", "description": "", "templateType": "anything", "can_override": false}, "ans": {"name": "ans", "group": "Ungrouped variables", "definition": "switch(seed=0,cirans,seed=1,disans,seed=2,mans,\"error\")", "description": "", "templateType": "anything", "can_override": false}, "v_sig_figs": {"name": "v_sig_figs", "group": "relativistic mass", "definition": "random(1..2.9#0.01)", "description": "

significant figures of velocity

", "templateType": "anything", "can_override": false}, "m0": {"name": "m0", "group": "relativistic mass", "definition": "random(1..1000)", "description": "", "templateType": "anything", "can_override": false}, "mans": {"name": "mans", "group": "relativistic mass", "definition": "precround(m0/(sqrt(1-(v_sig_figs/3)^2)),2)", "description": "", "templateType": "anything", "can_override": false}, "seed": {"name": "seed", "group": "Ungrouped variables", "definition": "random(0,1)", "description": "", "templateType": "anything", "can_override": false}, "x": {"name": "x", "group": "Ungrouped variables", "definition": "'x'", "description": "", "templateType": "anything", "can_override": false}, "y": {"name": "y", "group": "Ungrouped variables", "definition": "'y'", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["ans", "seed", "x", "y"], "variable_groups": [{"name": "Circle", "variables": ["xval", "yval", "cirans"]}, {"name": "Discriminant", "variables": ["aval", "bval", "cval", "disans"]}, {"name": "relativistic mass", "variables": ["m0", "mans", "v_sig_figs"]}], "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": "

Given $a=\\var{aval}$, $b=\\var{bval}$ and $c=\\var{cval}$, the value of $b^2-4ac$ is  If $x=\\var{xval}$ and $y=\\var{yval}$ then $\\simplify{(x-{aval})^2+(y-{cval})^2}$ =  Suppose $m_0=\\var{m0}$, $v=\\var{v_sig_figs}\\times 10^8$, $c=3\\times 10^8$ and $m=\\dfrac{m_0}{\\sqrt{1-\\frac{v^2}{c^2}}}$. Then we have $m=$  [[0]] (rounded to two decimal places)

\n

 

", "stepsPenalty": "1", "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": "

Be mindful of the order of operations and negatives when evaluating expressions.

\n

\n

Substituting $a=\\var{aval}$, $b=\\var{bval}$ and $c=\\var{cval}$ into $b^2-4ac$ gives

\n

\\[(\\var{bval})^2-4(\\var{aval})(\\var{cval})=\\simplify[basic]{{bval^2}-4{aval}{cval}}=\\simplify[basic]{{bval^2}+{-4*aval*cval}}=\\var{disans}.\\]

\n

Substituting $x=\\var{xval}$ and $y=\\var{yval}$ into $\\simplify{(x-{aval})^2+(y-{cval})^2}$  gives

\n

\\[\\simplify[basic]{({xval}-{aval})^2+({yval}-{cval})^2}=(\\var{xval-aval})^2+(\\var{yval-cval})^2=\\var{(xval-aval)^2}+\\var{(yval-cval)^2}=\\var{cirans}.\\]

\n

Substituting $m_0=\\var{m0}$, $v=\\var{v_sig_figs}\\times 10^8$ and $c=3\\times 10^8$ into $m=\\dfrac{m_0}{\\sqrt{1-\\frac{v^2}{c^2}}}$ gives

\n

\\[m=\\dfrac{\\var{m0}}{\\sqrt{1-\\frac{(\\var{v_sig_figs}\\times 10^8)^2}{(3 \\times 10^8)^2}}}=\\var{mans} \\quad\\text{ (to two decimal places).}\\]

"}], "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": "ans", "maxValue": "ans", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "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/"}]}