A function f of two variables is said to be differentiable at a point
if there exists a linear
function l that approximates to f in the sense that
In order to better understand the behavior of the graph of f as we zoom in on the point, it will be useful to simultaneously plot vertical slices of the graph of f parallel to the coordinate planes. We have seen that the slopes of these slices at (x0,y0) are given by and . Since the slices are curves we would expect that these slices would look like straight lines as we ``zoom in'' near (x0,y0) if and only if the partial derivatives of f exist at (x0,y0).
In the following exercises we will use Maple to develop an intuitive understanding of the differentiability of functions of two variables by plotting the graph of a function f near a point (x0, y0) along with its vertical slices parallel to the coordinate planes and then zooming-in on the graph near the point.
startsection subsection10mm.5 Maple Commands
We will use the following Maple commands to plot the graph and vertical slices of f. Of course, first load the plots package.
with(plots):
Next, we want to define the function f and the point (x0,y0). Here we work with a sample function f(x,y)=x2 - y2 and point (.25,.5). (Execute the following input commands as you read through the worksheet.)
f:=(x,y) ->x^2 - y^2; x0 := .25; y0 := .5;
Now we define the basic plotting commands we will use. The first,
fplot(h)
, plots the graph of f on the domain
.
fplot:= h -> plot3d(f(x,y), x = x0 - h.. x0 +h, y = y0 - h.. y0 +h, color = gray);
The next two commands, xsliceplot(h)
and ysliceplot(h)
plot the vertical slices of the graph of f parallel to the xz-plane and yz-plane respectively. We will use the Maple command spacecurve
to plot these slices.
xsliceplot:=(h) -> spacecurve([x0 + t,y0 ,.02*h + f(x0 + t,y0),t=-h..h], color =blue,thickness = 2, numpoints = 20);
ysliceplot:=(h) -> spacecurve([x0, y0 + t ,.02*h + f(x0,y0 + t),t=-h..h], color =blue,thickness = 2, numpoints = 20);
Notice that we have added .02h to the third coordinate in order to raise the image slightly above the graph of f . This makes the slices easier to see when combined with the plot of f.
You should experiment with these commands, plotting the graph of f and the slices of f for various values of h. (You should use the constrained and boxed axes plot options from the menu bar in the graphics window. ) For example, the following commands plot the graph of f(x,y) = x2-y2 and its vertical slices for h=1, that is, on the domain
A:=fplot(1): B:=xsliceplot(1): C:=ysliceplot(1): display([A,B,C]);
By using these commands for values of h approaching 0, we can effectively zoom-in on the graph of f and its slices at the point (.25,.5) .
startsection subsection10mm.5 Exercises
You should use this Maple worksheet as the basis for your Maple worksheet. Use the Maple commands and definitions that you have been given to answer the following questions. After looking at several plots, choose one or two plots to support your arguments and include them in your worksheet.
fplot
, xsliceplot
and ysliceplot
to investigate the local linearity of the f at
(.25,.5) . In particular, change h to zoom-in on the graph and slices of fnear (.25,.5) . Describe what happens as
.
Would you say that f is differentiable at
(x0, y0) based on what
you have observed? Explain.
fplot
, xsliceplot
and ysliceplot
commands to investigate what happens to the graph of f and its vertical slices as you zoom in on the origin.
Would you say that f is differentiable at (0,0) based on what you have observed? Are the slices differentiable? Explain.
You can enter the functions by executing the input lines below. You should then copy the fplot
, xsliceplot
and ysliceplot
commands from above and enter them.
f:=(x,y) -> - sqrt(x^2+y^2); x0 := 0; y0 := 0;
f:=(x,y) -> x*y/(sqrt(x^2+y^2)); x0 := 0; y0 := 0;
f:=(x,y) -> \sqrt(abs(x*y))* (cos (arctan(y/x))^2; x0 := 0; y0 := 0;
startsection section10mm-.5 Discussion 18 Solving Systems of Equations
This is a LATEXversion of a Maple worksheet. The worksheet is available in the directory
/home/stu/courses/math141.
startsection subsection10mm.5 Introduction
In this Maple worksheet we will investigate a numerical method for
finding simultaneous roots of two differentiable functions of two
variables. That is, if f and g are differentiable functions of
x and y, we want to find points that simultaneously solve the
equation
As you read through the discussion, you should execute the Maple input statements. Your write-up should be in the form of a Maple worksheet.
startsection subsection10mm.5 The Newton-Raphson Method
The approximation method is an iterative technique. Given an approximation to a root, it produces another approximation that is, presumably, a better approximation that the original one. By repeating or iterating this process, we obtain a sequence of approximations that we hope will approach the root. You have seen such a method in one variable calculus if you studied Newton's method for locating the roots of a function of one variable.
Here we will carry out two iterations in detail for two particular functions:
f:=(x,y)->x^2 + y^2 -1; g:=(x,y)->x - 2*y^2;