next up previous
Next: About this document ... Up: lab_template Previous: lab_template



The Limit Definition of the Derivative

The limit definition of the derivative of $f(x)$ often written as $f'(x)$ is defined as:

\begin{displaymath}f'(x)=\lim_{h \rightarrow 0} \frac{f(x+h)-f(x)}{h} \end{displaymath}

It can be interpreted geometrically as the slope of the tangent line to the graph of $f(x)$ at a point $x=a$ and functionally as the instantaneous rate of change of $f$ at $x=a$. You can use the definition and the Maple limit command to compute derivatives directly, as shown below. You can also compute derivatives using Maple's diff or D command. The following limit determines f'(x).
> limit((f(x+h)-f(x))/h,h=0);
The example below shows how to use the limit definition of derivative to find $f'(1)$ with Maple.
> f := x -> x^2+3*x+5;
> limit((f(1+h)-f(1))/h,h=0);

The Maple D and diff commands

These commands can be summarized as follows.

When you use the D operator to compute the derivative of a function, be careful with the parentheses. It is one of the only commands in Maple where the $f$ gets its own parentheses.

> f:=x->x^2;
> D(f)(x);
Finding the derivative at a specific $x$ value is easy. (Again be careful of the parentheses.)
> D(f)(2);

The D operator CANNOT be used on expressions. To differentiate expressions, you need to use the diff command. Here is an example.

> p:=3*x+2;
> diff(p,x);
Remember the diff command can also be applied to functions. However, the syntax for plugging in an $x$ value is a little longer with the diff command. To compute the value of the derivative at a specific value of $x$ requires you to use the subs command. First, give the diff command a name so you can call it up in the subs command.
> pprime:=diff(p,x);
> subs(x=2,pprime);
Another option is to embed the commands.

The Equation of a Tangent Line

Suppose you want to find the equaton of the line tangent to the graph of $f(x)$ at the point $x=5$. This can be done in Maple using the point slope form of a line as shown below and remembering that you can embed commands inside each other. The line equation is $\displaystyle y-y_1=m(x-x_1)$ or $\displaystyle y=m(x-x_1)+y_1$
> tly:= D(f)(5)*(x-5)+f(5);
> plot([f(x),tly],x=0..10);


  1. For the function $\displaystyle f(x)=\frac{7+\ln(x)}{x^2}$
    Find the derivative of the functionusing the limit definition of the derivative, the diff command and then the D command (Make sure the output from all three are the same. You may need to use the simplify command.)
    And then use all three methods to find the slope of $f$ at $x=1$. (Again make sure the output from all three are the same. You may need to use the evalf command.
  2. Find the equation of the line tangent to the graph of the function $\displaystyle g(x)=\frac{\ln(x)}{x^2-2x+4}$ at $x=1$. Include a plot of the function and the tangent line on the same graph over the interval $-1 \leq x \leq 5$.

  3. For the function $\displaystyle h(x)=\frac{x-2}{x^2-4x+7}$, find all points on the graph of $f(x)$ where the tangent line is horizontal.
    Plot the function and state how many points you are looking for.
    Find the $x$ values.
    Find the $y$ values. Then state in text the points where there is a horizontal tangent line. State your answers in decimal form. (Remember in the text sentence to use two decimals, rounding correctly.)

next up previous
Next: About this document ... Up: lab_template Previous: lab_template
Jane E Bouchard