Limits and Continuity in Higher Dimensions

δ-ϵ Definition of Limit Animation

Example  f(x,y)=((3(x^2)y)/((x^2)+(y^2)))as (x,y)->(0,0)

Let ϵ>0. 

We want to find δ>0 such that |f(x,y)-0|<ϵ whenever 0 <(Sqrt[(x^2)+(y^2)])<δ.

|((3(x^2)y)/((x^2)+(y^2)))|<ϵ      leads to    |((3(x^2)y)/((x^2)+(y^2)))|<  3 |y| =3(Sqrt[(y^2)])<3(Sqrt[(x^2)+(y^2)]).

Note: The first step uses  ((x^2)/((x^2)+(y^2)))<1

Choose δ=ϵ/3, and we have     
|((3(x^2)y)/((x^2)+(y^2)))|<3(Sqrt[(x^2)+(y^2)])<3δ   (since (Sqrt[(x^2)+(y^2)])<δ)
|((3(x^2)y)/((x^2)+(y^2)))|<3(Sqrt[(x^2)+(y^2)])<3((ϵ/3)) =ϵ (our choice for δ)

So, we have shown that if  δ=ϵ/3, then |f(x,y)-0|<ϵ whenever 0 <(Sqrt[(x^2)+(y^2)])<δ.

By the definition of the limit, this proves that the limit exists.

Here's an animation of this specific example, but don't worry too much about all the Mathematica I had to write to make it work.

SeedRandom[1];

point1[δ_]:=Module[{x,y},
Label[START];
x=RandomReal[{-δ,δ},1];
y=RandomReal[{-δ,δ},1];
If[((x^2)+(y^2))[[1]]<(δ^2),Return[Flatten[{x,y}]],Goto[START]]
]

circle1[δ_]:=Show[
Graphics[Disk[point1[δ],0.04]],
Graphics[{Red,Thick,Circle[{0,0},δ]}],
Axes->True,AxesLabel->{"x","y"},PlotRange->{{-1,1},{-1,1}}]

line1[ϵ_]:=Show[
Graphics[Disk[Flatten[{RandomReal[{-ϵ,ϵ},{1}],0}],0.1]],Graphics[{Blue,Thick,Line[{{-ϵ,0},{ϵ,0}}]}],
Axes->{True,None},AxesLabel->{"z=f(x,y)"},
BaseStyle->Large,PlotRange->{{-2,2},{-1,1}}]

Manipulate[Show[GraphicsGrid[{{circle1[ϵ/3],line1[ϵ]}}],ImageSize->{600,Automatic}],{ϵ,2,0.1,-0.1}]

Notice that the for the points inside the circle of radius δ centered at (0,0) on the right, the value of the function at that point on the left is always within a the interval (-ϵ+L,ϵ+L)

Showing Limits Exist or Do Not Exist

Example f(x,y)=((Sin[(x^2)+(y^2)])/((x^2)+(y^2)))as (x,y)->(0,0)

f[x_,y_]=((Sin[(x^2)+(y^2)])/((x^2)+(y^2)))

Plot3D[f[x,y],{x,-1,1},{y,-1,1},PlotPoints->60]

Notice the function appears to be well defined near (0,0). We can investigate nujmerically by evaluating f(x,y) for points near (0,0):

data1 = Table[f[x,y],{x,-1,1,0.25},{y,-1,1,0.25}];
TableForm[SetPrecision[data1,2],TableHeadings->{Automatic,Automatic}]
ListPlot3D[data1,Axes->False]

Notice that near (0,0) all the numbers are approaching 1. This makes us think that the limit must exist, and equal 1.

Try to evaluate the limit by direct substitution:

f[0,0]

To prove the limit exists and equals zero, we would need to use the δ-ϵ definition of limit, or the squeeze theorem, or Taylor series even. I like the Taylor series here (anyone who goes on to take Analysis will see more of the δ-ϵ definition of limit):

