DISP Mathematics (Scie 1500R)

MAPLE Lab. Tutorial 3 Differentiation and Curve Sketching
Monday January 31.

** 1** DIFFERENTIATION OF EXPRESSIONS AND FUNCTIONS.

I explained in the last tutorial that there is a difference between an
* expression* like
and the function that assigns to each the expression
.
This difference is important in the MAPLE syntax for differentiation.

To differentiate * expressions* we use the command ` diff(expression,
variable);`. The result is another expression.

To differentiate * functions* we use the command ` D(function);` and the
result is another function.

The command ` implicitdiff(equation, variable1, variable2);` will find the
derivative of variable with respect to variable by implicit differentiation.

Test MAPLE's knowledge of the rules for differentiation by making up a variety
of functions using combinations of
` sin, cos, tan, cosec, sec, cotan, exp, log, (or ln) sqrt` and rational
functions.

Try using BOTH expressions with ` diff` and functions with ` D`. Also,
try finding second and higher derivatives.

Here is an example about implicit differentiation:

Example: Find tangent line to curve at point

` > eqn := sin(x+y) = y2*cos(x);`

Verify given point lies on curve:

` > subs({x=Pi/2,y=Pi/2},eqn);
`

`
> simplify(%);`

Find (in terms of and ):

` > y1 := implicitdiff(eqn,y,x);`

Slope at given point:

` > subs({x=Pi/2,y=Pi/2},y1);
`

`
> m := simplify(%);`

Tangent line in point-slope form:

` > line := y-Pi/2 = m*(x-Pi/2);`

A plot:

` > with(plots):
`

`
> implicitplot({eqn,line},x=0..Pi,y=0..Pi);`

** 2** EXERCISES

** NAME STUDENT # **

Before you start these exercises type ` restart`.

1. Define the * function*
.

(In what follows it is assumed that you have as a function. The alternative commands for as an expression are given in brackets).

Now type the following commands:
` > xint := fsolve(f=0);` (` > xint := fsolve(f=0,x);`)
` > yint := f(0);` (` > yint := subs(x=0,f);`)

What do these values represent?

2. Find the derivative of :
` > f1 := D(f);` (` > f1 := diff(f,x);`)
and now type:
` > crits := fsolve(f1=0);` (` > crits := fsolve(f1=0,x);`)

What do these values represent?

3. Find the second derivative of :
` > f2 := D(f1);` or ` > f2 := D(D(f);` (` > f2 := diff(f1,x);`
or ` > f2 := diff(f,x$2);` the $2 says do it twice)

Now use the second derivative test:
` > f2(crits[1]);` (` > subs(x=crits[1],f2);`)
` > f2(crits[2]);` (` > subs(x=crits[2],f2);`)
` > f2(crits[3]);` (` > subs(x=crits[3],f2);`)

Which of the critical points are relative maxima?minima?

3. We now find the inflection points:
` > inflects:= fsolve(f2=0);` (` > inflects := fsolve(f2=0,x);`)

How many inflection points are there?

4. We are now going to make a * list* (lists are made with square brackets
[...]) of all the points we have calculated:
` > xlist := [xint,0,crits,inflects];` (this is a list of
-coordinates).

Copy down this list (using ONE decimal place)

** [OVER]**

Next we make them into points in the plane (vectors also in square brackets):
` > pts := map(a->[a,f(a)],xlist);` (` > pts
:= map(a->[a,subs(x=a,f)],xlist);`)

and now we can plot these points (in a minute). The next 3 commands end with : NOT ;
` > plot1 := plot(pts,style=point,symbol=circle,color=blue):`
` > plot2 := plot(f,-2.3..2,color=red):` (` > plot2 := plot(f,x=-2.3..2,color=red):`)

Now we call up the plotting routines:
` > with(plots):`

And finally we plot both the function AND the points:
` > display({plot1,plot2});`

Use the list of numbers you copied down above to answer the following questions:

Make a list of the intervals where is increasing,

Make a list of the intervals where is decreasing,

Make a list of the intervals where is concave up,

Make a list of the intervals where is concave down,