Integrals 215 problem 08.mws

1. Plotting solids in Maple.

In this exercise we will be plotting surfaces which define certain solids which are determined by a function that gives the height z of the solid depending on the point ( x, y ) in some region of the plane. Let us work with an example where the region in the plane is given by a disc of radius 1 centered at the origin.

First, it is important to be able to describe this region in terms that can be used by Maple to plot the region. If you look up the plot3d command in Maple, you will see that if a region in the plane is described by x = a .. b , y = f(x) .. g(x) ,

where f(x) and g(x) are expressions in x, then if h(x,y) is an expression in terms of x and y , then z = h(x,y) determines a surface over the described region, and when z is always positive in this region, we obtain a solid bounded by the x, y -plane, the surface, and vertical lines joining the points on the boundary of the region in the plane to the surface. We can also imagine a solid given by the rule that z varies from an expression k(x,y) below the x,y-plane to an expression h(x,y) above the plane.

The region bounded by the unit circle centered at the origin can be described by x = -1 .. 1 , y = -sqrt(1-x^2) .. sqrt(1-x^2) .

Suppose that the cross sections of the solid parallel to the x -axis are given by circles. The first question is how to determine the radius of the circle for a fixed value of x. This turns out to be a fairly easy question to answer, because the radius must be

given by r = sqrt(1-x^2) . Thinking of the projection of this circle on the y,z-plane, we must therefore have y^2+z^2 = r^2 . Simply solve this expression for z , and you obtain both the upper and lower expressions for the surfaces which bound this solid.

> solve(y^2+z^2 =1-x^2,z);

sqrt(-y^2+1-x^2), -sqrt(-y^2+1-x^2)

This means that we can plot upper surface bounding the solid as follows.

> plot3d(sqrt(-y^2+1-x^2),x =-1..1, y=-sqrt(1-x^2)..sqrt(1-x^2), axes=boxed);

[Maple Plot]

Notice that Maple does not do a perfect job of this plot, because the function is changing rapidly near the x,y-plane, so the plot misses some of this part of the surface. We can also display both the upper and lower surfaces on the same graph if we use the plots package and display both plots at once.

> with(plots):

Warning, the name changecoords has been redefined

> plot1:=plot3d(sqrt(-y^2+1-x^2),x = -1 .. 1, y = -sqrt(1-x^2) .. sqrt(1-x^2)):

> plot2:=plot3d(-sqrt(-y^2+1-x^2),x = -1 .. 1, y = -sqrt(1-x^2) .. sqrt(1-x^2)):

> display(plot1,plot2,axes=boxed,scaling=constrained);

[Maple Plot]

Notice that the solid described in this way is really a sphere. Maple does not display the complete picture, but we do get a pretty good impression of what it looks like. There are ways to get more complete pictures in Maple, but for this exercise, we will only look at the procedures described above.

Next, let us suppose that we are graphing an equilateral triangle which has a base of length 2*a positioned on the y -axis of the y,z -plane, so that two of the vertices are at ( -a, 0 ) and ( a, 0 ). Because it is equilateral, we know that the the third vertex, can be placed at the point ( 0, sqrt(3)*a ). Then a formula for z in terms of y is z = sqrt(3)*(a-abs(y)) . To see that this is true,

let us choose a value of a , and plot the resulting curve.

> a:=2;plot(sqrt(3)*(a-abs(y)),y=-a..a);

a := 2

[Maple Plot]

Submission:

Suppose a solid lies between planes perpendicular to the x -axis at x = -1 and x = 1 . Its cross sections perpendicular to the x- axis run from the semicircle y = -sqrt(1-x^2) to the semicircle y = sqrt(1-x^2) , as in the example above, but this time, let us suppose that the cross sections are equilateral triangles with bases in the x,y -plane.

1) For a fixed value of x , determine the value of a which corresponds to the situation in the example above, where the base has length 2*a .

2) Use the formula developed in the example above, to write an explicit formula for z in terms of x and y.

3) Plot a 3d picture of the upper surface bounding this solid.

