// Numbas version: exam_results_page_options {"name": "Prove discontinuity of a function at a given point", "extensions": ["jsxgraph"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [], "variables": {}, "ungrouped_variables": [], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Prove discontinuity of a function at a given point", "showQuestionGroupNames": false, "functions": {"disc2": {"type": "html", "language": "javascript", "definition": "\nvar disc=function(x){\n if(x<=2){return x*x+1;}\n else {return x+4;}\n};\nvar div=Numbas.extensions.jsxgraph.makeBoard('600px','600px',\n {axis:true,\nboundingbox:[-2,10,5,-2]});\nvar brd=div.board;\nvar f=brd.create('functiongraph',[disc,-2,5]);\n//var e=brd.create('slider', [[4,6],[4,4],[0,1.5,1.5]],{name:'ε'});\nvar d=brd.create('slider', [[1,-1],[3,-1],[0,1.5,1.5]],{name:'δ'});\nvar dis=brd.create('point',[2,disc(2)],{fixed:true,size:1,name:''});\nvar a=brd.create('point',[2,0],{size:2,face:'x',name:'2'});\nvar im=brd.create('point',[0,disc(2)],{size:2,face:'x',name:''});\nvar imPlus=brd.create('point',[0,function(){return disc(2)+0.5;}],{size:2,face:'x',name:'5.5'});\nvar imMinus=brd.create('point',[0,function(){return disc(2)-0.5;}],{size:2,face:'x',name:'4.5'});\nvar dPlus=brd.create('point',[function(){return 2+d.Value();},0],{size:2,face:'x',name:'2+δ'});\nvar fdPlus=brd.create('point',[function(){return 2+d.Value();},function(){return disc(2+d.Value());}],{size:2,face:'x',name:''});\nvar pt=brd.create('point',[function(){return 2+d.Value()/2;},0],{size:2,face:'x',name:'2+δ/2'});\nvar fpt=brd.create('point',[function(){return 2+d.Value()/2;},function(){return disc(2+d.Value()/2);}],{size:2,face:'x',name:''});\nvar impt=brd.create('point',[0,function(){return disc(2+d.Value()/2);}],{size:2,face:'x',name:'f(2+δ/2)'});\nvar dMinus=brd.create('point',[function(){return 2-d.Value();},0],{size:2,face:'x',name:'2-δ'});\nvar fdMinus=brd.create('point',[function(){return 2-d.Value();},function(){return disc(2-d.Value());}],{size:2,face:'x',name:''});\nvar seg1=brd.create('segment',[dMinus,fdMinus],{strokeColor:'black',dash:1});\nvar seg2=brd.create('segment',[dPlus,fdPlus],{strokeColor:'black',dash:1});\n\nvar ifdPlus=brd.create('point',[0,function(){return disc(2+d.Value());}],{size:2,face:'x',name:''});\nvar ifdMinus=brd.create('point',[0,function(){return disc(2-d.Value());}],{size:2,face:'x',name:''});\nvar seg3=brd.create('segment',[fdMinus,ifdMinus],{strokeColor:'black',dash:1});\nvar seg4=brd.create('segment',[fdPlus,ifdPlus],{strokeColor:'black',dash:1});\nvar seg5=brd.create('segment',[imMinus,imPlus],{strokeColor:'red'});\nvar seg6=brd.create('segment',[pt,fpt],{strokeColor:'red',dash:1});\nvar seg7=brd.create('segment',[fpt,impt],{strokeColor:'red',dash:1});\nreturn div;\n", "parameters": []}, "disc": {"type": "html", "language": "javascript", "definition": "\nvar disc=function(x){\n if(x<=2){return x*x+1;}\n else {return x+4;}\n};\nvar div=Numbas.extensions.jsxgraph.makeBoard('600px','600px',\n {axis:true,\n boundingbox:[-2,10,5,-2]});\nvar brd=div.board;\nvar f=brd.create('functiongraph',[disc,-2,5]);\nvar e=brd.create('slider', [[4,6],[4,4],[0,1.5,1.5]],{name:'ε'});\nvar d=brd.create('slider', [[1,-1],[3,-1],[0,1.5,1.5]],{name:'δ'});\nvar dis=brd.create('point',[2,disc(2)],{fixed:true,size:1,name:''});\nvar a=brd.create('point',[2,0],{size:2,face:'x',name:'2'});\nvar im=brd.create('point',[0,disc(2)],{size:2,face:'x',name:'f(2)=5'});\nvar imPlus=brd.create('point',[0,function(){return disc(2)+e.Value();}],{size:2,face:'x',name:'5+ε'});\nvar imMinus=brd.create('point',[0,function(){return disc(2)-e.Value();}],{size:2,face:'x',name:'5-ε'});\nvar dPlus=brd.create('point',[function(){return 2+d.Value();},0],{size:2,face:'x',name:'2+δ'});\nvar fdPlus=brd.create('point',[function(){return 2+d.Value();},function(){return disc(2+d.Value());}],{size:2,face:'x',name:''});\nvar dMinus=brd.create('point',[function(){return 2-d.Value();},0],{size:2,face:'x',name:'2-δ'});\nvar fdMinus=brd.create('point',[function(){return 2-d.Value();},function(){return disc(2-d.Value());}],{size:2,face:'x',name:''});\nvar seg1=brd.create('segment',[dMinus,fdMinus],{strokeColor:'black',dash:1});\nvar seg2=brd.create('segment',[dPlus,fdPlus],{strokeColor:'black',dash:1});\n\nvar ifdPlus=brd.create('point',[0,function(){return disc(2+d.Value());}],{size:2,face:'x',name:'f(2+δ)'});\nvar ifdMinus=brd.create('point',[0,function(){return disc(2-d.Value());}],{size:2,face:'x',name:'f(2-δ)'});\nvar seg3=brd.create('segment',[fdMinus,ifdMinus],{strokeColor:'black',dash:1});\nvar seg4=brd.create('segment',[fdPlus,ifdPlus],{strokeColor:'black',dash:1});\nvar seg5=brd.create('segment',[imMinus,imPlus],{strokeColor:'red'});\nreturn div;\n", "parameters": []}}, "parts": [{"scripts": {}, "gaps": [{"showCorrectAnswer": true, "showPrecisionHint": false, "scripts": {}, "allowFractions": false, "type": "numberentry", "maxValue": "1", "minValue": "1e-24", "correctAnswerFraction": false, "marks": 2}], "type": "gapfill", "showCorrectAnswer": true, "prompt": "

