Section 15.2 - Partial Derivatives
> restart;
> with( plots ):
> with( student ):
> setoptions3d( axes=boxed, shading=zhue );
>
Example 1
> f := x^2*y + 3*y^3;
> plot3d( f, x=-2..2, y=-3..3 );
>
First, fix and look at the plot of :
> plot( eval( f, y=2 ), x=-3..3 );
>
The tangent line to this curve at is
> showtangent( eval( f, y=2 ), x=1, x=-2..2 );
>
Conversely, if we fix and look at the plot of :
> plot( eval( f, x=2 ), y=-3..3 );
>
the tangent line to this curve at is
> showtangent( eval( f, x=1 ), y=2, y=-3..3 );
>
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 );
> eval( fx, [x=1,y=2] );
>
> fy := diff( f, y );
> eval( fy, [x=1,y=2] );
>
The second-order partial derivatives are:
> fxx := diff( fx, x );
> fxy := diff( fx, y );
> fyx := diff( fy, x );
> fyy := diff( fy, y );
>
Note that these derivatives could also be found using
> diff( f, x,x );
> diff( f, x,y ) = diff( f, y,x );
> diff( f, y,y );
>