mt2.mws         *******        M1000 page

Math 1000 - Winter 03 - Section 5.
Midterm 2: Solution by Waterloo Maple

> restart;

1. Differentiation

> y:=x^5*(x^3-2)^4 ; diff(y,x); factor(%);

y := x^5*(x^3-2)^4

5*x^4*(x^3-2)^4+12*x^7*(x^3-2)^3

x^4*(17*x^3-10)*(x^3-2)^3

> y:=ln(abs(6*x))+ 6^x+ log[6](x); diff(y,x);

y := ln(6*abs(x))+6^x+ln(x)/ln(6)

abs(1,x)/abs(x)+6^x*ln(6)+1/(x*ln(6))

> y := 2*(cos(sqrt(1+x^2)))^3; diff(y,x);

y := 2*cos(sqrt(1+x^2))^3

-6*cos(sqrt(1+x^2))^2*sin(sqrt(1+x^2))/(1+x^2)^(1/2...

> y:=ln(tan(x))-tan(ln(x)); diff(y,x); simplify(%);

y := ln(tan(x))-tan(ln(x))

(1+tan(x)^2)/tan(x)-(1+tan(ln(x))^2)/x

(cos(ln(x))^2*x-cos(x)*sin(x))/cos(x)/sin(x)/cos(ln...

> y:='y': (to clear the notation 'y')

> f:= 3*x^2*y^4=2*y^5+4*x^3; (Implicit differentiation)
implicitdiff(f,y,x);

f := 3*x^2*y^4 = 2*y^5+4*x^3

3*x*(y^4-2*x)/y^3/(-6*x^2+5*y)

2. Logarithmic differentiation

> y:=(2*x+1)^(sqrt(3-x));
diff(y,x);

y := (2*x+1)^(sqrt(3-x))

(2*x+1)^(sqrt(3-x))*(-1/2/(3-x)^(1/2)*ln(2*x+1)+2*(...

> y:=2^x * (x^4+1)^5 / (sqrt(x+x^2)); diff(y,x);
(Comment: Maple doesn't represent the answer in the form we expect in log. differentiation.)

y := 2^x*(x^4+1)^5/(x+x^2)^(1/2)

2^x*ln(2)*(x^4+1)^5/(x+x^2)^(1/2)+20*2^x*(x^4+1)^4/...

3. Related rates: Rectangle L x W. Given dL/dt, dW/dt, L, W, find:
(a) dA/dt (where A is area), (b) dx/dt, where x is diagonal.

> A:=L(t)*W(t); diff(A,t);
(Comment: we have to indicate the t-dependence explicitly, otherwise Maple treats
L and W as constants.)

A := L(t)*W(t)

diff(L(t),t)*W(t)+L(t)*diff(W(t),t)

> subs([diff(L(t),t)=3, diff(W(t),t)=-4, L(t)=30, W(t)=70], diff(A,t));

90

> Pithagorean:= x^2=L(t)^2+W(t)^2;
dxdt:=implicitdiff(Pithagorean, x, t);

Pithagorean := x^2 = L(t)^2+W(t)^2

dxdt := (L(t)*D(L)(t)+W(t)*D(W)(t))/x

> l:=30: w:=40:
subs([D(L)(t)=3, D(W)(t)=-4, L(t)=l, W(t)=w], dxdt);

-70*1/x

> subs([x=sqrt(l^2+w^2)], %);

-7/5

4. Analysis of a function (monotonicity, concativity). The graphs below don't represent
a solution; rather they demonstrate a "technology pitfall".

> x:='x';
y:=x^4-2*x^2;

x := 'x'

y := x^4-2*x^2

> plot(y,x); (Shows a big picture, but misses fine details)

[Maple Plot]

> plot(y,x=-1.5..1.5); (The most appropriate scale for this graph. Special points
- intercepts, local extrema, inflection points - are visible.)

[Maple Plot]

> plot(y,x=-0.1 .. 0.1); (Shows local behaviour for small values of x,
but gives a misleading impression of the whole picture.)

[Maple Plot]

> X_intercepts:=solve(y,x);

X_intercepts := 0, 0, sqrt(2), -sqrt(2)

> diff(y,x); (Calculating 1st derivative)
CriticalValues:=[solve(%,x)];

4*x^3-4*x

CriticalValues := [0, 1, -1]

> CriticalPoints:=map(t->[t,subs(x=t,y)], CriticalValues);
(Maple's function 'map' is used to apply a certain rule to all elements of a set or an array
at once.)

CriticalPoints := [[0, 0], [1, -1], [-1, -1]]

> diff(y,x,x); (Calculating 2nd derivative)
InflectionValuesX:=[solve(%,x)]; (inflection points, x-coord.only)

12*x^2-4

InflectionValuesX := [1/3*sqrt(3), -1/3*sqrt(3)]

> InflectionPoints:=map(t->[t,subs(x=t,y)], InflectionValuesX);

InflectionPoints := [[1/3*sqrt(3), -5/9], [-1/3*sqr...

5. Sketch a graph according to the information provided.
(The formula is not given, so technology can't readily help.)
Here is what we know:
As x->-infinity, y->-1
As x->+infinity, y->2
3 points (0,1), (1,0), (2,1) on the graph
vertical asymptote at x=-1; y-> -infinity as x-> -1-0,
y-> +infinity as x-> -1+0.
y''<0 when x<-1 or x>2
y''>0 when -1<x<2.

A sample function that satisfies these conditions can not be a rational function defined
by a single formula, because for any such functions limits at both infinities, if they exist, are equal. But it can be defined as a piecewise-rational function:

> y:=piecewise(x<-1, -x/(x+1),
2*(x-1)^2/((x+1)*(x+2)) );
asymp:=piecewise(x<-1,-1,
2);

y := PIECEWISE([-x/(x+1), x < -1],[2*(x-1)^2/(x+1)/...

asymp := PIECEWISE([-1, x < -1],[2, otherwise])

> plot([y,asymp],x=-5..5, -5..5);

[Maple Plot]

> plot([y,asymp],x=0..50);

[Maple Plot]

>