Example 1:

Here is a function of two variables that is not defined at zero:
(Note Abs[ ] is the function for absolute value

In[124]:=

F[x_, y_] := Abs[x]/Sqrt[x^2 + y^2]

In[125]:=

F[x, y]

Out[125]=

Abs[x]/(x^2 + y^2)^(1/2)

Here mathematica computes the limit from the x-axis direction

In[126]:=

Limit[F[x, 0], x0]

Out[126]=

1

and from the y-axis direction:

In[127]:=

Limit[F[0, y], y0]

Out[127]=

0

They are different--- This means the limit does not exist. Here is the contour plot:

In[128]:=

ContourPlot[F[x, y], {x, -1, 1}, {y, -1, 1}]

[Graphics:HTMLFiles/index_9.gif]

Out[128]=

⁃ContourGraphics⁃

Here is another contour plot, As we approach from the x-direction we see different colors then as we approach from the y direction

In[129]:=

ContourPlot[F[x, y], {x, -1, 1}, {y, -1, 1}, ContourLinesFalse, Contours100, PlotPoints200]

[Graphics:HTMLFiles/index_12.gif]

Out[129]=

⁃ContourGraphics⁃

In[130]:=

Plot3D[F[x, y], {x, -1, 1}, {y, -1, 1}, PlotPoints40, BoxRatiosAutomatic]

[Graphics:HTMLFiles/index_15.gif]

Out[130]=

⁃SurfaceGraphics⁃

This plots the section of our surface lying above a strip along the x-axis

In[131]:=

Plot3D[F[x, y], {x, -1, 1}, {y, -.1, .1}, PlotPoints {40, 7}, BoxRatiosAutomatic]

[Graphics:HTMLFiles/index_18.gif]

Out[131]=

⁃SurfaceGraphics⁃

This plots the section of our surface lying above a strip along the y-axis

In[132]:=

Plot3D[F[x, y], {x, -.1, .1}, {y, -1, 1}, PlotPoints {7, 40}, BoxRatiosAutomatic, ViewPoint {0, -1, 0}]

[Graphics:HTMLFiles/index_21.gif]

Out[132]=

⁃SurfaceGraphics⁃

Example 2:

Here is a function of two variables that is not defined at zero:

In[133]:=

F[x_, y_] := (Abs[x] + Abs[y])/Sqrt[x^2 + y^2]

In[134]:=

F[x, y]

Out[134]=

(Abs[x] + Abs[y])/(x^2 + y^2)^(1/2)

Here mathematica computes the limit from the x-axis direction

In[135]:=

Limit[F[x, 0], x0]

Out[135]=

1

and from the y-axis direction:

In[136]:=

Limit[F[0, y], y0]

Out[136]=

1

But from the x=y line direction:

In[137]:=

Limit[F[t, t], t0]

Out[137]=

2^(1/2)

They are different--- This means the limit does not exist. Here is the contour plot:

In[138]:=

ContourPlot[F[x, y], {x, -1, 1}, {y, -1, 1}]

[Graphics:HTMLFiles/index_33.gif]

Out[138]=

⁃ContourGraphics⁃

In[139]:=

ContourPlot[F[x, y], {x, -1, 1}, {y, -1, 1}, ContourLinesFalse, Contours100, PlotPoints100]

[Graphics:HTMLFiles/index_36.gif]

Out[139]=

⁃ContourGraphics⁃

In[140]:=

Plot3D[F[x, y], {x, -1, 1}, {y, -1, 1}, PlotPoints71]

[Graphics:HTMLFiles/index_39.gif]

Out[140]=

⁃SurfaceGraphics⁃

In[141]:=

Plot3D[F[x, y], {x, -1, 1}, {y, -1, 1}, PlotPoints31, ViewPoint {0, -1, .4}]

[Graphics:HTMLFiles/index_42.gif]

Out[141]=

⁃SurfaceGraphics⁃

Example 3

The following is an example where the function is not defined at (0,0) but the limit does exist

In[142]:=

F[x_, y_] := x y/Sqrt[x^2 + y^2]

In[143]:=

F[x, y]

Out[143]=

(x y)/(x^2 + y^2)^(1/2)

Note: Mathematica won't take a square root of t^2!

In[144]:=

F[t, t]

Out[144]=

t^2^(1/2)/2^(1/2)

However you can tell it to:

In[145]:=

PowerExpand[F[t, t]]

Out[145]=

t/2^(1/2)

In[146]:=

ContourPlot[F[x, y], {x, -1, 1}, {y, -1, 1}]

[Graphics:HTMLFiles/index_52.gif]

Out[146]=

⁃ContourGraphics⁃

In[147]:=

Plot3D[F[x, y], {x, -1, 1}, {y, -1, 1}]

[Graphics:HTMLFiles/index_55.gif]

Out[147]=

⁃SurfaceGraphics⁃

In[148]:=



Example 4

The following is a composition of a quotient of polynomials with a continuous function. Therefore it is continuous wherever it is defined. In this case, it is defined whenever x≠y.

In[149]:=

F[x_, y_] := Sin[(x^2 + y^2)/(x - y)]

In[150]:=

F[x, y]

Out[150]=

Sin[(x^2 + y^2)/(x - y)]

Here is a contour plot of this function:

In[151]:=

RowBox[{ContourPlot, [, RowBox[{F[x, y], ,, {x, -6, 6}, ,, RowBox[{{, RowBox[{y, ,, RowBox[{-, 6.1}], ,, 6.1}], }}]}], ]}]

[Graphics:HTMLFiles/index_62.gif]

Out[151]=

⁃ContourGraphics⁃

Here is my attempt to pretty it up. Notice the contour plot "goes nuts" near the line x=y.

In[152]:=

RowBox[{ContourPlot, [, RowBox[{F[x, y], ,, {x, -6, 6}, ,, RowBox[{{, RowBox[{y, ,, RowBox[{-, ... 54;100, ,, ContourLinesFalse, ,, PlotPoints200, ,, ColorFunctionHue}], ]}]

[Graphics:HTMLFiles/index_65.gif]

Out[152]=

⁃ContourGraphics⁃

Here is the graph:
(The errors come from Mathematica trying to plot where the function is not defined)

In[153]:=

Plot3D[F[x, y], {x, -6, 6}, {y, -6, 6}, PlotPoints100]

                                      1 Power :: infy : Infinite expression  --- encountered. More…                                      0.`

                                      1 Power :: infy : Infinite expression  --- encountered. More…                                      0.`

                                      1 Power :: infy : Infinite expression  --- encountered. More…                                      0.`

General :: stop : Further output of Power :: infy will be suppressed during this calculation. More…

Plot3D :: plnc : F[x, y] is neither a machine-size real number at {x, y} = {-6.`, -6.`} nor a list of a real number and a valid color directive. More…

Plot3D :: plnc : F[x, y] is neither a machine-size real number at {x, y} = {-5.878787878787879`, -5.878787878787879`} nor a list of a real number and a valid color directive. More…

Plot3D :: plnc : F[x, y] is neither a machine-size real number at {x, y} = {-5.757575757575758`, -5.757575757575758`} nor a list of a real number and a valid color directive. More…

General :: stop : Further output of Plot3D :: plnc will be suppressed during this calculation. More…

Plot3D :: gval : Function value Indeterminate at grid point xi = 1, yi = 1 is not a real number. More…

Plot3D :: gval : Function value Indeterminate at grid point xi = 2, yi = 2 is not a real number. More…

Plot3D :: gval : Function value Indeterminate at grid point xi = 3, yi = 3 is not a real number. More…

General :: stop : Further output of Plot3D :: gval will be suppressed during this calculation. More…

[Graphics:HTMLFiles/index_80.gif]

Out[153]=

⁃SurfaceGraphics⁃

Here we "zoom" in to the point (0,0)

In[154]:=

Plot3D[F[x, y], {x, -1, 1}, {y, -1, 1}, PlotPoints100]

                                      1 Power :: infy : Infinite expression  --- encountered. More…                                      0.`

                                      1 Power :: infy : Infinite expression  --- encountered. More…                                      0.`

                                      1 Power :: infy : Infinite expression  --- encountered. More…                                      0.`

General :: stop : Further output of Power :: infy will be suppressed during this calculation. More…

Plot3D :: plnc : F[x, y] is neither a machine-size real number at {x, y} = {-1.`, -1.`} nor a list of a real number and a valid color directive. More…

Plot3D :: plnc : F[x, y] is neither a machine-size real number at {x, y} = {-0.9797979797979798`, -0.9797979797979798`} nor a list of a real number and a valid color directive. More…

Plot3D :: plnc : F[x, y] is neither a machine-size real number at {x, y} = {-0.9595959595959596`, -0.9595959595959596`} nor a list of a real number and a valid color directive. More…

General :: stop : Further output of Plot3D :: plnc will be suppressed during this calculation. More…

Plot3D :: gval : Function value Indeterminate at grid point xi = 1, yi = 1 is not a real number. More…

Plot3D :: gval : Function value Indeterminate at grid point xi = 2, yi = 2 is not a real number. More…

Plot3D :: gval : Function value Indeterminate at grid point xi = 3, yi = 3 is not a real number. More…

General :: stop : Further output of Plot3D :: gval will be suppressed during this calculation. More…

[Graphics:HTMLFiles/index_95.gif]

Out[154]=

⁃SurfaceGraphics⁃

Here is a pretty picture of the first graph:

In[160]:=

Plot3D[F[x, y], {x, -6, 6}, {y, -6, 6}, PlotPoints500, MeshFalse]

                                      1 Power :: infy : Infinite expression  --- encountered. More…                                      0.`

                                      1 Power :: infy : Infinite expression  --- encountered. More…                                      0.`

                                      1 Power :: infy : Infinite expression  --- encountered. More…                                      0.`

General :: stop : Further output of Power :: infy will be suppressed during this calculation. More…

Plot3D :: plnc : F[x, y] is neither a machine-size real number at {x, y} = {-6.`, -6.`} nor a list of a real number and a valid color directive. More…

Plot3D :: plnc : F[x, y] is neither a machine-size real number at {x, y} = {-5.975951903807616`, -5.975951903807616`} nor a list of a real number and a valid color directive. More…

Plot3D :: plnc : F[x, y] is neither a machine-size real number at {x, y} = {-5.951903807615231`, -5.951903807615231`} nor a list of a real number and a valid color directive. More…

General :: stop : Further output of Plot3D :: plnc will be suppressed during this calculation. More…

Plot3D :: gval : Function value Indeterminate at grid point xi = 1, yi = 1 is not a real number. More…

Plot3D :: gval : Function value Indeterminate at grid point xi = 2, yi = 2 is not a real number. More…

Plot3D :: gval : Function value Indeterminate at grid point xi = 3, yi = 3 is not a real number. More…

General :: stop : Further output of Plot3D :: gval will be suppressed during this calculation. More…

[Graphics:HTMLFiles/index_110.gif]

Out[160]=

⁃SurfaceGraphics⁃


Created by Mathematica  (September 23, 2004)