// Numbas version: exam_results_page_options {"name": "Find the discontinuity in a piecewise-defined function", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {"w": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..3)", "name": "w", "description": ""}, "v": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(w=3,0,1)", "name": "v", "description": ""}, "b": {"group": "Ungrouped variables", "templateType": "anything", "definition": "a+random(1..3)", "name": "b", "description": ""}, "c": {"group": "Ungrouped variables", "templateType": "anything", "definition": "b+random(1..3)", "name": "c", "description": ""}, "er1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "t*0+(1-t)*random(-2,-1,1,2,3)", "name": "er1", "description": ""}, "dis": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(w=1,a,if(w=2,b,c))", "name": "dis", "description": ""}, "u": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(w=2,0,1)", "name": "u", "description": ""}, "er3": {"group": "Ungrouped variables", "templateType": "anything", "definition": "v*0+(1-v)*random(-2,-1,1,2,3)", "name": "er3", "description": ""}, "er2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "u*0+(1-u)*random(-2,-1,1,2,3)", "name": "er2", "description": ""}, "q1": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(1..4)", "name": "q1", "description": ""}, "q2": {"group": "Ungrouped variables", "templateType": "anything", "definition": "-random(1..3)", "name": "q2", "description": ""}, "a": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-3..3)", "name": "a", "description": ""}, "p": {"group": "Ungrouped variables", "templateType": "anything", "definition": "random(-9..9)", "name": "p", "description": ""}, "t": {"group": "Ungrouped variables", "templateType": "anything", "definition": "if(w=1,0,1)", "name": "t", "description": ""}}, "ungrouped_variables": ["q1", "a", "c", "q2", "er1", "er2", "er3", "p", "b", "u", "t", "w", "v", "dis"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Find the discontinuity in a piecewise-defined function", "functions": {"discont": {"type": "html", "language": "javascript", "definition": "var boxup=Math.max(3,p,p+er1,q1*(b-a)+p+er1,q1*(b-a)+p+er1+er2,q2*(c-b)*(c-b)+q1*(b-a)+p+er1+er2,q2*(c-b)*(c-b)+q1*(b-a)+p+er1+er2+er3)+2;\nvar boxdown=Math.min(-3,p,p+er1,q1*(b-a)+p+er1,q1*(b-a)+p+er1+er2,q2*(c-b)*(c-b)+q1*(b-a)+p+er1+er2,q2*(c-b)*(c-b)+q1*(b-a)+p+er1+er2+er3)-2;\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px', {axis:true, boundingbox:[Math.min(-2,a-2),boxup,Math.max(c+2,2),boxdown]});\nvar brd=div.board;\nvar l1=brd.create('functiongraph',[function(x){return p;},a-2,a],{strokeColor:'red'});\nvar l2=brd.create('functiongraph',[function(x){return q1*x+(p+er1-q1*a);},a,b],{strokeColor:'red'});\nvar l3=brd.create('functiongraph',[function(x){return q2*x*x-2*b*q2*x+(p+er1+er2+q2*b*b+q1*(b-a));},b,c],{strokeColor:'red'});\nvar l4=brd.create('functiongraph',[function(x){return q2*(c-b)*(c-b)+q1*(b-a)+p+er1+er2+er3;},c,c+2],{strokeColor:'red'});\nreturn div;\n", "parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["p", "number"], ["q1", "number"], ["q2", "number"], ["er1", "number"], ["er2", "number"], ["er3", "number"], ["dis", "number"]]}}, "showQuestionGroupNames": false, "parts": [{"scripts": {}, "gaps": [{"showPrecisionHint": false, "allowFractions": false, "scripts": {}, "type": "numberentry", "showCorrectAnswer": true, "minValue": "dis", "correctAnswerFraction": false, "marks": 3, "maxValue": "dis"}], "type": "gapfill", "prompt": "\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\n\n\n
$f(x) = \\left \\{ \\begin{array}{l} \\phantom{{.}} \\\\ \\phantom{{.}} \\\\ \\phantom{{.}} \\\\\\phantom{{.}} \\\\ \\phantom{{.}} \\\\ \\phantom{{.}}\\end{array} \\right .$$\\var{p},$$ x \\leq \\var{a},$
$\\simplify{{q1}*x+{p+er1-q1*a}},$$\\var{a} \\lt x \\leq \\var{b},$
$\\simplify{{q2}*x^2+{-2*q2*b}*x+{q2*b^2+q1*(b-a)+p+er1+er2}},$$\\var{b}\\lt x \\leq \\var{c},$
$\\var{q2*(c-b)^2+q1*(b-a)+p+er1+er2+er3},$$x \\gt \\var{c}.$
\n

$f$ is discontinuous at $x=a$ where $a=\\;$[[0]].

\n

", "showCorrectAnswer": true, "marks": 0}], "variablesTest": {"condition": "", "maxRuns": 100}, "statement": "

Find the point at which the following function $f:\\mathbb{R} \\rightarrow \\mathbb{R}$ is not continuous.

\n

", "tags": ["checked2015", "MAS2224"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": ""}, "advice": "

{discont(a,b,c,p,q1,q2,er1,er2,er3,dis)}

\n

\n

The function is discontinuous at $x=\\var{dis}$.

\n

At $x=\\var{dis}$ we have:

\n

\\[\\lim_{x \\nearrow\\; \\var{dis}} f(x) \\neq \\lim_{x \\searrow\\; \\var{dis}} f(x)\\]

\n

\n

\n

See graph of $f$ above.

", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}