// Numbas version: exam_results_page_options {"name": "Algebra: solving equations, minimum and maximum $x$-values of a region", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"ungrouped_variables": ["a1", "b1", "c1", "x12", "x11", "a2", "x21", "x22", "a3", "b3", "x31", "x32", "area3", "x11_test"], "name": "Algebra: solving equations, minimum and maximum $x$-values of a region", "parts": [{"variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "type": "gapfill", "customMarkingAlgorithm": "", "marks": 0, "scripts": {}, "unitTests": [], "showCorrectAnswer": true, "extendBaseMarkingAlgorithm": true, "gaps": [{"variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "type": "numberentry", "correctAnswerStyle": "plain", "customMarkingAlgorithm": "", "mustBeReducedPC": 0, "marks": "0.5", "scripts": {}, "unitTests": [], "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": true, "showCorrectAnswer": true, "mustBeReduced": false, "minValue": "x11", "allowFractions": true, "maxValue": "x11", "extendBaseMarkingAlgorithm": true}, {"variableReplacementStrategy": "originalfirst", "variableReplacements": [], "showFeedbackIcon": true, "type": "numberentry", "correctAnswerStyle": "plain", "customMarkingAlgorithm": "", "mustBeReducedPC": 0, "marks": "0.5", "scripts": {}, "unitTests": [], "notationStyles": ["plain", "en", "si-en"], "correctAnswerFraction": true, "showCorrectAnswer": true, "mustBeReduced": false, "minValue": "x12", "allowFractions": true, "maxValue": "x12", "extendBaseMarkingAlgorithm": true}, {"variableReplacementStrategy": "originalfirst", "checkingType": "absdiff", "variableReplacements": [], "showFeedbackIcon": true, "type": "jme", "expectedVariableNames": [], "answer": "{a2*4}/4pi", "checkingAccuracy": 0.001, "marks": "0.5", "customMarkingAlgorithm": "", "showPreview": true, "unitTests": [], "checkVariableNames": false, "showCorrectAnswer": true, "answerSimplification": "all", "scripts": {}, "vsetRangePoints": 5, "failureRate": 1, "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true}, {"variableReplacementStrategy": "originalfirst", "checkingType": "absdiff", "variableReplacements": [], "showFeedbackIcon": true, "type": "jme", "expectedVariableNames": [], "answer": "{a2*4+4}/4pi", "checkingAccuracy": 0.001, "marks": "0.5", "customMarkingAlgorithm": "", "showPreview": true, "unitTests": [], "checkVariableNames": false, "showCorrectAnswer": true, "answerSimplification": "all", "scripts": {}, "vsetRangePoints": 5, "failureRate": 1, "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true}, {"variableReplacementStrategy": "originalfirst", "checkingType": "absdiff", "variableReplacements": [], "showFeedbackIcon": true, "type": "jme", "expectedVariableNames": [], "answer": "0", "checkingAccuracy": 0.001, "marks": "0.5", "customMarkingAlgorithm": "", "showPreview": true, "unitTests": [], "checkVariableNames": false, "showCorrectAnswer": true, "answerSimplification": "all", "scripts": {}, "vsetRangePoints": 5, "failureRate": 1, "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true}, {"variableReplacementStrategy": "originalfirst", "checkingType": "absdiff", "variableReplacements": [], "showFeedbackIcon": true, "type": "jme", "expectedVariableNames": [], "answer": "{b3}*pi", "checkingAccuracy": 0.001, "marks": "0.5", "customMarkingAlgorithm": "", "showPreview": true, "unitTests": [], "checkVariableNames": false, "showCorrectAnswer": true, "answerSimplification": "all", "scripts": {}, "vsetRangePoints": 5, "failureRate": 1, "vsetRange": [0, 1], "extendBaseMarkingAlgorithm": true}], "sortAnswers": false, "prompt": "

\n

(i) {plotgraph(1,x11,x12,a1,b1,c1,{x11-2},{x12+2},-3,15)}

\n

This is the graph of the function $f(x) = \\simplify{{a1}*(x+{b1})+{c1}}$.

\n

Determine the minimum and maximum $x$-values of the region. Enter the minimum first.

\n

[[0]],[[1]]

\n

\n

\n

(ii) {plotgraph(2,x21,x22,a2,0,0,-0.5,10,-1.2,1.2)}

\n

This is the graph of the function $f(x) = \\sin(x-\\frac{\\var{a2*4}}{4}\\pi)$.

\n

Determine the minimum and maximum $x$-values of the region. 

\n

