// Numbas version: exam_results_page_options {"name": "Terry's copy of Graphing: cubic", "extensions": [], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"advice": "", "statement": "

You are given the equation $y=\\simplify[all,fractionNumbers]{(x-{d})({a}x^2+{b}x+{c})}$. 

", "preamble": {"css": "", "js": ""}, "name": "Terry's copy of Graphing: cubic", "extensions": [], "type": "question", "variablesTest": {"condition": "", "maxRuns": 100}, "metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": ""}, "variable_groups": [], "variables": {"yint": {"group": "Ungrouped variables", "templateType": "anything", "definition": "-d*c", "name": "yint", "description": ""}, "thres": {"group": "Ungrouped variables", "templateType": "anything", "definition": "b^2/(4a)", "name": "thres", "description": ""}, "switch": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-1,0,1)", "name": "switch", "description": ""}, "axis_x": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-4..4#0.5)", "name": "axis_x", "description": ""}, "c": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(switch=0, thres,if(switch<0,(b^2+s^2)/(4a),(b^2-s^2)/(4a)))", "name": "c", "description": ""}, "s": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(map(n^2,n,1..12))*2*a", "name": "s", "description": ""}, "a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-6..6 except 0)", "name": "a", "description": ""}, "b": {"group": "Ungrouped variables", "templateType": "anything", "definition": "-2*a*axis_x", "name": "b", "description": ""}, "disc": {"group": "Ungrouped variables", "templateType": "anything", "definition": "b^2-4*a*c", "name": "disc", "description": ""}, "xint1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "axis_x+s/(2*a)", "name": "xint1", "description": ""}, "axis_y": {"group": "Ungrouped variables", "templateType": "anything", "definition": "a*axis_x^2+b*axis_x+c", "name": "axis_y", "description": ""}, "xint0": {"group": "Ungrouped variables", "templateType": "anything", "definition": "axis_x-s/(2*a)", "name": "xint0", "description": ""}, "xints": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(switch=-1,set(d) ,if(switch=0,set(d,axis_x),set(d,axis_x-s/(2*a),axis_x+s/(2*a))))", "name": "xints", "description": ""}, "d": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-10..10 except [xint0, xint0])", "name": "d", "description": ""}, "rleading": {"group": "Ungrouped variables", "templateType": "anything", "definition": "[if(a>0,1,0),if(a<0,1,0)]", "name": "rleading", "description": ""}, "lleading": {"group": "Ungrouped variables", "templateType": "anything", "definition": "[if(a<0,1,0),if(a>0,1,0)]", "name": "lleading", "description": ""}}, "question_groups": [{"pickQuestions": 0, "questions": [], "name": "", "pickingStrategy": "all-ordered"}], "parts": [{"showCorrectAnswer": true, "shuffleChoices": true, "minMarks": 0, "marks": 0, "variableReplacements": [], "steps": [{"showCorrectAnswer": true, "prompt": "

An equation of the form $y=ax^3+bx^2+cx+d$ is known as a cubic, or a cubic polynomial. If we expand $y=\\simplify[all,fractionNumbers]{(x-{d})({a}x^2+{b}x+{c})}$ we will see it is a cubic.

", "variableReplacementStrategy": "originalfirst", "scripts": {}, "type": "information", "variableReplacements": [], "marks": 0}], "choices": ["

straight line

", "

parabola/quadratic

", "

cubic

", "

hyperbola

", "

circle

", "

quartic

"], "stepsPenalty": "1", "displayType": "radiogroup", "type": "1_n_2", "prompt": "

This equation, or its graph, can be described as a

", "variableReplacementStrategy": "originalfirst", "scripts": {}, "distractors": ["", "", "", "", "", ""], "maxMarks": 0, "displayColumns": 0, "matrix": [0, "0", "1", 0, 0, 0]}, {"showCorrectAnswer": true, "shuffleChoices": false, "minMarks": 0, "marks": 0, "variableReplacements": [], "steps": [{"showCorrectAnswer": true, "prompt": "

