// Numbas version: exam_results_page_options {"name": "Quadratic Inequalities", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Quadratic Inequalities", "variable_groups": [], "metadata": {"description": "

Solving inequalities that involve a quadratic and where the right-hand side is 0.

", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "ungrouped_variables": ["arootlist", "r1", "r2", "a", "choice", "sym", "prod"], "functions": {"graph": {"language": "javascript", "parameters": [], "definition": "var div = Numbas.extensions.jsxgraph.makeBoard('600px','600px',{boundingBox:[-15,15,15,-15],grid:true,axis:false});\nvar board = div.board;\n\n// create the x-axis.\nvar xaxis = board.create('line',[[0,0],[1,0]], { strokeColor: 'black', fixed: true});\nvar xticks = board.create('ticks',[xaxis,2],{\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n// create the y-axis\nvar yaxis = board.create('line',[[0,0],[0,1]], { strokeColor: 'black', fixed: true });\nvar yticks = board.create('ticks',[yaxis,2],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0\n});\n\n\na = Numbas.jme.unwrapValue(scope.variables.a);\nr1 = Numbas.jme.unwrapValue(scope.variables.r1);\nr2 = Numbas.jme.unwrapValue(scope.variables.r2);\nprod = Numbas.jme.unwrapValue(scope.variables.prod);\n\nif(prod==2 || prod==4 || prod==-2 || prod==-4){ptColour = 'green';} else {ptColour = 'red';};\n\nboard.create('point',[r1,0],{fixed:true,withLabel:false,strokeColor:ptColour, fillColor:ptColour});\nboard.create('point',[r2,0],{fixed:true,withLabel:false,strokeColor:ptColour,fillColor:ptColour});\n\nif(prod==2 || prod==-4 || prod== 1 || prod==-3){ outColour = 'green';} else {outColour = 'red';};\nif(prod==-2 || prod==4 || prod== -1 || prod==3){inColour = 'green'} else {inColour = 'red'};\n\nboard.create('functiongraph',[function(x){return a*(x**2-(r1+r2)*x+r1*r2);},r1,r2],{strokeColor:inColour,strokeWidth:2});\nboard.create('functiongraph',[function(x){return a*(x**2-(r1+r2)*x+r1*r2);},-15,r1],{strokeColor:outColour,strokeWidth:2});\nboard.create('functiongraph',[function(x){return a*(x**2-(r1+r2)*x+r1*r2);},r2,15],{strokeColor:outColour,strokeWidth:2});\n\nreturn div;", "type": "html"}}, "extensions": ["jsxgraph"], "variablesTest": {"condition": "", "maxRuns": 100}, "type": "question", "statement": "

The following will step you through solving the quadratic inequality \\[\\simplify{{a}x^2-{a}({r1}+{r2})x+{a*r1*r2}}\\var{latex(sym)}0\\]

", "preamble": {"js": "", "css": ""}, "tags": [], "parts": [{"showFeedbackIcon": true, "marks": 0, "scripts": {}, "showCorrectAnswer": true, "prompt": "

Find the roots of the quadratic involved in the inequality and order them in ascending order.

\n

\n

The smaller root is [[0]] and the larger root is [[1]].

\n

