Section 15.2 - Partial Derivatives

> restart;

> with( plots ):

> with( student ):

> setoptions3d( axes=boxed, shading=zhue );

>

Example 1

> f := x^2*y + 3*y^3;

f := x^2*y+3*y^3

> plot3d( f, x=-2..2, y=-3..3 );

>

First, fix y = 2 and look at the plot of f(x,2) = 2*x^2+24 :

> plot( eval( f, y=2 ), x=-3..3 );

[Maple Plot]

>

The tangent line to this curve at x = 1 is

> showtangent( eval( f, y=2 ), x=1, x=-2..2 );

[Maple Plot]

>

Conversely, if we fix x = 1 and look at the plot of f(1,y) = y+3*y^3 :

> plot( eval( f, x=2 ), y=-3..3 );

[Maple Plot]

>

the tangent line to this curve at y = 2 is

> showtangent( eval( f, x=1 ), y=2, y=-3..3 );

[Maple Plot]

>

These slopes are also the partial dervatives of the function with respect to x and y, respectively, at the point (1,2):

> fx := diff( f, x );

fx := 2*x*y

> eval( fx, [x=1,y=2] );

4

>

> fy := diff( f, y );

fy := x^2+9*y^2

> eval( fy, [x=1,y=2] );

37

>

The second-order partial derivatives are:

> fxx := diff( fx, x );

fxx := 2*y

> fxy := diff( fx, y );

fxy := 2*x

> fyx := diff( fy, x );

fyx := 2*x

> fyy := diff( fy, y );

fyy := 18*y

>

Note that these derivatives could also be found using

> diff( f, x,x );

2*y

> diff( f, x,y ) = diff( f, y,x );

2*x = 2*x

> diff( f, y,y );

18*y

>