What happens to the graph as you go far to the left or right is called the long term behaviour of a graph.

\n

The leading term (the term that includes the highest power) determines the long term behaviour of a polynomial.

\n

By expanding $y=\\simplify[all,fractionNumbers]{(x-{d})({a}x^2+{b}x+{c})}$ we see that the leading term is $\\simplify[all,fractionNumbers]{{a}x^3}$. 

\n

As we go far to the left of the graph $x$ is negative, and so $\\simplify[all,fractionNumbers]{{a}x^3}$ is negative. That is, the graph goes downwards. is positive. That is, the graph goes upwards. 

\n

", "variableReplacementStrategy": "originalfirst", "scripts": {}, "type": "information", "variableReplacements": [], "marks": 0}], "choices": ["

goes upwards.

", "

goes downwards.

"], "stepsPenalty": "1", "displayType": "radiogroup", "type": "1_n_2", "prompt": "

As we move to the far left of the graph, the graph

", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxMarks": 0, "displayColumns": 0, "matrix": "lleading"}, {"showCorrectAnswer": true, "shuffleChoices": false, "minMarks": 0, "marks": 0, "variableReplacements": [], "steps": [{"showCorrectAnswer": true, "prompt": "

What happens to the graph as you go far to the left or right is called the long term behaviour of a graph.

\n

The leading term (the term that includes the highest power) determines the long term behaviour of a polynomial.

\n

By expanding $y=\\simplify[all,fractionNumbers]{(x-{d})({a}x^2+{b}x+{c})}$ we see that the leading term is $\\simplify[all,fractionNumbers]{{a}x^3}$. 

\n

As we go far to the right of the graph $x$ is positive, and so $\\simplify[all,fractionNumbers]{{a}x^3}$ is negative. That is, the graph goes downwards. is positive. That is, the graph goes upwards. 

\n

", "variableReplacementStrategy": "originalfirst", "scripts": {}, "type": "information", "variableReplacements": [], "marks": 0}], "choices": ["

goes upwards.

", "

goes downwards.

"], "stepsPenalty": "1", "displayType": "radiogroup", "type": "1_n_2", "prompt": "

As we move to the far right of the graph, the graph

", "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxMarks": 0, "displayColumns": 0, "matrix": "rleading"}, {"showCorrectAnswer": true, "gaps": [{"showCorrectAnswer": true, "allowFractions": true, "correctAnswerFraction": true, "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "{yint}", "variableReplacements": [], "showPrecisionHint": false, "marks": 1, "type": "numberentry", "minValue": "{yint}"}], "prompt": "

The $y$-intercept of the graph is $y=$[[0]].

", "variableReplacementStrategy": "originalfirst", "scripts": {}, "type": "gapfill", "variableReplacements": [], "steps": [{"showCorrectAnswer": true, "prompt": "

The $y$-intercept is the value of $y$ when $x=0$, that is, the value of $y$ where the graph hits the $y$-axis. To find it, substitute $x=0$ into our equation:

\n

\\[y=\\simplify[unitFactor,basic,fractionNumbers]{(0-{d})({a}0^2+{b}0+{c})}=\\var{yint}.\\]

\n

", "variableReplacementStrategy": "originalfirst", "scripts": {}, "type": "information", "variableReplacements": [], "marks": 0}], "marks": 0, "stepsPenalty": "1"}, {"showCorrectAnswer": true, "gaps": [{"showCorrectAnswer": true, "marks": 1, "checkingtype": "absdiff", "expectedvariablenames": [], "type": "jme", "answer": "{xints}", "variableReplacements": [], "showpreview": true, "vsetrangepoints": 5, "vsetrange": [0, 1], "variableReplacementStrategy": "originalfirst", "scripts": {}, "checkingaccuracy": 0.001, "checkvariablenames": false}], "prompt": "

The set of $x$-intercepts of the graph would be [[0]].

\n

Note: If there are no intercepts, enter set()

\n

If there is only one intercept, say $x=5$, enter set(5)

\n

If there are two intercepts, say $x=-2$ and $x=1.5$, enter set(-2,1.5)

\n

If there are three intercepts, say $x=-2$, $x=1.5$ and $x=5$, enter set(-2,1.5,5)

\n

", "variableReplacementStrategy": "originalfirst", "scripts": {}, "type": "gapfill", "variableReplacements": [], "steps": [{"showCorrectAnswer": true, "prompt": "

The $x$-intercept is the value of $x$ when $y=0$, that is, the value of $x$ where the graph hits the $x$-axis. To find it, substitute $y=0$ into our equation:

\n

\\[0=\\simplify[all,fractionNumbers]{(x-{d})({a}x^2+{b}x+{c})} \\]

\n

Recall, if a product is zero then one of the factors must be zero, therefore

\n

\\[\\simplify[all,fractionNumbers]{x-{d}=0}\\quad \\text{or}\\quad\\simplify[all,fractionNumbers]{{a}x^2+{b}x+{c}=0}.\\]

\n

Solving the first equation says that one of the $x$-intercepts is $x=\\var{d}$.

\n

For the second equation we will use the quadratic formula. Recall for $ax^2+bx+c=0$, the solutions (if they exist) are given by \\[x=\\dfrac{-b}{2a}\\pm\\dfrac{\\sqrt{b^2-4ac}}{2a}.\\]

\n\n

For the equation $y=\\simplify[all,fractionNumbers]{{a}x^2+{b}x+{c}}$, we have $b^2-4ac=\\simplify[basic,unitFactor,fractionNumbers]{{b}^2-4{a}{c}}=\\var{disc}$ and so there are no more $x$-intercepts. is one more $x$-intercept: are two more $x$-intercepts: 

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
$x$$=$$\\dfrac{-b}{2a}\\pm\\dfrac{\\sqrt{b^2-4ac}}{2a}$
 
$=$$\\simplify[basic,unitFactor,fractionNumbers]{{axis_x}}\\pm\\simplify[basic,unitFactor,fractionNumbers]{sqrt{{disc}}/({2*a})}$
 
$=$$\\var{axis_x}$  $\\var{xint0}, \\, \\var{xint1}$
\n

", "variableReplacementStrategy": "originalfirst", "scripts": {}, "type": "information", "variableReplacements": [], "marks": 0}], "marks": 0, "stepsPenalty": "1"}, {"showCorrectAnswer": true, "gaps": [{"showCorrectAnswer": true, "allowFractions": false, "correctAnswerFraction": false, "variableReplacementStrategy": "originalfirst", "scripts": {}, "maxValue": "2", "variableReplacements": [], "showPrecisionHint": false, "marks": 1, "type": "numberentry", "minValue": "2"}], "prompt": "

Given the degree of a polynomial is $3$, the maximum number of possible 'bends' or 'turns' in the graph is [[0]].

", "variableReplacementStrategy": "originalfirst", "scripts": {}, "type": "gapfill", "variableReplacements": [], "steps": [{"showCorrectAnswer": true, "prompt": "

A degree $n$ polynomial has at most $n-1$ bends in its graph.

", "variableReplacementStrategy": "originalfirst", "scripts": {}, "type": "information", "variableReplacements": [], "marks": 0}], "marks": 0, "stepsPenalty": "1"}], "showQuestionGroupNames": false, "functions": {}, "tags": ["cubic", "graphing", "polynomial", "Polynomial", "polynomials", "sketching"], "rulesets": {}, "ungrouped_variables": ["switch", "axis_x", "a", "b", "thres", "s", "c", "lleading", "rleading", "axis_y", "xints", "disc", "xint0", "xint1", "d", "yint"], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Terry Young", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3130/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Terry Young", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/3130/"}]}