// Numbas version: exam_results_page_options {"name": "RAW demo 1", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"extensions": [], "metadata": {"description": "
A worked example about polynomials.
", "licence": "Creative Commons Attribution 4.0 International"}, "variable_groups": [{"name": "Part 1", "variables": ["x0", "a", "b"]}, {"name": "Part 2", "variables": ["a2", "b2", "c2", "name"]}, {"name": "Part 3", "variables": ["r", "s", "b3", "c3"]}], "variables": {"c3": {"group": "Part 3", "templateType": "anything", "definition": "r*s", "name": "c3", "description": "Constant term in part 3.
"}, "r": {"group": "Part 3", "templateType": "anything", "definition": "random(-10..10 except 0)", "name": "r", "description": "One root of the polynomial in part 3.
"}, "a": {"group": "Part 1", "templateType": "randrange", "definition": "random(-5..5#1)", "name": "a", "description": ""}, "a2": {"group": "Part 2", "templateType": "anything", "definition": "random(-5..5 except 0)", "name": "a2", "description": ""}, "b": {"group": "Part 1", "templateType": "randrange", "definition": "random(-5..5#1)", "name": "b", "description": ""}, "x0": {"group": "Part 1", "templateType": "randrange", "definition": "random(0..5#1)", "name": "x0", "description": "This is the value for x which is substituted in part 1.
"}, "c2": {"group": "Part 2", "templateType": "anything", "definition": "random(-5..5 except 0)", "name": "c2", "description": ""}, "name": {"group": "Part 2", "templateType": "anything", "definition": "random(['Matt','Jessica','Luke','Danny'])", "name": "name", "description": ""}, "b2": {"group": "Part 2", "templateType": "anything", "definition": "random(-5..5 except 0)", "name": "b2", "description": ""}, "b3": {"group": "Part 3", "templateType": "anything", "definition": "-(r+s)", "name": "b3", "description": "Coefficient of x in part 3.
"}, "s": {"group": "Part 3", "templateType": "anything", "definition": "random(-10..10 except [0,r])", "name": "s", "description": "One root of the polynomial in part 3.
"}}, "statement": "This question is about manipulating linear and quadratic functions.
\nYou could also use this section to provide any formulae the students might want to reference.
\nOr it could be the main, referenced part of a multi-part question.
", "advice": "When evaluating a function $f(x)$ at a point $x=\\var{x0}$, simply substitute $x$ in the expression with the value $\\var{x0}$.
\nWhen differentiating a polynomial with respect to $x$, take each term $a_n x^n$ and multiply its coefficient by $n$ before reducing its power by 1, giving $n a_n x^{n-1}$.
\nTo find the roots of a quadratic, you might be able to do it by sight by noting that the sum of the two roots should be the negative of the coefficient of $x$, while the product of the two roots should be the constant term. This is explained in more detail in the expanded part above.
\nOtherwise, you can always find the root(s) of a general quadratic $a x^2 + b x + c = 0$ by using the quadratic formula:
\n\\[r = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}\\]
", "preamble": {"css": "", "js": ""}, "functions": {}, "rulesets": {}, "name": "RAW demo 1", "ungrouped_variables": [], "tags": [], "parts": [{"maxValue": "a*x0+b", "scripts": {}, "marks": 1, "mustBeReduced": false, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "allowFractions": false, "mustBeReducedPC": 0, "type": "numberentry", "minValue": "a*x0+b", "variableReplacements": [], "correctAnswerStyle": "plain", "correctAnswerFraction": false, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "extendBaseMarkingAlgorithm": true, "prompt": "Let's look at functions of the form $f(x) = \\simplify{a x + b}$.
\nSuppose $f(x) = \\simplify{{a}x+{b}}$.
\nFind $f(\\var{x0})$.
", "notationStyles": ["plain", "en", "si-en"], "unitTests": []}, {"answer": "2*a2*x+b2", "scripts": {}, "marks": "1", "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "customMarkingAlgorithm": "", "type": "jme", "checkingAccuracy": 0.001, "showPreview": true, "vsetRangePoints": 5, "checkingType": "absdiff", "checkVariableNames": true, "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true, "prompt": "{name}'s favourite quadratic is $g(x) = \\simplify[all,!noleadingminus]{{a2}x^2 + {b2}x + {c2}}$.
\nFind $g'(x)$.
", "showFeedbackIcon": true, "failureRate": 1, "unitTests": [], "expectedVariableNames": ["x"]}, {"steps": [{"matrix": ["1", 0, 0, 0], "scripts": {}, "marks": 0, "distractors": ["", "", "Check the sign of the coefficient of $x$. ", ""], "minMarks": 0, "customMarkingAlgorithm": "", "showFeedbackIcon": true, "maxMarks": 0, "shuffleChoices": true, "type": "1_n_2", "choices": ["$\\simplify{r+s = {-b3}}$ and $\\simplify{rs = {c3}}$.", "$\\simplify{r+s = {-b3}}$ and $\\simplify{rs = {-c3}}$.", "$\\simplify{r+s = {b3}}$ and $\\simplify{rs = {c3}}$.", "$\\simplify{r+s = {b3}}$ and $\\simplify{rs = {-c3}}$."], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "prompt": "If the roots of $h(x)$ are $r$ and $s$, then $h(x) = (x-r)(x-s) = x^2 -(r+s)x +rs$.
\nWhat does this tell us about $r$ and $s$?
", "displayType": "radiogroup", "displayColumns": 0, "unitTests": []}], "checkVariableNames": false, "answer": "set(r,s)", "variableReplacementStrategy": "originalfirst", "variableReplacements": [], "stepsPenalty": "0", "checkingType": "absdiff", "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true, "failureRate": 1, "unitTests": [], "scripts": {}, "marks": "2", "type": "jme", "showFeedbackIcon": true, "customMarkingAlgorithm": "", "checkingAccuracy": 0.001, "expectedVariableNames": [], "showCorrectAnswer": true, "showPreview": true, "prompt": "Consider the quadratic $h(x) = \\simplify{x^2 + {b3}x + {c3}}$.
\nWhat is the set of roots of $h(x)$? Use the Numbas syntax set(a,b,c)
in your answer.