// Numbas version: finer_feedback_settings {"name": "Inequalities involving a rational function/hyperbola", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Inequalities involving a rational function/hyperbola", "tags": [], "metadata": {"description": "
Harder inequalities that involve terms like $\\frac{1}{x}$ where multiplication by the denominator requires you to split into cases for positive or negative, or you multiply by the square of the denominator.
", "licence": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International"}, "statement": "Recall that with inequalities, you need to know whether an expression is positive or negative before you multiply or divide by it.
", "advice": "You can approach this question by considering the cases (where the denominator is negative or positive) separately. However, the following method uses a nice trick to ensure you know the sign of what you are multiplying by.
\nBefore we start manipulating the inequality, note that we can't divide by zero; hence, $x\\ne \\var[basic,fractionNumbers,simplifyFractions]{-b/d}$ (we may need this in our final answer).
\nNow multiply both sides of
\n\\[\\simplify{(x+{a})/({d}x+{b})} \\var{latex(sym)} \\var{c}\\]
\nby $(\\simplify{{d}x+{b}})^2$. This will get rid of the denominator with the added benefit that we know this quantity must be positive (it can't be negative and it can't be zero!) so we don't need to worry about swapping the direction of the inequality.
\n\\[\\simplify{(x+{a})*({d}x+{b})} \\var{latex(sym)} \\simplify{{c}*({d}x+{b})^2}\\]
\nThis introduces a quadratic, and so we can continue this question using the same method that we use when dealing with inequalities involving quadratics (we also need to recall $x\\ne \\var[basic,fractionNumbers,simplifyFractions]{-b/d}$).
\nLet's get everything on the right-hand side and factorise the common factor (our original denominator) out.
\n\\[\\begin{align}\\simplify{(x+{a})*({d}x+{b})} &\\var{latex(sym)} \\simplify{{c}*({d}x+{b})^2}\\\\ 0 &\\var{latex(sym)} \\simplify{{c}*({d}x+{b})^2-(x+{a})*({d}x+{b})} \\\\ 0 &\\var{latex(sym)}\\simplify{({d}x+{b})({c}({d}x+{b})-(x+{a}))}\\\\ 0&\\var{latex(sym)} \\simplify{({d}x+{b})({c*d-1}x+{c*b-a})} \\end{align}\\]
\n\nWe are probably more used to seeing this written the other way
\n\\[\\simplify{({d}x+{b})({c*d-1}x+{c*b-a})}\\var{latex(backsym)} 0\\]
\nSince the quadratic is now factorised, we can see the roots are $\\var[basic,fractionNumbers,simplifyFractions]{r1}$ and $\\var[basic,fractionNumbers,simplifyFractions]{r2}$.
\nNow we can either test the sign of each region $x< \\var[basic,fractionNumbers,simplifyFractions]{r1}$, $\\var[basic,fractionNumbers,simplifyFractions]{r1}<x<\\var[basic,fractionNumbers,simplifyFractions]{r2}$, and $x>\\var[basic,fractionNumbers,simplifyFractions]{r2}$ or we can sketch the parabola and determine which regions satisfy the inequality.
\n\nI'll use the parabola method:
\nSo we have the following situation (where red indicates the inequality is not satisfied and green indicates it is):
\n{graph()}
\n\nTherefore, the solution to the original inequality is
\n\\[\\var[basic,fractionNumbers,simplifyFractions]{r1} < x < \\var[basic,fractionNumbers,simplifyFractions]{r2}.\\]
\n\\[\\var[basic,fractionNumbers,simplifyFractions]{r1} < x \\le \\var[basic,fractionNumbers,simplifyFractions]{r2}.\\]
\n\\[\\var[basic,fractionNumbers,simplifyFractions]{r1} \\le x < \\var[basic,fractionNumbers,simplifyFractions]{r2}.\\]
\n\n\\[ x<\\var[basic,fractionNumbers,simplifyFractions]{r1} \\text{ or } x>\\var[basic,fractionNumbers,simplifyFractions]{r2}.\\]
\n\\[ x<\\var[basic,fractionNumbers,simplifyFractions]{r1} \\text{ or } x\\ge\\var[basic,fractionNumbers,simplifyFractions]{r2}.\\]
\n\\[ x\\le\\var[basic,fractionNumbers,simplifyFractions]{r1} \\text{ or } x>\\var[basic,fractionNumbers,simplifyFractions]{r2}.\\]
", "rulesets": {}, "extensions": ["jsxgraph"], "builtin_constants": {"e": true, "pi,\u03c0": true, "i": true, "j": false}, "constants": [], "variables": {"c": {"name": "c", "group": "Ungrouped variables", "definition": "random(-12..12 except [0,a])", "description": "", "templateType": "anything", "can_override": false}, "prod": {"name": "prod", "group": "Ungrouped variables", "definition": "leadCoeff*choice", "description": "", "templateType": "anything", "can_override": false}, "strict": {"name": "strict", "group": "Ungrouped variables", "definition": "if(choice=1 or choice=3,true,false)", "description": "", "templateType": "anything", "can_override": false}, "choice": {"name": "choice", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "templateType": "anything", "can_override": false}, "a": {"name": "a", "group": "Ungrouped variables", "definition": "random(-12..12 except 0)", "description": "", "templateType": "anything", "can_override": false}, "r2": {"name": "r2", "group": "Ungrouped variables", "definition": "rootList[1]", "description": "r2
", "templateType": "anything", "can_override": false}, "sym": {"name": "sym", "group": "Ungrouped variables", "definition": "['>','\\\\ge','<','\\\\le'][choice-1]", "description": "", "templateType": "anything", "can_override": false}, "one": {"name": "one", "group": "Ungrouped variables", "definition": "if(prod=1 or prod=2 or prod=-3 or prod=-4,true,false)", "description": "", "templateType": "anything", "can_override": false}, "backprod": {"name": "backprod", "group": "Ungrouped variables", "definition": "leadCoeff*backchoice", "description": "", "templateType": "anything", "can_override": false}, "backChoice": {"name": "backChoice", "group": "Ungrouped variables", "definition": "mod(choice+1,4)+1", "description": "", "templateType": "anything", "can_override": false}, "backsym": {"name": "backsym", "group": "Ungrouped variables", "definition": "['>','\\\\ge','<','\\\\le'][backChoice-1]", "description": "", "templateType": "anything", "can_override": false}, "b": {"name": "b", "group": "Ungrouped variables", "definition": "random(-12..12 except [0,a*d,d,-d])", "description": "", "templateType": "anything", "can_override": false}, "dr": {"name": "dr", "group": "Ungrouped variables", "definition": "precround(r2-r1,8) as \"number\"", "description": "", "templateType": "anything", "can_override": false}, "r1": {"name": "r1", "group": "Ungrouped variables", "definition": "rootList[0]", "description": "r1
", "templateType": "anything", "can_override": false}, "d": {"name": "d", "group": "Ungrouped variables", "definition": "random(-12..12 except -1..1)", "description": "d
", "templateType": "anything", "can_override": false}, "rootList": {"name": "rootList", "group": "Ungrouped variables", "definition": "sort([hole,nonhole])", "description": "", "templateType": "anything", "can_override": false}, "leadcoeff": {"name": "leadcoeff", "group": "Ungrouped variables", "definition": "sign(c*d^2-d)", "description": "", "templateType": "anything", "can_override": false}, "nonhole": {"name": "nonhole", "group": "Ungrouped variables", "definition": "(a-b*c)/(c*d-1)", "description": "", "templateType": "anything", "can_override": false}, "hole": {"name": "hole", "group": "Ungrouped variables", "definition": "-b/d", "description": "", "templateType": "anything", "can_override": false}, "extremey": {"name": "extremey", "group": "Ungrouped variables", "definition": "precround((r2-r1)^2/4,8) as \"number\" \n\n//abs((c*b-a)*b-(b*(d*d-1)+d*(c*b-a))^2/(4*d*(c*d-1)))", "description": "approx of the furthest we need to plot in the y direction
", "templateType": "anything", "can_override": false}, "holedec": {"name": "holedec", "group": "Ungrouped variables", "definition": "precround(hole,8) as \"number\"", "description": "", "templateType": "anything", "can_override": false}, "nonholedec": {"name": "nonholedec", "group": "Ungrouped variables", "definition": "precround(nonhole,8) as \"number\"", "description": "", "templateType": "anything", "can_override": false}, "r1dec": {"name": "r1dec", "group": "Ungrouped variables", "definition": "precround(r1,8) as \"number\"", "description": "", "templateType": "anything", "can_override": false}, "r2dec": {"name": "r2dec", "group": "Ungrouped variables", "definition": "precround(r2,8) as \"number\"", "description": "", "templateType": "anything", "can_override": false}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["choice", "sym", "a", "c", "d", "b", "leadcoeff", "prod", "one", "rootList", "r1", "r2", "strict", "backChoice", "backsym", "extremey", "backprod", "dr", "hole", "nonhole", "holedec", "nonholedec", "r1dec", "r2dec"], "variable_groups": [], "functions": {"graph": {"parameters": [], "type": "html", "language": "javascript", "definition": "a = Numbas.jme.unwrapValue(scope.variables.leadcoeff);\nr1 = Numbas.jme.unwrapValue(scope.variables.r1dec);\nr2 = Numbas.jme.unwrapValue(scope.variables.r2dec);\nprod = Numbas.jme.unwrapValue(scope.variables.backprod);\ndr = Numbas.jme.unwrapValue(scope.variables.dr);\nexy = Numbas.jme.unwrapValue(scope.variables.extremey);\nhole = Numbas.jme.unwrapValue(scope.variables.holedec);\nnonhole = Numbas.jme.unwrapValue(scope.variables.nonholedec);\n\nvar div = Numbas.extensions.jsxgraph.makeBoard('600px','600px',{boundingBox:[r1-dr,1.2*exy,r2+dr,-1.2*exy],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\u00a0 drawLabels: true,\n\u00a0 label: {offset: [-4, -10]},\n\u00a0 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,10],{\ndrawLabels: true,\nlabel: {offset: [-20, 0]},\nminorTicks: 0,\n});\n\n\nif(prod==2 || prod==4 || prod==-2 || prod==-4){ptColour = 'green';} else {ptColour = 'red';};\n\nboard.create('point',[hole,0],{fixed:true,withLabel:false,strokeColour:'red', fillColor:'red'});\nboard.create('point',[nonhole,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);},r1-dr,r1],{strokeColor:outColour,strokeWidth:2});\nboard.create('functiongraph',[function(x){return a*(x**2-(r1+r2)*x+r1*r2);},r2,r2+dr],{strokeColor:outColour,strokeWidth:2});\n\nreturn div;\n"}}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "gapfill", "useCustomName": false, "customName": "", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "The solution to the inequality
\n\\[\\simplify{(x+{a})/({d}x+{b})} \\var{latex(sym)} \\var{c}\\]
\nis made up of [[0]]
\nGiven by the condition [[1]].
\nNote: To type $\\ge$ use >= and for $\\le$ use <=.
Note: If your answer consists of two intervals, such as $x<-\\frac{1}{2}, \\,x\\ge 5$, type your inequalities with the word or between them, such as x<-1/2 or x>=5, rather than using a comma between them.
one interval.
", "two intervals.
"], "matrix": ["if(one=true,1,0)", "if(one=false,1,0)"], "distractors": ["", ""]}, {"type": "jme", "useCustomName": false, "customName": "", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "answer": "switch({one}=true and ({choice}=1 or {choice}=3), {r1}-1<x<2, or maybe something like, x<-2 or x>=3."}, "valuegenerators": [{"name": "x", "value": "random([r1-0.01,r1,r1+0.01,r2-0.01,r2,r2+0.01])"}]}], "sortAnswers": false}], "partsMode": "all", "maxMarks": 0, "objectives": [], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Daniel Sutherland", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/16947/"}], "resources": []}]}], "contributors": [{"name": "Ben Brawn", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/605/"}, {"name": "Daniel Sutherland", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/16947/"}]}