4) Plot a 3d picture of the upper and lower surfaces bounding this solid. (Note that the lower surface is given by z = 0 ).

Submission worksheet:

>

2. Finding the volume of a solid.

In problem 1, we looked at a solid which was given by cross sections which are circles with diameter given by the line segment in the x,y-plane running from the semicircle y = -sqrt(1-x^2) to the semicircle y = sqrt(1-x^2) , for x running from x = -1 to x = 1 . The radius of this semicircle is r = sqrt(1-x^2) , so the area A(x) of each

cross section is given by A(x) = Pi*(1-x^2) . Therefore, to compute the total volume of the solid bounded by these curves, we simply compute the integral below.

> V:=int(Pi*(1-x^2),x=-1..1);

V := 4/3*Pi

This result is not so surprising once we reflect on the fact that the solid is a sphere, and the volume of a sphere is given by the formula V = 4/3*Pi*r^3 , where r is the radius of the sphere. In fact, if we generalize the problem slightly, and let x run from -r..r, and y run from the semicircle y = -sqrt(r^2-x^2) to the semicircle y = sqrt(r^2-x^2) , then the area of a cross section would be given by A(x) = Pi*(r^2-x^2) , so the volume would be given by

> V:=int(Pi*(r^2-x^2),x=-r..r);

V := 4/3*Pi*r^3

which is just the usual formula for the volume of a sphere.

Submission :

For the solid in your submission on activity 1, do the following.

1) Give a formula for the area of an equilateral triangle which has a base of length 2*a .

2) Use this formula to compute the area A(x) of the cross sections perpendicular to the x -axis for your solid.

3) Compute the total volume of the solid.

Submission worksheet:

>

3. Visualizing solids of revolution.

The hardest part of understanding how to obtain the volume of a solid of revolution is visualizing how the solid is approximated by small disks or washers. In this exercise, we use Maple's 3-d graphics capabilities to help analyze a solid of revolution. First you will have to load the package rev , as follows:

> read("J:\\Math\\Share/rev.mws"):

>

> with(plots):with(plottools):with(student):with(Lab5);

Warning, the name arrow has been redefined

[ThinRectangleSweep, example2, example3, example4]

This package contains commands example2 , example3 , example4 . These commands take only one parameter: the number n of approximating thin disks/washers. Work with each of these three commands using various values of the parameter.

Error, missing operator or `;`

> example2(10);

[Maple Plot]

>

Notice that you can "tilt and spin" the 3d graph by grabbing with the mouse .

Submission:

Find the volume of the fifth thin disk/washer for each example with n= 10.

Submission worksheet:

>

4. Solids of revolution.

Let us consider a simple case where a curve y = f(x) is revolved around the x -axis. Then the set of points ( x, y, z ) which lie on the surface of the resulting solid are given by the formula y^2+z^2 = f(x)^2 . This set of points can be plotted using Maple's implicitplot3d command. To use this command, you first have to load the plots package, as shown below.

> with(plots);

Warning, the name arrow has been redefined

