next up previous
Next: About this document ... Up: No Title Previous: No Title

Subsections


More on Differentiation

D and diff

Maple knows how to take many derivatives. Its main commands for doing this are D and diff. D is designed to differentiate functions, whereas diff is for differentiating expressions. However, if proper notation is used, diff can also be used with functions. To review the difference between a function and an expression, check the two examples below. The f statement defines a function, the g statement defines an expression.

  > f:=x->x^2+7*x+5;
  > g:=x^3-5*x+8;
Here are some examples that show how D and diff work. Check the difference between these two commands.
  > D(sin);
  > D(sin)(x);
Also, check these two.
  > D(f);
  > D(f)(x);
Carefully consider these.
  > diff(g,x);
  > diff(f(x),x);
See what happens with these.
  > diff(g(x),x);
  > diff(f,x);
After the last four examples, you should be convinced that proper notation is very important in doing derivatives in Maple.

Maple can also do higher derivatives. Check these commands.

  > diff(g,x2);
  > diff(f(x),x$2);
The $ sign is used to indicate repeated differentiation, the number following it tells how many times the function or expression is to be differentiated. D will also do repeated differentiation.
  > (D@@2)(f)(x);
More information on diff and D can be obtained through Maple help screens.

Implicit Differentiation

The implicitdiff command can be used to find derivatives of implicitly defined functions. The syntax is as follows

  > implicitdiff(f,y,x);
where f is an expression or equation, y is the dependent variable and x is the independent variable. Thus the command as just stated would compute $\displaystyle\frac{dy}{dx}$. If f is given as an expression Maple will assume that the implicit equation is f = 0. Check the results of the following commands.
  > f:=x^2*y^2+y^3;
  > implicitdiff(f,y,x);
  > g:=x^2+y^3=1;
  > implicitdiff(g,y,x);
Second derivatives can also be taken with implicitdiff. The following command computes $\displaystyle\frac{d^2y}{dx^2}$.
  > implicitdiff(g,y,x,x);
Maple also has a command for plotting implicitly defined functions. It is in the package plots which must be called before using the command.
  > with(plots);
  > implicitplot(x^2-y^2=1,x=-3..3,y=3..3);

Exercises

1.
Find an equation of the line tangent to the graph of $y = (x^3
- 2x)(\tan(\pi x))\sqrt{x^2+5}$ at the point (2,0). (Note that Maple has a sqrt function.)
2.
Find the third derivative of $f(x) = \sin(x)\cos(x^2)$ evaluated at $x = \pi/4$.

3.
Consider the function

\begin{displaymath}
f(x) = \frac{x + 1}{x^4+x^3+3x^2+x+3}\end{displaymath}

Find the points at which the graph of this function has a horizontal tangent line. (The numer command could be useful here.) Use plot to graph the function. What geometric property seems to be indicated by a horizontal tangent line?

4.
Consider the graph defined implicitly by the equation x2-xy+y2=9. Use the implicitplot command to verify visually that the graph is an ellipse. Find the equations of the tangent lines to this curve at the two points where it intersects the x axis, and show that these lines are parallel.

5.
Consider a function y that is implicitly defined by y5 - 3x2y + x3 = -1.
(a)
Attach a handwritten page on which you find $\displaystyle\frac{dy}{dx}$.
(b)
Use Maple to check the accuracy of your work.

(c)
Find an equation of the line tangent to the graph of the function at the point (1,1).

next up previous
Next: About this document ... Up: No Title Previous: No Title

Dina Solitro
9/28/1999