// Numbas version: finer_feedback_settings {"name": "Quadratic Inequalities 2", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"metadata": {"licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International", "description": "
Solving inequalities that involve a quadratic and where the right-hand side is not 0.
"}, "type": "question", "preamble": {"css": "", "js": ""}, "advice": "Making one side of an equation or inequality equal to 0 is often an important first step in trying to solve an equation or inequality. Doing this to the original inequality $\\simplify{{a}x^2-{a}({r1}+{r2})x+{a*r1*r2+fudge}}\\var{latex(sym)}\\var{fudge}$, gives us
\n\\[\\simplify{{a}x^2-{a}({r1}+{r2})x+{a*r1*r2}}\\var{latex(sym)}0\\]
\nwhich is equivalent to the original (so has the same solutions) but easier to work with.
\n\nThe region approach is a common approach to solving an inequality that involves a quadratic:
\nThe 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}$.
\nThe three regions are $x<\\var{r1}$, $\\var{r1}<x<\\var{r2}$, and $x>\\var{r2}$.
\nTo 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:
\nAt 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$.
\nFinally 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\nAnother 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
{graph()}
", "rulesets": {}, "variable_groups": [], "functions": {"graph": {"type": "html", "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;", "language": "javascript", "parameters": []}}, "ungrouped_variables": ["arootlist", "r1", "r2", "a", "choice", "sym", "prod", "fudge"], "name": "Quadratic Inequalities 2", "tags": [], "variablesTest": {"condition": "", "maxRuns": 100}, "extensions": ["jsxgraph"], "variables": {"sym": {"name": "sym", "group": "Ungrouped variables", "definition": "['>','\\\\ge','<','\\\\le'][choice-1]", "description": "", "templateType": "anything"}, "prod": {"name": "prod", "group": "Ungrouped variables", "definition": "a*choice", "description": "", "templateType": "anything"}, "r2": {"name": "r2", "group": "Ungrouped variables", "definition": "arootlist[1]", "description": "", "templateType": "anything"}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "arootlist[0]", "description": "", "templateType": "anything"}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-1,1)", "description": "", "templateType": "anything"}, "fudge": {"name": "fudge", "group": "Ungrouped variables", "definition": "random(-24..24 except 0)", "description": "", "templateType": "anything"}, "arootlist": {"name": "arootlist", "group": "Ungrouped variables", "definition": "sort(shuffle(-12..12)[0..2])", "description": "", "templateType": "anything"}, "choice": {"name": "choice", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "templateType": "anything"}}, "statement": "The following will step you through solving the quadratic inequality \\[\\simplify{{a}x^2-{a}({r1}+{r2})x+{a*r1*r2+fudge}}\\var{latex(sym)}\\var{fudge}\\]
", "parts": [{"type": "gapfill", "scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "showCorrectAnswer": true, "gaps": [{"maxValue": "r1", "showCorrectAnswer": true, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "r1", "mustBeReduced": false, "correctAnswerFraction": false, "variableReplacements": [], "allowFractions": false}, {"maxValue": "r2", "showCorrectAnswer": true, "type": "numberentry", "variableReplacementStrategy": "originalfirst", "marks": 1, "showFeedbackIcon": true, "mustBeReducedPC": 0, "notationStyles": ["plain", "en", "si-en"], "scripts": {}, "correctAnswerStyle": "plain", "minValue": "r2", "mustBeReduced": false, "correctAnswerFraction": false, "variableReplacements": [], "allowFractions": false}], "prompt": "Rearrange the inequality so that the right-hand side is 0. The left-hand side will now be the quadratic you work with to solve the inequality.
\n\nFind the roots of the quadratic involved in the newly rearranged inequality and order them in ascending order.
\n\nThe smaller root is [[0]] and the larger root is [[1]].
\n", "variableReplacements": []}, {"type": "gapfill", "scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "showCorrectAnswer": true, "gaps": [{"type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "displayColumns": 0, "minMarks": 0, "distractors": ["", ""], "shuffleChoices": false, "scripts": {}, "variableReplacements": [], "displayType": "dropdownlist", "choices": ["satisfies
", "does not satisfy
"], "showCorrectAnswer": true, "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)"]}, {"type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "displayColumns": 0, "minMarks": 0, "distractors": ["", ""], "shuffleChoices": false, "scripts": {}, "variableReplacements": [], "displayType": "dropdownlist", "choices": ["satisfies
", "does not satisfy
"], "showCorrectAnswer": true, "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)"]}, {"type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "displayColumns": 0, "minMarks": 0, "distractors": ["", ""], "shuffleChoices": false, "scripts": {}, "variableReplacements": [], "displayType": "dropdownlist", "choices": ["satisfies
", "does not satisfy
"], "showCorrectAnswer": true, "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)"]}], "prompt": "These two roots have broken the $x$-axis up into three regions:
\nLeft of the smaller root, between the roots, and right of the larger root.
\n\nDetermine which regions satisfies the inequality $\\simplify{{a}x^2-{a}({r1}+{r2})x+{a*r1*r2+fudge}}\\var{latex(sym)}\\var{fudge}$.
\nThe left region [[0]] the inequality.
\nThe middle region [[1]] the inequality.
\nThe right region [[2]] the inequality.
", "variableReplacements": []}, {"type": "gapfill", "scripts": {}, "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "showCorrectAnswer": true, "gaps": [{"type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "displayColumns": 0, "minMarks": 0, "distractors": ["", ""], "shuffleChoices": false, "scripts": {}, "variableReplacements": [], "displayType": "dropdownlist", "choices": ["satisfy
", "do not
The roots themselves [[0]] the inequality $\\simplify{{a}x^2-{a}({r1}+{r2})x+{a*r1*r2+fudge}}\\var{latex(sym)}\\var{fudge}$.
", "variableReplacements": []}, {"type": "1_n_2", "maxMarks": 0, "variableReplacementStrategy": "originalfirst", "marks": 0, "showFeedbackIcon": true, "displayColumns": "1", "minMarks": 0, "distractors": ["", "", "", ""], "shuffleChoices": false, "scripts": {}, "variableReplacements": [], "displayType": "radiogroup", "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"], "showCorrectAnswer": true, "prompt": "Which of the following is the solution to the inequality $\\simplify{{a}x^2-{a}({r1}+{r2})x+{a*r1*r2+fudge}}\\var{latex(sym)}\\var{fudge}$?
", "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)"]}], "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/"}]}