f(x,y)=((Sin[(x^2)+(y^2)])/((x^2)+(y^2)))~(((x^2)+(y^2)+0[((((x^2)+(y^2)))^3)])/((x^2)+(y^2)))=1+((0[((((x^2)+(y^2)))^3)])/((x^2)+(y^2)))
So as (x,y)->(0,0)
the numerator in the second term will go to zero faster than the denominator, and we are left with
f(x,y)->1 as (x,y)->(0,0).

Example f(x,y)=((2(x^2)y)/((x^4)+(y^2)))as (x,y)->(0,0)

f[x_,y_]=((2(x^2)y)/((x^4)+(y^2)))

Plot3D[f[x,y],{x,-1,1},{y,-1,1},PlotPoints->60]

Notice the function appears "choppy" in the Mathematica plot. I upped the number of points used and it still appears choppy. This is an indication that the limit might not exist. We can investigate nujmerically by evaluating f(x,y) for points near (0,0):

data1 = Table[f[x,y],{x,-0.2,0.2,0.05},{y,-0.2,0.2,0.05}];
TableForm[SetPrecision[data1,2],TableHeadings->{Automatic,Automatic}]
ListPlot3D[data1,Axes->False]

Notice that around the point (0,0) in the table it looks like everything is going to zero. This provides false hope that the limit will exist! Really, the table can only give you an idea of what's happening along the paths x=0, y=0, and the diagonals y=±x.

Limit[f[x,y]/.y->0,x->0]
Limit[f[x,y]/.x->0,y->0]
Limit[f[x,y]/.y-> x,x->0]
Limit[f[x,y]/.y-> -x,x->0]

None of the above proves the limit exists. We shall see that in this case, the limit along all those paths is 0, but the limit along the path y=k (x^2) depends on k.

Try to evaluate the limit by direct substitution:

f[0,0]

Since we got an indeterminant form, we should start investigating the limit along paths.

Limit along the path y=k (x^2):

Limit[f[x,y]/.y->k (x^2),x->0]

Since the limit depends on the path taken to the point (0,0), the limit does not exist.

Note, you really need to be looking at paths, and not just taking the limit as first x goes to zero then y and then reversing the order since that gives incorrect results!

Limit[Limit[f[x,y],x->0],y->0]
Limit[Limit[f[x,y],y->0],x->0]

THE ABOVE DOES NOT TELL YOU THAT THE LIMIT IS ZERO--THAT IS INCORRECT LOGIC!! You never take the limit as one variable approaches zero and then the other variable approaches zero. You must be able to use direct subsitution to evaluate the limit, and if that doesn't work then you start investigating along different paths.

Example f(x,y)=((x y)/(|x y|))as (x,y)->(0,0)

f[x_,y_]=((x y)/(Sqrt[(((x y))^2)]))

Plot3D[f[x,y],{x,-1,1},{y,-1,1},PlotPoints->60]

Try to evaluate the limit by direct substitution:

f[0,0]

Since we got an indeterminant form, we should start investigating the limit along paths.

Limit along the path y=k x:

Limit[f[x,y]/.y->k x,x->0]

Since the limit depends on the path taken to the point (0,0), the limit does not exist (the value of the limit is different for k=1 compared to k=-1for example).

Example f(x,y)=Cos[(((x^3)-(y^3))/((x^2)+(y^2)))]as (x,y)->(0,0)

f[x_,y_]=Cos[(((x^3)-(y^3))/((x^2)+(y^2)))]

Plot3D[f[x,y],{x,-1,1},{y,-1,1},PlotPoints->60]

Notice the function appears smooth in the Mathematica plot, we expect the limit exists.

Try to evaluate the limit by direct substitution:

f[0,0]

Take a step back, and notice that what we need is the limit of (((x^3)-(y^3))/((x^2)+(y^2))).Since the numerator has a higher degree polynomial in x y than the deniominator, the numerator will go to zero faster than the denominator. Therefore, the limit here is 0, and the limit of f(x,y) is cos(0)=1.

