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:=ln(abs(6*x))+ 6^x+ log[6](x); diff(y,x);
> y := 2*(cos(sqrt(1+x^2)))^3; diff(y,x);
> y:=ln(tan(x))-tan(ln(x)); diff(y,x); simplify(%);
> 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);
2. Logarithmic differentiation
>
y:=(2*x+1)^(sqrt(3-x));
diff(y,x);
>
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.)
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.)
> subs([diff(L(t),t)=3, diff(W(t),t)=-4, L(t)=30, W(t)=70], diff(A,t));
>
Pithagorean:= x^2=L(t)^2+W(t)^2;
dxdt:=implicitdiff(Pithagorean, x, t);
>
l:=30: w:=40:
subs([D(L)(t)=3, D(W)(t)=-4, L(t)=l, W(t)=w], dxdt);
> subs([x=sqrt(l^2+w^2)], %);
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;
> plot(y,x); (Shows a big picture, but misses fine details)
>
plot(y,x=-1.5..1.5);
(The most appropriate scale for this graph. Special points
- intercepts, local extrema, inflection points - are visible.)
>
plot(y,x=-0.1 .. 0.1);
(Shows local behaviour for small values of x,
but gives a misleading impression of the whole picture.)
> X_intercepts:=solve(y,x);
>
diff(y,x);
(Calculating 1st derivative)
CriticalValues:=[solve(%,x)];
>
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.)
>
diff(y,x,x);
(Calculating 2nd derivative)
InflectionValuesX:=[solve(%,x)];
(inflection points, x-coord.only)
> InflectionPoints:=map(t->[t,subs(x=t,y)], InflectionValuesX);
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);
> plot([y,asymp],x=-5..5, -5..5);
> plot([y,asymp],x=0..50);
>