Finite Limit at a Finite Point

Manipulate[
Module[{ptx,pt2x,pt3x,mandist1,mandist2,pty,pt2y,pt3y},
DynamicModule[{pt={xxx,f[xxx]},pt2={1,0},pt3={9,0}},
Deploy[Labeled[Column[{
LocatorPane[

Dynamic[{pt,pt2,pt3},{(pt={#[[1,1]],f[#[[1,1]]]};
xxx=#[[1,1]];
pt2={#[[2,1]],0};
pt3={#[[3,1]],0})&}],

ptx=Dynamic[pt[[1]]]; pty=Dynamic[pt[[2]]];
pt2x=Dynamic[pt2[[1]]]; pt2y=Dynamic[pt2[[2]]];
pt3x=Dynamic[pt3[[1]]]; pt3y=Dynamic[pt3[[2]]];

mandist1=Abs[pt2[[1]]-xxx];
mandist2=Abs[pt3[[1]]-xxx];

Deploy[Show[
Plot[f[x],{x,0,xmax},PlotStyle->Purple],
Graphics[{
{Lighter[Gray,0.5],Line[{{ptx,0},{ptx,ymax}}],Line[{{0,pty},{xmax,pty}}]},
{Orange,
If[autodelta,{Line[{{finv[pty-ep],0},{finv[pty-ep],ymax}}],Line[{{finv[pty+ep],0},{finv[pty+ep],ymax}}]},
{Line[{{pt2x,0},{pt2x,ymax}}],Line[{{pt3x,0},{pt3x,ymax}}]}]},
{Darker[Green,0.5],Line[{{0,pty-ep},{xmax,pty-ep}}],Line[{{0,pty+ep},{xmax,pty+ep}}]},
{Black,PointSize[0.015],Point[{Dynamic[pt]}]},{Text[Style["c",Italic,16],{ptx,0.3}]},
{Text[Style["L",Italic,16],{0.3,pty}]}
}],
PlotRange->{{0,xmax},{0,ymax}},ImagePadding->10,ImageSize->400,
Ticks->{Union[Table[{n,n},{n,0,xmax}],Table[{n,""},{n,0.5,xmax,1}]],Union[Table[{n,n},{n,0,xmax}],Table[{n,""},{n,0.5,xmax,1}]]}]],{{1.25,1.25},{10,5}},

Appearance->Style["●",Opacity[0]]
],

Text@Style[Row[{" ε = ",ep}],20,Darker[Green,0.5]],
Text@Style[Row[{StringJoin[" ",ToString[Subscript[δ,1],TraditionalForm]," = "],
If[autodelta,N[Abs[finv[f[xxx]-ep]-xxx]],mandist1],StringJoin["     ",ToString[Subscript[δ,2],TraditionalForm]," = "],
If[autodelta,N[Abs[finv[f[xxx]+ep]-xxx]],mandist2]}],20,Orange]
}],Text@Style[Row[{TraditionalForm[Limit[HoldForm[f[x]],x->c]]," = ",Style["L",Italic]}],20],Top]]
]],
{{ep,1,Style["ε",16]},0,2,ControlType->Slider,ControlPlacement->Top},
"None"->{{autodelta,True,"automatically calculate δ values"},{True,False},ControlPlacement->Bottom},
{{xxx,5,"c"},0,xmax,ControlType->Slider},
"None"->{{xmax,10},ControlType->None},
"None"->{{ymax,5},ControlType->None},
TrackedSymbols:>{ep,autodelta},
AutorunSequencing->{1,3},
Initialization:>(
f[x_]:=3(x-1)^(1/3)-2;
(*finv[y_]=x/.Flatten[Solve[y==f[x],x]];*)
finv[y_]:=1/27(35+12y+6y^2+y^3);
)]

CAPTION

The function f(x) has a finite limit, L, as x->c. This means that for any ε>0, there is an interval of width (Subscript[δ, 1])+ (Subscript[δ, 2]) around c (perhaps with (Subscript[δ, 1]) and (Subscript[δ, 2]) very small), such that |f(x)-L|<ε whenever x is in that interval. Move the point directly and adjust ε using the slider. This Demonstration computes the largest (Subscript[δ, 1]) and (Subscript[δ, 2]) for a given ε so that f(x) lies between L-ε  and L+ε. The values for (Subscript[δ, 1]) and (Subscript[δ, 2]) may be found automatically or manually by dragging. The function shown is f(x)=3 (((x-1))^(1/3))-2.

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Finite Limit at a Finite Point" from the Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/FiniteLimitAtAFinitePoint/

Contributed by: Abby Brown

A full-function Wolfram Mathematica system (Version 6 or higher) is required to edit this notebook.
GET WOLFRAM MATHEMATICA »

© Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »