Epsilon-Delta Limit Definition

Adam Rumpf, 9/3/2021

Introduction

This Notebook contains a sequence of Manipulate environments for illustrating the epsilon-delta definition for the limit of a function. The included examples display a continuous function that approaches a well-defined limit, a discontinuous function with two different one-sided limits, and a function that oscillates infinitely and has no limit.

According to the epsilon-delta definition, a function f(x) approaches a limit L as x->a if and only if:

For any ϵ>0 there exists a δ>0 such that, for all x satisfying 0<|x-a|<δ, we have |f(x)-L|<ϵ.

This means that, for any tolerance value ϵ we care to choose, no matter how small, it will always be possible to find a small enough window δ around a for the function value to remain within distance ϵ of L over that entire window. The colored bands in the demonstrations below illustrate possible choices for these tolerances, with the horizontal bands corresponding to ϵ and the vertical bands corresponding to δ.

The function value at a as well as the centers of the color bands are left blank to illustrate that we need not consider what happens exactly when x=a, only what happens around a. Whether f(a) is defined or undefined has no bearing on the existence of the limit.

The environment includes controls to change the proposed limit L, the size of the ϵ-band, the size of the δ-band, and whether to display one-sided bands. According to the above definition, if L is truly the limit of f(x) as x->a, then no matter how small ϵ becomes it should always be possible to choose δ small enough for the entire curve to remain within the intersection of the two bands, although in general smaller values of ϵ may require smaller values of δ.

Code

Initialization

(* sample functions *)
f[x_]:=0.15(2(x^2)-5x+4Cos[2x+1])+2
g[x_]:=Piecewise[{{0.2x+2.5+0.25Sin[x-2],x<2},{Cos[x]+0.5x+1,x≥2}}]
h[x_]:=Sin[4/(x-2)]+2

(* driver to display the epsilon-delta demo for a given function *)
demo[func_]:=With[{a=2,xl=0,xu=4,yl=0,yu=4,emin=0.1,emax=1.0},Manipulate[Module[{gl,gr,hline,vline,hbar,vbar,blank=Graphics[]},
hline=Graphics[{Black,Dashed,InfiniteLine[{0,l},{1,0}]}];
vline=Graphics[{Black,Dashed,InfiniteLine[{a,0},{0,1}]}];
hbar=Graphics[{Yellow,Opacity[0.4],Rectangle[{xl-1,l+emin/2},{xu+1,l+ϵ}],Rectangle[{xl-1,l-ϵ},{xu+1,l-emin/2}]}];
vbar=Graphics[{Blue,Opacity[0.2],If[dir≠2,Rectangle[{a-δ,yl-1},{a-emin/2,yu+1}],Nothing],If[dir≠1,Rectangle[{a+emin/2,yl-1},{a+δ,yu+1}],Nothing]}];
gl=Plot[func[x],{x,xl,a-emin/2},PlotStyle->{Thick,Black}];
gr=Plot[func[x],{x,a+emin/2,xu},PlotStyle->{Thick,Black}];
Show[hline,vline,If[ϵs,hbar,blank],If[δs,vbar,blank],gl,gr,PlotRange->{{xl,xu},{yl,yu}},Axes->True,AspectRatio->Automatic]
],
{{l,1,"L"},yl,yu},{{ϵ,0.25,"ϵ"},emin,emax},{{δ,0.25,"δ"},emin,emax},{{ϵs,False,"show ϵ-band"},{False,True}},{{δs,False,"show δ-band"},{False,True}},{{dir,0,"side"},{0->"two-sided",1->"left-hand",2->"right-hand"},RadioButton}]]

Demonstration

(* continuous function *)
demo[f]

(* jump discontinuity *)
demo[g]

(* infinite oscillation *)
demo[h]