Enter the minimum first. Enter the values exactly in terms of $\\pi$. To enter $\\pi$, type `pi'.

\n

[[2]], [[3]]

\n

\n

\n

(iii) {plotgraph(3,x31,x32,a3,b3,0,-1,x32*1.6,-1.2*a3,1.2*a3)}

\n

This curve has equation $y = \\simplify{{a3}*sin(x/{b3})}$.

\n

Determine the minimum and maximum $x$-values of the region.

\n

Enter the minimum first. Enter the values exactly in terms of $\\pi$. To enter $\\pi$, type `pi'.

\n

[[4]], [[5]]

\n

"}], "statement": "", "metadata": {"description": "

Three graphs are given with areas underneath them shaded. Student is asked to determine the minimum and maximum $x$-values of the regions. This will involve solving a linear equation and two trigonmetric equations.

", "licence": "Creative Commons Attribution 4.0 International"}, "tags": [], "rulesets": {}, "extensions": ["jsxgraph"], "preamble": {"js": "", "css": ""}, "functions": {"plotgraph": {"definition": "// Shading under a graph! This function plots one of three graphs\n// depending on the value of q. It shades the area between the\n// graph and x-axis depending between x1 and x2\n\n\n\n// First, make the JSXGraph board.\nvar div = Numbas.extensions.jsxgraph.makeBoard(\n '300px',\n '250px',\n {\n boundingBox: [xmin,ymax,xmax,ymin],\n axis: false,\n showNavigation: false,\n grid: false\n }\n);\n\n\n\n// div.board is the object created by JSXGraph, which you use to \n// manipulate elements\nvar brd = div.board; \n\n// create the x-axis.\nvar xaxis = brd.create('axis',\t[ [0,0],[1,0] ]);\nxaxis.removeAllTicks();\nbrd.create('ticks',[xaxis,1],{\n strokeColor:'#ccc',\n majorHeight:-1,\n drawLabels: true,\n label: {offset: [-4, -10]},\n minorTicks: 0\n});\n\n\n// create the y-axis\nvar yaxis = brd.create('axis',\t[ [0,0],[0,1] ]);\nyaxis.removeAllTicks();\nbrd.create('ticks', [yaxis, 1], {\n strokeColor:'#ccc',\n majorHeight:-1, // Need this because the JXG.Options one doesn't apply\n drawLabels:true, // Only works for equidistant ticks\n label: {offset: [7, -2]},\n minorTicks:1, // The NUMBER of small ticks between each Major tick\n drawZero:false\n }\n);\n\n\n\n\n\n// This function shades in the area below the graph of f\n// between the x values x1 and x2\n\nvar shade = function(f,x1,x2,colour) {\n var dataX1 = [x1,x1];\n var dataY1 = [0,f(x1)];\n\n var dataX2 = [];\n var dataY2 = [];\n for (var i = x1; i <= x2; i = i+0.01) {\n dataX2.push(i);\n dataY2.push(f(i));\n }\n\n var dataX3 = [x2,x2];\n var dataY3 = [f(x2),0];\n\n dataX = dataX1.concat(dataX2).concat(dataX3);\n dataY = dataY1.concat(dataY2).concat(dataY3);\n\nvar shading = brd.create('curve', [dataX,dataY],{strokeWidth:0, fillColor:colour, fillOpacity:0.2});\n\nreturn shading;\n}\n\n\n//Define your functions\nvar f1 = function(x) {\n return a*(x+b)+c;\n}\n\nvar f2 = function(x) {\n return Math.sin(x-a*3.141);\n}\n\nvar f3 = function(x) {\n return a*Math.sin(x/b);\n}\n\n\n//Plot the graph and do shading\nswitch(q) {\n case 1:\n brd.create('functiongraph', [f1]);\n shade(f1,x1,x2, 'red');\n break;\n case 2:\n brd.create('functiongraph', [f2]);\n shade(f2,x1,x2,'red');\n break;\n case 3:\n brd.create('functiongraph', [f3]);\n shade(f3,x1,x2,'red');\n break;\n}\n\n\n\nreturn div;", "parameters": [["q", "number"], ["x1", "number"], ["x2", "number"], ["a", "number"], ["b", "number"], ["c", "number"], ["xmin", "number"], ["xmax", "number"], ["ymin", "number"], ["ymax", "number"]], "type": "html", "language": "javascript"}}, "advice": "

(i) The maximum can be read from the graph, and it is $\\var{x12}$.

\n

To determine the minimum, we need to solve $f(x)=0$. So,

\n

$\\simplify{{a1}(x+{b1})+{c1} = 0}$

\n

$\\simplify{{a1}(x+{b1}) = -{c1}}$

\n