Value of $\\epsilon=\\;$[[0]]  (enter as a decimal).

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

{disc()}

\n

The graph above is of the function :

\n

\\[\\begin{eqnarray} f(x)&=&x^2+1,\\;\\;\\;&x&\\leq 2\\\\
&=&x+4,\\;\\;\\;&x& \\gt 2 
\\end{eqnarray}\\]

\n

\n

The red dot indicates that the point $(2,5)$ lies on the graph.

\n

In order for the function $f$ to be continuous at $x=2$, you have to show that given any $\\epsilon \\gt 0$ you can find a $\\delta \\gt 0$ such that the interval $(2-\\delta,2+\\delta)$ is mapped entirely within the interval $(f(2)-\\epsilon,f(2)+\\epsilon)=(5-\\epsilon,5+\\epsilon)$.

\n

In this example, you have to show $f$ is not continuous at $x=2$. So you have to find an $\\epsilon \\gt 0$ such that there is no such $\\delta$.

\n

Using the diagram above, this boils down to finding an $\\epsilon\\gt 0$ so that the interval $(2-\\delta,2+\\delta)$ is not mapped inside the interval $(5-\\epsilon,5+\\epsilon)$ (in red), for any $\\delta \\gt 0 $ .

\n

Experiment by changing the value of $\\epsilon$ using its slider to a value where no matter what positive value of $\\delta$ you choose by using its slider, the interval $(2-\\delta,2+\\delta)$ is not mapped by $f$ inside $(5-\\epsilon,5+\\epsilon)$. This gives a value of $\\epsilon$ you can use in a formal proof.

\n

", "tags": ["checked2015", "continuity", "continuous", "discontinuous", "functions", "Jsxgraph", "JSXgraph", "jsxgraph", "MAS2224"], "rulesets": {}, "preamble": {"css": "", "js": ""}, "type": "question", "metadata": {"notes": "

19/12/2013:

\n

Created.  Uses a fixed function. Next version will use functions created with random parameters.

", "licence": "Creative Commons Attribution 4.0 International", "description": "

A graphical approach to aiding students in writing down a formal proof of discontinuity of a function at a given point.

\n

Uses JSXgraph to sketch the graphs and involves some interaction/experimentation by students in finding appropriate intervals.

"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "

We see from the diagram and moving the intervals around that if $\\epsilon \\le1$ then we can never find a $\\delta \\gt 0$ such that $f$ maps $(2-\\delta,2+\\delta)$ inside $(f(2)-\\epsilon,f(2)+\\epsilon)$.

\n

{disc2()}

\n

We can now construct a formal proof using this:

\n

Take $\\epsilon = \\frac{1}{2}$, (you can choose any value of $\\epsilon, \\;\\;0 \\lt \\epsilon \\le 1$).

\n

Our task is now to show that for any $\\delta \\gt 0$ we choose, there is a point $x \\in (2-\\delta,2+\\delta)$ such that $f(x) \\notin (f(2)-\\epsilon,f(2)+\\epsilon)=(5-1/2,5+1/2)=(9/2,11/2)$.

\n

Looking at the diagram where we have chosen $\\epsilon = \\frac{1}{2}$ we see that the point $x=2+\\delta/2$ lies in $(2-\\delta,2+\\delta)$ and that $f(2+\\delta/2)=(2+\\delta/2)+4=6+\\delta/2 \\notin (9/2,11/2)$.

\n

Hence for this value of $\\epsilon$ we have shown that no matter what $\\delta \\gt 0$ we choose there is a point  $x \\in (2-\\delta,2+\\delta)$ such that $f(x) \\notin (f(2)-\\epsilon,f(2)+\\epsilon)=(9/2,11/2)$.

\n

So the function is discontinuous at $x=2$.

\n

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