// Numbas version: finer_feedback_settings {"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": [], "metadata": {"notes": "", "description": "", "licence": "Creative Commons Attribution 4.0 International"}, "showQuestionGroupNames": false, "ungrouped_variables": ["q1", "a", "c", "q2", "er1", "er2", "er3", "dis1", "dis2", "p", "lo1", "u", "t", "w", "v", "b"], "tags": ["checked2015", "MAS2224"], "name": "Find discontinuities in a piecewise-defined function", "variablesTest": {"condition": "", "maxRuns": 100}, "question_groups": [{"pickQuestions": 0, "pickingStrategy": "all-ordered", "questions": [], "name": ""}], "type": "question", "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", "variables": {"t": {"templateType": "anything", "definition": "if(w=1,1,0)", "description": "", "group": "Ungrouped variables", "name": "t"}, "u": {"templateType": "anything", "definition": "if(w=2,1,0)", "description": "", "group": "Ungrouped variables", "name": "u"}, "er1": {"templateType": "anything", "definition": "t*0+(1-t)*random(1,2,3)", "description": "", "group": "Ungrouped variables", "name": "er1"}, "lo1": {"templateType": "anything", "definition": "dis1", "description": "", "group": "Ungrouped variables", "name": "lo1"}, "dis1": {"templateType": "anything", "definition": "if(w=1,b,a)", "description": "", "group": "Ungrouped variables", "name": "dis1"}, "v": {"templateType": "anything", "definition": "if(w=3,1,0)", "description": "", "group": "Ungrouped variables", "name": "v"}, "p": {"templateType": "anything", "definition": "random(-9..9)", "description": "", "group": "Ungrouped variables", "name": "p"}, "q1": {"templateType": "anything", "definition": "random(1..4)", "description": "", "group": "Ungrouped variables", "name": "q1"}, "er2": {"templateType": "anything", "definition": "u*0+(1-u)*random(1,2,3)", "description": "", "group": "Ungrouped variables", "name": "er2"}, "b": {"templateType": "anything", "definition": "a+random(1..3)", "description": "", "group": "Ungrouped variables", "name": "b"}, "a": {"templateType": "anything", "definition": "random(-3..3)", "description": "", "group": "Ungrouped variables", "name": "a"}, "er3": {"templateType": "anything", "definition": "v*0+(1-v)*random(1,2,3)", "description": "", "group": "Ungrouped variables", "name": "er3"}, "dis2": {"templateType": "anything", "definition": "if(w=3,b,c)", "description": "", "group": "Ungrouped variables", "name": "dis2"}, "w": {"templateType": "anything", "definition": "random(1..3)", "description": "", "group": "Ungrouped variables", "name": "w"}, "c": {"templateType": "anything", "definition": "b+random(1..3)", "description": "", "group": "Ungrouped variables", "name": "c"}, "q2": {"templateType": "anything", "definition": "-random(1..3)", "description": "", "group": "Ungrouped variables", "name": "q2"}}, "functions": {"discont": {"language": "javascript", "parameters": [["a", "number"], ["b", "number"], ["c", "number"], ["p", "number"], ["q1", "number"], ["q2", "number"], ["er1", "number"], ["er2", "number"], ["er3", "number"]], "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;", "type": "html"}}, "parts": [{"marks": 0, "scripts": {}, "prompt": "$f(x) = \\left \\{ \\begin{array}{l} \\phantom{{.}} \\\\ \\phantom{{.}} \\\\ \\phantom{{.}} \\\\\\phantom{{.}} \\\\ \\phantom{{.}} \\\\ \\phantom{{.}}\\end{array} \\right .$ | \n$\\var{p},$ | \n$ x \\leq \\var{a},$ | \n
\n | \n | |
$\\simplify{{q1}*x+{p+er1-q1*a}},$ | \n$\\var{a} \\lt x \\leq \\var{b},$ | \n|
\n | \n | |
$\\simplify{{q2}*x+{-q2*b+q1*(b-a)+p+er1+er2}},$ | \n$\\var{b}\\lt x \\leq \\var{c},$ | \n|
\n | \n | |
$\\var{q2*(c-b)+q1*(b-a)+p+er1+er2+er3},$ | \n$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$).
", "gaps": [{"marks": 3, "scripts": {}, "maxValue": "dis1", "allowFractions": false, "showPrecisionHint": false, "minValue": "dis1", "correctAnswerFraction": false, "showCorrectAnswer": true, "type": "numberentry"}, {"marks": 3, "scripts": {}, "maxValue": "dis2", "allowFractions": false, "showPrecisionHint": false, "minValue": "dis2", "correctAnswerFraction": false, "showCorrectAnswer": true, "type": "numberentry"}], "showCorrectAnswer": true, "type": "gapfill"}], "rulesets": {}, "advice": "{discont(a,b,c,p,q1,q2,er1,er2,er3)}
\n\nThe function is discontinuous at $x=\\var{dis1},\\;\\;x=\\var{dis2}$.
\nAt $x=\\var{dis1}$ we have:
\n\\[\\lim_{x \\nearrow\\; \\var{dis1}} f(x) \\neq \\lim_{x \\searrow\\; \\var{dis1}} f(x)\\]
\n\nAt $x=\\var{dis2}$ we have:
\n\\[\\lim_{x \\nearrow\\; \\var{dis2}} f(x) \\neq \\lim_{x \\searrow\\; \\var{dis2}} f(x)\\]
\n\nSee graph of $f$ above.
", "preamble": {"js": "", "css": ""}, "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}, {"name": "Xiaodan Leng", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/2146/"}]}