[animate, animate3d, animatecurve, arrow, changecoo...
[animate, animate3d, animatecurve, arrow, changecoo...
[animate, animate3d, animatecurve, arrow, changecoo...
[animate, animate3d, animatecurve, arrow, changecoo...
[animate, animate3d, animatecurve, arrow, changecoo...

Let us pick a simple curve and plot it implicitly. Suppose that f(x) = x^4-2*x^2+1 , and the domain for x is x = -2 .. 2 . In order to use the implicitplot, you will have to select fixed x , y and z domains, which should be chosen large enough to include all the points on the surface. You may have to determine these by experiment. To determine appropriate choices, let us first plot the function on the domain in question.

> f:=x->x^2-2*x+1;

f := proc (x) options operator, arrow; x^2-2*x+1 en...

> plot(f(x),x=-2..2);

[Maple Plot]

This suggests that if we choose the intervals y = -10 .. 10 , z = -10 .. 10 , we should get the complete picture.

Let us plot the surface.

> implicitplot3d(y^2+z^2=f(x)^2,x=-2..2,y=-10..10,z=-10..10,axes=boxed);

[Maple Plot]

This picture looks pretty terrible, because the grid that Maple used is very coarse. One can improve on the picture by choosing a finer grid, but then the computation takes longer, and the display is harder to manipulate. In fact, it is easy

to crash Maple by choosing too fine a grid, so be warned. Below, is an example of a choice of a grid that gives a modest improvement in the accuracy of the picture.

> implicitplot3d(y^2+z^2=f(x)^2,x=-2..2,y=-10..10,z=-10..10,axes=boxed,grid=[25,25,25],style=patchnogrid);

[Maple Plot]

Let us find the volume of the solid bounded by this surface. This is a simple example of the general procedure of finding the area of a cross section, because the cross sections perpendicular to the x -axis have area A(x) given by the formula A(x) = Pi*f(x)^2 . Thus the total volume in our example is given by

> V:=int(Pi*f(x)^2,x=-2..2);

V := 244/5*Pi

Submission:

Consider the solid of revolution given by revolving the graph of the function f(x) = sqrt(x) about the x -axis.

1) Suppose that we choose x = 0 .. 4 for the domain. Find appropriate ranges for y and z in order to plot the

whole surface.

2) Implicitly plot the surface described.

3). Find the volume of the solid of revolution determined by this surface.

Submission worksheet:

>

5. A volume of revolution.

Consider the volume of the solid obtained by r evolving the region bounded by the curves y = cos(x), y = 0, x = 0 and x = Pi/2 about the line y=1.

Submission:

(a) Sketch the planar region that is to be revolved.

(b) Give an explanation of the approximating process that gives rise to the definite integral.

(c) Write the definite integral corresponding to the volume of the solid.

(d) Find the value of this integral.

Submission worksheet:

>

6. Volumes by the washer method.

The washer method applies to the situation where a region in a plane, bounded by two curves is rotated around a line in the plane. Cross sections will be annuli or washer shaped regions. For example, suppose that a region bounded by the curves y = f(x) and y = g(x) , between x = a and x = b is revolved about the x -axis.

Let f(x) = -x+3 , g(x) = x^2+1 , a = -2 and b = 1 . Let us plot this region to see what is going on.

> f:=x->-x+3;g:=x->x^2+1;a:=-2;b:=1;

f := proc (x) options operator, arrow; -x+3 end pro...

g := proc (x) options operator, arrow; x^2+1 end pr...

a := -2

b := 1

> plot([f(x),g(x)],x=a..b,color=[red,blue]);

[Maple Plot]

>

>

We can plot each of the surfaces determined by the two curves implicitly, and put the two plots together to get a picture of the solid in question.

> with(plots):

> plota:=implicitplot3d(y^2+z^2=f(x)^2,x=-2..1,y=-5..5,z=-5..5,style=wireframe,thickness=2,color=red):

> plotb:=implicitplot3d(y^2+z^2=g(x)^2,x=-2..1,y=-5..5,z=-5..5,style=patchnogrid):

> display(plota,plotb,axes=boxed);

[Maple Plot]

Now let us compute the volume of the solid bounded by the two curves. Since g(x) <= f(x) for all x in our domain, we can use the formula A(x)=Pi*(f(x)^2-g(x)^2) for the area of the cross sections. Thus the volume is given by

> V:=int(Pi*(f(x)^2-g(x)^2),x=-2..1);

V := 117/5*Pi

Submission:

Consider the region in the x,y-plane bounded by the curves x = y/2 and x = sqrt(y) , from y = 0 .. 4 . Note that these curves are determined by x as a function of y , instead of the other way around.

1) Plot the solid given by revolving the region bounded by these two curves around the y -axis.

2) Determine the volume of the solid you obtained in 1).

3) Express this region by two curves determined by y as a function of x instead of the other way around. Determine the domain for x .

4) Plot the solid given by revolving the region bounded by these two curves around the x -axis.

5) Compute the volume of the solid you plotted in 4).

Submission worksheet:

>

>

>

>