The only new Maple procedure that needs to be introduced in this lab is the procedure for taking partial derivatives. Partial derivatives are needed to compute things such as gradients, tangent planes, and differentials.
You have seen in the past that there are two commands used to compute derivatives; diff and D. For example, to compute the derivative of , the following can be done:
> f1:= x^2+2*x;
> f2:= x -> x^2+2*x;
Note that when using the D command, a function must be used. When using the diff command, a function or expression can be used. Therefore, you are always safe in defining functions, not expressions. Also note that out of the three derivatives, only the one computed using the D command remains a function, not an expression.
Now, to carry these commands over to deal with partial derivatives, everything remains the same except for one small change in the D command. When a function is defined in more than one variable, Maple takes note of the order in which the variables are listed. Therefore, if you wish to find the partial derivative with respect to the first variable, you would need to add the number one inside square brackets after the D, but before the function name. Here are some examples. Note again, that by using the D command, the resulting partial derivative is a function. This is useful when you need to substitute values into variables.
> g:= (x,y) -> ln(2*x+3*y);
> h:= (x,y,z) -> x^2+y^2-2*x*y*cos(z);