// Numbas version: exam_results_page_options {"name": "Find discontinuities 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": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..3)", "description": "", "name": "w"}, "v": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(w=3,1,0)", "description": "", "name": "v"}, "b": {"templateType": "anything", "group": "Ungrouped variables", "definition": "a+random(1..3)", "description": "", "name": "b"}, "c": {"templateType": "anything", "group": "Ungrouped variables", "definition": "b+random(1..3)", "description": "", "name": "c"}, "er1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "t*0+(1-t)*random(1,2,3)", "description": "", "name": "er1"}, "u": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(w=2,1,0)", "description": "", "name": "u"}, "er3": {"templateType": "anything", "group": "Ungrouped variables", "definition": "v*0+(1-v)*random(1,2,3)", "description": "", "name": "er3"}, "er2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "u*0+(1-u)*random(1,2,3)", "description": "", "name": "er2"}, "lo1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "dis1", "description": "", "name": "lo1"}, "q1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(1..4)", "description": "", "name": "q1"}, "dis1": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(w=1,b,a)", "description": "", "name": "dis1"}, "q2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "-random(1..3)", "description": "", "name": "q2"}, "a": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-3..3)", "description": "", "name": "a"}, "dis2": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(w=3,b,c)", "description": "", "name": "dis2"}, "p": {"templateType": "anything", "group": "Ungrouped variables", "definition": "random(-9..9)", "description": "", "name": "p"}, "t": {"templateType": "anything", "group": "Ungrouped variables", "definition": "if(w=1,1,0)", "description": "", "name": "t"}}, "ungrouped_variables": ["q1", "a", "c", "q2", "er1", "er2", "er3", "dis1", "dis2", "p", "lo1", "u", "t", "w", "v", "b"], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Find discontinuities in a piecewise-defined function", "showQuestionGroupNames": false, "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)+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)+q1*(b-a)+p+er1+er2+er3)-2;\nvar div = Numbas.extensions.jsxgraph.makeBoard('400px','400px', {axis:true, boundingbox:[a-2,boxup,c+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+(p+er1+er2-q2*b+q1*(b-a));},b,c],{strokeColor:'red'});\nvar l4=brd.create('functiongraph',[function(x){return q2*(c-b)+q1*(b-a)+p+er1+er2+er3;},c,c+2],{strokeColor:'red'});\nreturn div;", "parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["p", "number"], ["q1", "number"], ["q2", "number"], ["er1", "number"], ["er2", "number"], ["er3", "number"]]}}, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "maxValue": "dis1", "minValue": "dis1", "correctAnswerFraction": false, "marks": 3}, {"showCorrectAnswer": true, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "maxValue": "dis2", "minValue": "dis2", "correctAnswerFraction": false, "marks": 3}], "type": "gapfill", "showCorrectAnswer": true, "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+{-q2*b+q1*(b-a)+p+er1+er2}},$$\\var{b}\\lt x \\leq \\var{c},$
$\\var{q2*(c-b)+q1*(b-a)+p+er1+er2+er3},$$x \\gt \\var{c}.$
\n

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

\n

$f$ is discontinuous at $x=b$ where $b=\\;$[[1]] (remember that $b \\gt a$).

", "marks": 0}], "statement": "

Find the $2$ points $x=a$ and  $x=b$, where $a \\lt b$,  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": ""}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

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

\n

\n

The function is discontinuous at $x=\\var{dis1},\\;\\;x=\\var{dis2}$.

\n

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

\n

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

\n

\n

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

\n

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

\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/"}]}