Epsilon-Delta Tool

ArticleEpsilon-Delta Tool

Suppose you suspect that \[\lim_{x\rightarrow c}\,f(x)=L\]

This tool allows you to estimate values of \(\delta\) which guarantee that the function \(f(x)\) is within \(\epsilon\) units of the limit L for all values of \(x\) within \(\delta\) of \(c\) (i.e. \(|x-c|\lt\delta\)).

If the blue curve passes through the pink boxes, your value for delta needs to be smaller.

If no value of delta keeps the the blue curve out of the pink boxes, then the value of your limit (\(L\)) is wrong.

{{{ @interact def delta_epsilon(f = input_box(default=(x^2-x)/(x-1)), c=input_box(default=1), L = input_box(default=1), epsilon=input_box(label="epsilon",default=0.1), delta=input_box(label="delta",default=0.1)): xm = c-2*delta xM = c+2*delta f_left_plot = plot(f,xm,c-delta/20,thickness=2) f_right_plot = plot(f,c+delta/20,xM,thickness=2) epsilon_line_1 = line([(xm,L-epsilon),(xM,L-epsilon)], rgbcolor=(0.5,0.5,0.5),linestyle='--') epsilon_line_2 = line([(xm,L+epsilon),(xM,L+epsilon)], rgbcolor=(0.5,0.5,0.5),linestyle='--') ym = L-2*epsilon yM = L+2*epsilon bad_region_1 = polygon([(c-delta,L+epsilon),(c-delta,yM),(c+delta,yM),(c+delta,L+epsilon)], rgbcolor=(1,0.6,0.6)) bad_region_2 = polygon([(c-delta,L-epsilon),(c-delta,ym),(c+delta,ym),(c+delta,L-epsilon)], rgbcolor=(1,0.6,0.6)) cL_point = point((c,L),rgbcolor=(1,0,0),pointsize=20) delta_line_1 = line([(c-delta,ym),(c-delta,yM)],rgbcolor=(0.5,0.5,0.5),linestyle='--') delta_line_2 = line([(c+delta,ym),(c+delta,yM)],rgbcolor=(0.5,0.5,0.5),linestyle='--') (f_left_plot +f_right_plot +epsilon_line_1 +epsilon_line_2 +delta_line_1 +delta_line_2 +cL_point +bad_region_1 +bad_region_2).show(xmin=xm,xmax=xM,ymin=ym, ymax=yM, axes=False,frame=True, gridlines=[[c-1.5*delta, c-0.5*delta, c+0.5*delta, c+1.5*delta], [L-1.5*epsilon,L-0.5*epsilon,L+0.5*epsilon,L+1.5*epsilon]]) /// }}}