$\\simplify{x+{b1} = -{c1}/{a1}}$

\n

$\\simplify{x = -{c1}/{a1} - {b1} = -{c1+b1*a1}/{a1}}$.

\n

So the minimum $x$-value is $\\simplify{-{c1+b1*a1}/{a1}}$.

\n

\n

\n

\n

\n

\n

\n

(ii) By looking at the graph, the minimum and maximum $x$-values correspond to solutions of $f(x)=0$.  In particular, they are the 2nd and 3rd positive solutions. Solving $f(x)=0$:

\n

$\\sin(x-\\frac{\\var{a2*4}}{4}\\pi) =0$

\n

$x-\\frac{\\var{a2*4}}{4}\\pi = \\ldots,-2\\pi, -\\pi,0,\\pi,2\\pi,3\\pi,\\ldots$

\n

$x = \\ldots, \\frac{\\var{a2*4-8}}{4}\\pi, \\frac{\\var{a2*4-4}}{4}\\pi, \\frac{\\var{a2*4}}{4}\\pi,\\frac{\\var{a2*4+4}}{4}\\pi,\\frac{\\var{a2*4+8}}{4}\\pi, \\frac{\\var{a2*4+12}}{4}\\pi,\\ldots$. (These values were obtained by adding $\\frac{\\var{a2*4}}{4}\\pi$ to the previous line.)

\n

\n

The 2nd and 3rd positive solutions are $\\frac{\\var{a2*4}}{4}\\pi$ and $\\frac{\\var{a2*4+4}}{4}\\pi$, which are the numbers we want.

\n

\n

\n

\n

\n

\n

(iii) The minimum $x$-value can be read off the graph, and it is $0$. The maximum $x$-value is the smallest positive solution of $\\simplify{{a3}*sin(x/{b3})} =0$. Solving this:

\n

$\\simplify{{a3}*sin(x/{b3})} =0$,

\n

$\\simplify{sin(x/{b3})} =0$,

\n

$\\simplify{x/{b3}} =\\ldots,-2\\pi, -\\pi,0,\\pi,2\\pi,3\\pi,\\ldots$,

\n

$ x = \\ldots, -\\var{2*b3} \\pi, -\\var{b3}\\pi, 0 , \\var{b3}\\pi,\\var{2*b3}\\pi,\\var{2*b3}\\pi, \\ldots$.  (These values were obtained by multiplying the previous line by $\\var{b3}$.)

\n

\n

The smallest positive solution is $\\var{b3}\\pi$, so this is the maximum $x$-value of the shaded region.

", "variables": {"a3": {"description": "", "name": "a3", "definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables"}, "area3": {"description": "", "name": "area3", "definition": "-a3*b3*x32*cos(x32/b3)/pi", "templateType": "anything", "group": "Ungrouped variables"}, "x22": {"description": "", "name": "x22", "definition": "x21+pi", "templateType": "anything", "group": "Ungrouped variables"}, "x11": {"description": "", "name": "x11", "definition": "-c1/a1 - b1", "templateType": "anything", "group": "Ungrouped variables"}, "x32": {"description": "", "name": "x32", "definition": "pi*b3", "templateType": "anything", "group": "Ungrouped variables"}, "a2": {"description": "", "name": "a2", "definition": "random(5..7#2)*1/4", "templateType": "anything", "group": "Ungrouped variables"}, "x11_test": {"description": "", "name": "x11_test", "definition": "mod(x11,1)", "templateType": "anything", "group": "Ungrouped variables"}, "c1": {"description": "", "name": "c1", "definition": "random(-1..-2)", "templateType": "anything", "group": "Ungrouped variables"}, "b1": {"description": "", "name": "b1", "definition": "random(2..3)", "templateType": "anything", "group": "Ungrouped variables"}, "x21": {"description": "", "name": "x21", "definition": "a2*pi", "templateType": "anything", "group": "Ungrouped variables"}, "x31": {"description": "", "name": "x31", "definition": "0", "templateType": "anything", "group": "Ungrouped variables"}, "x12": {"description": "", "name": "x12", "definition": "random(2..3)", "templateType": "anything", "group": "Ungrouped variables"}, "b3": {"description": "", "name": "b3", "definition": "random(2..5)", "templateType": "anything", "group": "Ungrouped variables"}, "a1": {"description": "", "name": "a1", "definition": "random(2..3)", "templateType": "anything", "group": "Ungrouped variables"}}, "variablesTest": {"condition": "x11_test<>0", "maxRuns": 100}, "variable_groups": [], "type": "question", "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}]}]}], "contributors": [{"name": "Lovkush Agarwal", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/1358/"}]}