- Solving a function or an expression algebraically
- Solving a function or an expression numerically
- The Derivative
- The Limit Definition of the Derivative
- The Maple D and diff commands
- Exercises

> g := 9*x^2-14; > h:=-x^2; > plot([g,h],x=-2..2); > solve(g=h,x);The plot shows that there are two intersection points and the

> ip:=solve(g=h,x);Since there are two values called , use [ ] to call up the one you want.

> subs(x=ip[1],g); > subs(x=ip[2],h);Therefore the two intersection points are and . This seems like the answer shown on the graph.

> f:=theta->-1/2*theta+sin(theta); > plot(f(theta),theta=-8*Pi..8*Pi); > solve(f(theta)=0,theta);Wow, what is that?!?! We know from the graph that there should be three answers and

> fsolve(f(theta)=0,theta);Where are the other two answers!? This is actually how

> a:=fsolve(f(theta)=0,theta=-5..-1); > b:=fsolve(f(theta)=0,theta=-1..1); > c:=fsolve(f(theta)=0,theta=1..5);To find the values just plug in the names of the values.

> f(a); > f(b); > f(c);(Of course the y-values are zero!)

It can be interpreted geometrically as the slope of the tangent line to the graph of at a point and functionally as the instantaneous rate of change of at . 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

> limit((f(x+h)-f(x))/h,h=0);The example below shows how to use the limit definition of derivative to find with Maple.

> f := x -> x^2+3*x+5; > limit((f(1+h)-f(1))/h,h=0);

- The
`D`command acts on a function. - The
`diff`command acts on an expression or a function and differentiates that expression with respect to a variable specified by the user.

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 gets its own parentheses.

> f:=x->x^2; > D(f)(x);Finding the derivative at a specific 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

> pprime:=diff(p,x); > subs(x=2,pprime);Another option is to embed the commands.

>subs(x=2,diff(p,x));

- For the functions
and
, plot both functions on the same graph using an -domain that clearly shows all the intersection points and then find the and coordinates of the intersection points using Maple's solving capabilities.
- Find the dervative of the function
using the limit definition of the derivative, the
`diff`command and then the`D`command and then use all three methods to find the slope of at . - For the function in the last exercise, find all points on the graph of where the tangent line is horizontal. Remember that a point has an and a value.

2011-10-19