", "gaps": [{"correctAnswerStyle": "plain", "scripts": {}, "maxValue": "r1", "mustBeReducedPC": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "allowFractions": false, "minValue": "r1", "correctAnswerFraction": false, "variableReplacements": [], "mustBeReduced": false}, {"correctAnswerStyle": "plain", "scripts": {}, "maxValue": "r2", "mustBeReducedPC": 0, "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "numberentry", "showFeedbackIcon": true, "notationStyles": ["plain", "en", "si-en"], "marks": 1, "allowFractions": false, "minValue": "r2", "correctAnswerFraction": false, "variableReplacements": [], "mustBeReduced": false}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "type": "gapfill"}, {"showFeedbackIcon": true, "marks": 0, "scripts": {}, "showCorrectAnswer": true, "prompt": "

These two roots have broken the \$x\$-axis up into three regions:

\n

Left of the smaller root, between the roots, and right of the larger root.

\n

\n

Determine which regions satisfies the inequality \$\\simplify{{a}x^2-{a}({r1}+{r2})x+{a*r1*r2}}\\var{latex(sym)}0\$.

\n

The left region [[0]] the inequality.

\n

The middle region [[1]] the inequality.

\n

The right region [[2]] the inequality.

", "gaps": [{"choices": ["

satisfies

", "

does not satisfy

"], "maxMarks": 0, "scripts": {}, "minMarks": 0, "displayType": "dropdownlist", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "shuffleChoices": false, "showFeedbackIcon": true, "marks": 0, "displayColumns": 0, "matrix": ["if(prod=1 or prod=2 or prod=-3 or prod=-4,1,0)", "if(prod=1 or prod=2 or prod=-3 or prod=-4,0,1)"], "distractors": ["", ""], "variableReplacements": []}, {"choices": ["

satisfies

", "

does not satisfy

"], "maxMarks": 0, "scripts": {}, "minMarks": 0, "displayType": "dropdownlist", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "shuffleChoices": false, "showFeedbackIcon": true, "marks": 0, "displayColumns": 0, "matrix": ["if(prod=1 or prod=2 or prod=-3 or prod=-4,0,1)", "if(prod=1 or prod=2 or prod=-3 or prod=-4,1,0)"], "distractors": ["", ""], "variableReplacements": []}, {"choices": ["

satisfies

", "

does not satisfy

"], "maxMarks": 0, "scripts": {}, "minMarks": 0, "displayType": "dropdownlist", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "shuffleChoices": false, "showFeedbackIcon": true, "marks": 0, "displayColumns": 0, "matrix": ["if(prod=1 or prod=2 or prod=-3 or prod=-4,1,0)", "if(prod=1 or prod=2 or prod=-3 or prod=-4,0,1)"], "distractors": ["", ""], "variableReplacements": []}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "type": "gapfill"}, {"showFeedbackIcon": true, "marks": 0, "scripts": {}, "showCorrectAnswer": true, "prompt": "

The roots themselves [[0]] the inequality \$\\simplify{{a}x^2-{a}({r1}+{r2})x+{a*r1*r2}}\\var{latex(sym)}0\$.

", "gaps": [{"choices": ["

satisfy

", "

do not satisy

"], "maxMarks": 0, "scripts": {}, "minMarks": 0, "displayType": "dropdownlist", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "shuffleChoices": false, "showFeedbackIcon": true, "marks": 0, "displayColumns": 0, "matrix": ["if(choice=2 or choice=4,1,0)", "if(choice=2 or choice=4,0,1)"], "distractors": ["", ""], "variableReplacements": []}], "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "type": "gapfill"}, {"choices": ["

\$x\\le\\var{r1}\$, \$x\\ge\\var{r2}\$

", "

\$x<\\var{r1}\$, \$x>\\var{r2}\$

", "

\$\\var{r1} < x < \\var{r2}\$

\n

", "

\$\\var{r1} \\le x \\le \\var{r2}\$

\n

"], "maxMarks": 0, "scripts": {}, "minMarks": 0, "prompt": "

Which of the following is the solution to the inequality \$\\simplify{{a}x^2-{a}({r1}+{r2})x+{a*r1*r2}}\\var{latex(sym)}0\$?

", "displayType": "radiogroup", "showCorrectAnswer": true, "variableReplacementStrategy": "originalfirst", "type": "1_n_2", "shuffleChoices": false, "showFeedbackIcon": true, "marks": 0, "displayColumns": "1", "matrix": ["if(prod=2 or prod=-4,1,0)", "if(prod=1 or prod=-3,1,0)", "if(prod=-1 or prod=3,1,0)", "if(prod=-2 or prod=4,1,0)"], "distractors": ["", "", "", ""], "variableReplacements": []}], "rulesets": {}, "advice": "

The region approach is a common approach to solving an inequality that involves a quadratic:

\n

The inequality \$\\simplify{{a}x^2-{a}({r1}+{r2})x+{a*r1*r2}}\\var{latex(sym)}0\$ can be written in a factorised form as \$\\simplify{({a}x-{a*r1})(x-{r2})}\\var{latex(sym)}0\$ which means the roots are \$x=\\var{r1},\\, \\var{r2}\$.

\n

The three regions are \$x<\\var{r1}\$, \$\\var{r1}<x<\\var{r2}\$, and \$x>\\var{r2}\$.

\n

To test each region you can either choose a number in each region and actually check if the inequality is satisfied there (not recommended) or simply determine the sign, not the value, of each factor of the left hand side, that is:

\n
\n
1. When \$x<\\var{r1}\$, we have that \$(\\simplify{({a}x-{a*r1})})\$ is positive negative and \$(\\simplify{(x-{r2})})\$ is negative and therefore \$\\simplify{({a}x-{a*r1})(x-{r2})}\$ is positive negative. In otherwords, the inequality \$\\simplify{({a}x-{a*r1})(x-{r2})}\\var{latex(sym)}0\$ is satisfied not satisifed when \$x<\\var{r1}\$.
2. \n
3. When \$\\var{r1}<x<\\var{r2}\$, we have that \$(\\simplify{({a}x-{a*r1})})\$ is positive negative and \$(\\simplify{(x-{r2})})\$ is negative and therefore \$\\simplify{({a}x-{a*r1})(x-{r2})}\$ is positive negative. In otherwords, the inequality \$\\simplify{({a}x-{a*r1})(x-{r2})}\\var{latex(sym)}0\$ is not satisfied satisifed when \$\\var{r1}<x<\\var{r2}\$.
4. \n
5. When \$x>\\var{r2}\$, we have that \$(\\simplify{({a}x-{a*r1})})\$ is positive negative and \$(\\simplify{(x-{r2})})\$ is positive and therefore \$\\simplify{({a}x-{a*r1})(x-{r2})}\$ is positive negative. In otherwords, the inequality \$\\simplify{({a}x-{a*r1})(x-{r2})}\\var{latex(sym)}0\$ is satisfied not satisifed when \$x>\\var{r2}\$.
6. \n
\n

At the roots, the quadratic will equal zero and hence the given inequality will not be satisfied since the inequality symbol \$\\var{latex(sym)}\$ is not strict. That is, \$0\\not > 0\$ \$0 \\ge 0\$ \$0\\not < 0\$ \$0\\le 0\$.

\n

Finally we can say the solution to the inequality is \$x\\le\\var{r1}\$, \$x\\ge\\var{r2}\$ \$x<\\var{r1}\$, \$x>\\var{r2}\$ \$\\var{r1} < x < \\var{r2}\$ \$\\var{r1} \\le x \\le \\var{r2}\$.

\n

\n

Another common approach is sketching the parabola \$y=\\simplify{{a}x^2-{a}({r1}+{r2})x+{a*r1*r2}}\$ (by finding the roots and by noting the sign of the leading term determine if it is concave up or down) and then simply determining which parts of the graph satisfy the inequality. In the graph below, the green parts are those that correspond to \$x\$ values which satisfy the inequality and the red parts are those that do not.

\n

{graph()}

", "variables": {"choice": {"templateType": "anything", "description": "", "definition": "random(1..4)", "group": "Ungrouped variables", "name": "choice"}, "prod": {"templateType": "anything", "description": "", "definition": "a*choice", "group": "Ungrouped variables", "name": "prod"}, "r1": {"templateType": "anything", "description": "", "definition": "arootlist[0]", "group": "Ungrouped variables", "name": "r1"}, "r2": {"templateType": "anything", "description": "", "definition": "arootlist[1]", "group": "Ungrouped variables", "name": "r2"}, "sym": {"templateType": "anything", "description": "", "definition": "['>','\\\\ge','<','\\\\le'][choice-1]", "group": "Ungrouped variables", "name": "sym"}, "a": {"templateType": "anything", "description": "", "definition": "random(-1,1)", "group": "Ungrouped variables", "name": "a"}, "arootlist": {"templateType": "anything", "description": "", "definition": "sort(shuffle(-12..12)[0..2])", "group": "Ungrouped variables", "name": "arootlist"}}, "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}