>   

Maple Worksheet

for the

Solution to #34 in Section 8.2 (p. 381)

of

Varberg, Purcell, and Rigdon (8th edition)

Prepared by Douglas Meade

Department of Mathematics

University of South Carolina

E-mail: meade@math.sc.edu

22 September 2003

>    restart;

>    with( plots );

Warning, the name changecoords has been redefined

[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, displ...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, displ...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, displ...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, displ...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, cylinderplot, densityplot, display, displ...

>    with( Student[Calculus1] );

[AntiderivativePlot, ApproximateInt, ArcLength, Asymptotes, Clear, CriticalPoints, DerivativePlot, ExtremePoints, FunctionAverage, FunctionChart, GetMessage, GetNumProblems, GetProblem, Hint, Inflectio...
[AntiderivativePlot, ApproximateInt, ArcLength, Asymptotes, Clear, CriticalPoints, DerivativePlot, ExtremePoints, FunctionAverage, FunctionChart, GetMessage, GetNumProblems, GetProblem, Hint, Inflectio...
[AntiderivativePlot, ApproximateInt, ArcLength, Asymptotes, Clear, CriticalPoints, DerivativePlot, ExtremePoints, FunctionAverage, FunctionChart, GetMessage, GetNumProblems, GetProblem, Hint, Inflectio...
[AntiderivativePlot, ApproximateInt, ArcLength, Asymptotes, Clear, CriticalPoints, DerivativePlot, ExtremePoints, FunctionAverage, FunctionChart, GetMessage, GetNumProblems, GetProblem, Hint, Inflectio...

>   

Question 34

The setup for this problem is simpler than it might seem.  For each value of x  in [0, Pi] , the distance from the graph of y = sin(x)  to the axis y = k  is

>    unassign('k');

>    f := (x,k) -> abs( sin(x) - k );

f := proc (x, k) options operator, arrow; abs(sin(x)-k) end proc

>    q3 := VolumeOfRevolution( f(x,k), x=0..Pi, output=integral );

q3 := Int(Pi*abs(-sin(x)+k)^2,x = 0 .. Pi)

>   

To get a feel for this problem, create an animation for a sequence of values of k. To facilitate this, create a function (of k) that returns the corresponding solid of revolution

>    P := k -> VolumeOfRevolution( f(x,k), x=0..Pi, output=plot );

P := proc (k) options operator, arrow; Student:-Calculus1:-VolumeOfRevolution(f(x,k),x = 0 .. Pi,output = plot) end proc

>    P(1/3);

[Maple Plot]

A reasonable animation would have 20 frames with equally spaced values of k:

>    K := ($1..20)/20;

K := 1/20, 1/10, 3/20, 1/5, 1/4, 3/10, 7/20, 2/5, 9/20, 1/2, 11/20, 3/5, 13/20, 7/10, 3/4, 4/5, 17/20, 9/10, 19/20, 1

The animation is

>    display( [seq( P(kk), kk=K)], insequence=true );

[Maple Plot]

>   

Now, to answer the question, begin by finding the value of the integral

>    q4 := value( q3 );

q4 := Pi^2*signum(k)^2*k^2+1/2*Pi^2*signum(k)^2-4*Pi*signum(k)^2*k

Well, Maple does not know that k  will be in the interval [0,1].  This can be communicated with the assuming  feature

>    q4 := value( q3 ) assuming k::nonnegative;

q4 := k^2*Pi^2+1/2*Pi^2-4*Pi*k

The function to be optimized is

>    V := unapply( q4, k );

V := proc (k) options operator, arrow; k^2*Pi^2+1/2*Pi^2-4*Pi*k end proc

>    plot( V(k), k=0..1 );

[Maple Plot]

As this is a continuous function on a closed and bounded interval, its maximum and minimum must occur at an endpoint or critical point.  The endpoints are

>    endpts := { 0, 1 };

endpts := {0, 1}

To find the critical points,

>    dV := D(V);

dV := proc (k) options operator, arrow; 2*k*Pi^2-4*Pi end proc

>    q5 := dV(k) = 0;

q5 := 2*k*Pi^2-4*Pi = 0

>    q6 := isolate( q5, k );

q6 := k = 2/Pi

>    critpts := { rhs(q6) };

critpts := {2/Pi}

The volumes at each of these points can be summarized in a table

>    for kk in endpts union critpts do

>      [ kk, V(kk)=evalf(V(kk)) ]

>    end do;

[0, 1/2*Pi^2 = 4.934802202]

[1, 3/2*Pi^2-4*Pi = 2.23803599]

[2/Pi, -4+1/2*Pi^2 = .934802202]

Thus, the global maximum occurs at the endpoint k = 0  and the global minimum occurs at the critical point k = 2/Pi .

>    P(0);

[Maple Plot]

>    VolumeOfRevolution( f(x,0), x=0..Pi, output=value );

1/2*Pi^2

>    P(2/Pi);

[Maple Plot]

>    VolumeOfRevolution( f(x,2/Pi), x=0..Pi, output=value );

1/2*Pi^2-4

>   

>   

>