Limit Along Two Paths Animation

Example  f(x,y)=((2(x^4))/((x^2)+(y^2)))as (x,y)->(0,0)

Here's an animation of this specific example, but again don't worry too much about all the Mathematica I had to write to make it work.

f[x_,y_]=((2(x^4))/((x^2)+(y^2)));

g1[x_]=-1*(x^2);
g2[x_]=+1*(x^2);

p1=Plot[g1[x],{x,-1,1},PlotRange->{{-1,1},{-1,1}},PlotStyle->Red];
p2=Plot[g2[x],{x,-1,1},PlotRange->{{-1,1},{-1,1}},PlotStyle->Blue];

surf=Plot3D[f[x,y],{x,-1,1},{y,-1,1},Mesh->False,PlotStyle->{Opacity[0.75]},AspectRatio->1];
p1surf=ParametricPlot3D[{x,f1[x],f[x,f1[x]]},{x,-1,1},PlotStyle->{Red,Thick}];
p2surf=ParametricPlot3D[{x,f2[x],f[x,f2[x]]},{x,-1,1},PlotStyle->{Blue,Thick}];

paths[x_]:=Show[
p1,p2,
Graphics[{Red,Disk[{x,g1[x]},0.04]}],
Graphics[{Blue,Disk[{x,g2[x]},0.04]}],
PlotRange->{{-1.4,1.4},{-1.4,1.4}},AspectRatio->1,AxesLabel->{"x","y"}];

surface[x_]=Plot

limit[x_]:=Show[surf,p1surf,p2surf,
Graphics3D[{Red,Sphere[{x,g1[x],f[x,f1[x]]},0.06]}],
Graphics3D[{Blue,Sphere[{x,g2[x],f[x,f2[x]]},0.06]}]
]

Manipulate[
Show[GraphicsGrid[{{paths[x],limit[x]}}],ImageSize->{700,Automatic}],
{x,1,0.02,-0.02}]

This limit exists (although what we have shown above is not enough to prove the limit exists).

Example  f(x,y)=((2(x^2)y)/((x^4)+(y^2)))as (x,y)->(0,0)

Here's an animation of this specific example, but again don't worry too much about all the Mathematica I had to write to make it work.

f[x_,y_]=((2(x^2)y)/((x^4)+(y^2)));

g1[x_]=-1*(x^2);
g2[x_]=+1*(x^2);

p1=Plot[g1[x],{x,-1,1},PlotRange->{{-1,1},{-1,1}},PlotStyle->Red];
p2=Plot[g2[x],{x,-1,1},PlotRange->{{-1,1},{-1,1}},PlotStyle->Blue];

surf=Plot3D[f[x,y],{x,-1,1},{y,-1,1},Mesh->False,PlotStyle->{Opacity[0.75]},AspectRatio->1];
p1surf=ParametricPlot3D[{x,f1[x],f[x,f1[x]]},{x,-1,1},PlotStyle->{Red,Thick}];
p2surf=ParametricPlot3D[{x,f2[x],f[x,f2[x]]},{x,-1,1},PlotStyle->{Blue,Thick}];

paths[x_]:=Show[
p1,p2,
Graphics[{Red,Disk[{x,g1[x]},0.04]}],
Graphics[{Blue,Disk[{x,g2[x]},0.04]}],
PlotRange->{{-1.4,1.4},{-1.4,1.4}},AspectRatio->1,AxesLabel->{"x","y"}];

surface[x_]=Plot

limit[x_]:=Show[surf,p1surf,p2surf,
Graphics3D[{Red,Sphere[{x,g1[x],f[x,f1[x]]},0.06]}],
Graphics3D[{Blue,Sphere[{x,g2[x],f[x,f2[x]]},0.06]}]
]

Manipulate[
Show[GraphicsGrid[{{paths[x],limit[x]}}],ImageSize->{700,Automatic}],
{x,1,0.02,-0.02}]

This limit does not exist.