> |
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
> | with( Student[Calculus1] ); |
> |
Question 34
The setup for this problem is simpler than it might seem. For each value of in , the distance from the graph of to the axis is
> | unassign('k'); |
> | f := (x,k) -> abs( sin(x) - k ); |
> | q3 := VolumeOfRevolution( f(x,k), x=0..Pi, output=integral ); |
> |
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(1/3); |
A reasonable animation would have 20 frames with equally spaced values of k:
> | K := ($1..20)/20; |
The animation is
> | display( [seq( P(kk), kk=K)], insequence=true ); |
> |
Now, to answer the question, begin by finding the value of the integral
> | q4 := value( q3 ); |
Well, Maple does not know that will be in the interval [0,1]. This can be communicated with the assuming feature
> | q4 := value( q3 ) assuming k::nonnegative; |
The function to be optimized is
> | V := unapply( q4, k ); |
> | plot( V(k), k=0..1 ); |
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 }; |
To find the critical points,
> | dV := D(V); |
> | q5 := dV(k) = 0; |
> | q6 := isolate( q5, k ); |
> | critpts := { rhs(q6) }; |
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; |
Thus, the global maximum occurs at the endpoint and the global minimum occurs at the critical point .
> | P(0); |
> | VolumeOfRevolution( f(x,0), x=0..Pi, output=value ); |
> | P(2/Pi); |
> | VolumeOfRevolution( f(x,2/Pi), x=0..Pi, output=value ); |
> |
> |
> |