// Numbas version: exam_results_page_options {"name": "RAW demo", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"tags": [], "statement": "

This question is about manipulating linear and quadratic functions. 

\n

(You could also use this section to provide any formulae the students might want to reference.)

\n

(Or it could be the main, referenced part of a multi-part question.)

\n
\n

", "variable_groups": [{"variables": ["x0", "a", "b"], "name": "Part 1"}, {"variables": ["a2", "b2", "c2", "name"], "name": "Part 2"}, {"variables": ["r", "s", "b3", "c3"], "name": "Part 3"}], "ungrouped_variables": [], "variables": {"c3": {"group": "Part 3", "description": "

Constant term in part 3. 

", "definition": "r*s", "name": "c3", "templateType": "anything"}, "s": {"group": "Part 3", "description": "

One root of the polynomial in part 3.

", "definition": "random(-10..10 except [0,r])", "name": "s", "templateType": "anything"}, "c2": {"group": "Part 2", "description": "", "definition": "random(-5..5 except 0)", "name": "c2", "templateType": "anything"}, "b3": {"group": "Part 3", "description": "

Coefficient of x in part 3.

", "definition": "-(r+s)", "name": "b3", "templateType": "anything"}, "b": {"group": "Part 1", "description": "", "definition": "random(-5 .. 5#1)", "name": "b", "templateType": "randrange"}, "a2": {"group": "Part 2", "description": "", "definition": "random(-5..5 except 0)", "name": "a2", "templateType": "anything"}, "b2": {"group": "Part 2", "description": "", "definition": "random(-5..5 except 0)", "name": "b2", "templateType": "anything"}, "x0": {"group": "Part 1", "description": "

This is the value for x which is substituted in part 1. 

", "definition": "random(0 .. 5#1)", "name": "x0", "templateType": "randrange"}, "name": {"group": "Part 2", "description": "", "definition": "random(['Matt','Jessica','Luke','Danny'])", "name": "name", "templateType": "anything"}, "a": {"group": "Part 1", "description": "", "definition": "random(-5 .. 5#1)", "name": "a", "templateType": "randrange"}, "r": {"group": "Part 3", "description": "

One root of the polynomial in part 3. 

", "definition": "random(-10..10 except 0)", "name": "r", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "preamble": {"css": "", "js": ""}, "metadata": {"licence": "Creative Commons Attribution 4.0 International", "description": "

A worked example about polynomials. 

"}, "parts": [{"variableReplacementStrategy": "originalfirst", "showFractionHint": true, "prompt": "

Let's look at functions of the form $f(x) = \\simplify{a x + b}$. 

\n

Suppose $f(x) = \\simplify{{a}x+{b}}$. 

\n

Find $f(\\var{x0})$. 

", "correctAnswerFraction": false, "minValue": "a*x0+b", "type": "numberentry", "useCustomName": false, "customMarkingAlgorithm": "", "variableReplacements": [], "mustBeReduced": false, "marks": 1, "unitTests": [], "customName": "", "correctAnswerStyle": "plain", "showCorrectAnswer": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "extendBaseMarkingAlgorithm": true, "maxValue": "a*x0+b", "showFeedbackIcon": true, "scripts": {}, "allowFractions": false}, {"variableReplacementStrategy": "originalfirst", "prompt": "

{name}'s favourite quadratic is $g(x) = \\simplify[all,!noleadingminus]{{a2}x^2 + {b2}x + {c2}}$.

\n

Find $g'(x)$. 

", "vsetRange": [0, 1], "checkingType": "absdiff", "type": "jme", "showFeedbackIcon": true, "useCustomName": false, "customMarkingAlgorithm": "", "valuegenerators": [{"value": "", "name": "x"}], "variableReplacements": [], "scripts": {}, "checkVariableNames": true, "failureRate": 1, "marks": "1", "unitTests": [], "customName": "", "answer": "2*{a2}*x+{b2}", "showCorrectAnswer": true, "vsetRangePoints": 5, "checkingAccuracy": 0.001, "extendBaseMarkingAlgorithm": true, "showPreview": true}, {"variableReplacementStrategy": "originalfirst", "stepsPenalty": "0", "vsetRangePoints": 5, "prompt": "

Consider the quadratic $h(x) = \\simplify{x^2 + {b3}x + {c3}}$.

\n

What is the set of roots of $h(x)$? Use the Numbas syntax set(a,b,c) in your answer. 

\n

", "vsetRange": [0, 1], "checkingType": "absdiff", "type": "jme", "useCustomName": false, "customMarkingAlgorithm": "", "valuegenerators": [], "variableReplacements": [], "scripts": {}, "checkVariableNames": false, "steps": [{"variableReplacementStrategy": "originalfirst", "distractors": ["", "", "Check the sign of the coefficient of $x$. ", ""], "prompt": "

If the roots of $h(x)$ are $r$ and $s$, then $h(x) = (x-r)(x-s) = x^2 -(r+s)x +rs$. 

\n

What does this tell us about $r$ and $s$?

", "displayColumns": 0, "useCustomName": false, "type": "1_n_2", "matrix": ["1", 0, 0, 0], "customMarkingAlgorithm": "", "variableReplacements": [], "scripts": {}, "choices": ["$\\simplify{r+s = {-b3}}$ and $\\simplify{r s = {c3}}$.", "$\\simplify{r+s = {-b3}}$ and $\\simplify{r s = {-c3}}$.", "$\\simplify{r+s = {b3}}$ and $\\simplify{r s = {c3}}$.", "$\\simplify{r+s = {b3}}$ and $\\simplify{r s = {-c3}}$."], "maxMarks": 0, "marks": 0, "unitTests": [], "shuffleChoices": true, "customName": "", "showCorrectAnswer": true, "displayType": "radiogroup", "extendBaseMarkingAlgorithm": true, "showCellAnswerState": true, "showFeedbackIcon": true, "minMarks": 0}], "failureRate": 1, "marks": "2", "unitTests": [], "customName": "", "answer": "set({r},{s})", "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "checkingAccuracy": 0.001, "showFeedbackIcon": true, "showPreview": true}], "advice": "

When evaluating a function $f(x)$ at a point $x=\\var{x0}$, simply substitute $x$ in the expression with the value $\\var{x0}$.

\n

When 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}$. 

\n

To 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. 

\n

Otherwise, 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}\\]

", "functions": {}, "rulesets": {}, "extensions": [], "name": "RAW demo", "contributors": [{"name": "Sean Gardiner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2443/"}]}]}], "contributors": [{"name": "Sean Gardiner", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2443/"}]}