Math 225: Calculus III   Solution 7

Initialization

<<Calculus`Math225`

i = {1, 0, 0}; j = {0, 1, 0}; k = {0, 0, 1};

Problem 1

Consider the double integral
Integrate[x^3 y, {y, 0, 2}, {x, 4-y^2, 4}]
(The order of integration in Mathematica is from right to left so that in this example the integral with respect to x is done first and then the integral with repspect to y.) Sketch the region of integration by combining its boundary curves together in one plot and write an equivalent integral with the order of integration reversed. Evaluate both integrals and check that they agree.

Solution

p1 = ParametricPlot[{4-y^2,y}, {y,0,2}]

p2 = ParametricPlot[{x,2}, {x,0,4}]

p3 = ParametricPlot[{4,y}, {y,0,2}]

Show[p1,p2,p3]

The limits of integration define the region horizontally by the inequalities
      4-y^2 <= x <= 4
          0 <= y <= 2
The same region is decribed vertically by "solving" for y:
  Sqrt[4-x] <= y <= 2
          0 <= x <= 4

Integrate[x^3 y, {y, 0, 2}, {x, 4-y^2, 4}]

Integrate[x^3 y, {x, 0, 4}, {y, Sqrt[4-x], 2}]

Problem 2

Find the volume of the region bounded above by the hyperbolic sheet
z == 4 - x^2 + y^2, below by the xy-plane, and on the sides by the vertical planes
y == 1 and y == -1.

Solution

The top surface is the hyperbolic sheet z == 4 - x^2 + y^2 and the bottom surface is the xy-plane, z == 0. The region in the xy-plane is described by the other equations (the lines
y == 1, and y == -1) and the intersection of the top and bottom surfaces. This intersection, z == 4 - x^2 + y^2 and z == 0, is a hyperbola: x^2 - y^2 == 4. The two lines, y == 1, and y == -1, intersect the hyperbola in the points {±Sqrt[5],±1}. Thus,  the solid region is the region under the graph of 
z == 4 - x^2 + y^2 over the region in the xy-plane defined by
    -Sqrt[4+y^2] <= x <= Sqrt[4+y^2]
              -1 <= y <= 1

p1 = ParametricPlot[{{-Sqrt[4+y^2],y},{Sqrt[4+y^2],y}},
     {y,-1,1}]

p2 = Plot[{-1,1}, {x,-Sqrt[5], Sqrt[5]}]

Show[p1,p2]

The integral should be set up horizontally, using the above inequalities.

Integrate[4-x^2+2y^2, {y,-1,1},
{x,-Sqrt[4+y^2],Sqrt[4+y^2]}]

N[%]

This was not required, but here is a view of the graph of the function
4 - x^2 + y^2 over the region as defined above.

ParametricPlot3D[{t Sqrt[4+y^2],y, 4-t^2(4+y^2)+y^2},
   {t,-1,1}, {y,-1,1}]

Problem 3

The average value of a function f over a region R in the xy-plane is defined to be the integral of f over R divided by the area of R. For this problem let R be the semicircle
x^2 + y^2 <= 1 above the x-axis. Find the average distance of the points in R to the point {0,1}, i.e., find the average value of the function
Sqrt[x^2 + (y-1)^2] over R. (Use NIntegrate[] for the integrals).

Solution

The integrals should be done in polar coordinates where the region is defined by,
0 <= r <= 1, 0 <= t <= Pi, and the distance function is just

Sqrt[x^2+(y-1)^2]/.{x->r Cos[t],y->r Sin[t]}//Simplify

We must and another factor of r to the integrals for the area element  r dr dt.

intf = NIntegrate[Sqrt[1+r^2-2r Sin[t]]*r, {r,0,1}, {t,0,Pi}]

The area of R is just:

area = Integrate[ r , {r,0,1}, {t,0,Pi}]

So the average value of f is

fbar = intf/N[area]

Problem 4

Find the centroid of the part of the unit disk, x^2 + y^2 <= 1, that lies in the first quadrant.

Solution

The coordinates of the centroid, {xbar, ybar}, are just the average values of x and y over the region. The region is described by the inequalities
    0 <= y <= Sqrt[1-x^2]
    0 <= x <= 1

region=Plot[Sqrt[1-x^2], {x,0,1}, AspectRatio->1]

area = Integrate[1,{x,0,1},{y,0,Sqrt[1-x^2]}]

xbar = Integrate[x,{x,0,1},{y,0,Sqrt[1-x^2]}]/area

ybar = Integrate[y,{x,0,1},{y,0,Sqrt[1-x^2]}]/area

Show[region,
Graphics[{PointSize[0.025],Point[{4/(3Pi),4/(3Pi)}]}]]

This problem can also be easily done in polar coordinates. The region is the simply described by
    0 <= r <= 1
    0 <= t <= Pi/2

area = Integrate[r,{t,0,Pi/2},{r,0,1}]

xbar = Integrate[r Cos[t]*r, {t,0,Pi/2},{r,0,1}]/area

ybar = Integrate[r Sin[t]*r, {t,0,Pi/2},{r,0,1}]/area

Problem 5

Find the mass and first moments about the coordinate axes of a thin triangular plate bounded by the lines y - x == 1, y + x == 1, and y == 0 in the xy-plane if the density is
delta[x_,y_] = 1 - y^2.

Solution

ParametricPlot[{{y-1,y},{1-y,y}}, {y,0,1}]

The region R is defined horizontally by the inequalities
    y-1 <= x <= 1-y
      0 <= y <= 1
The total mass is the integral of the density function over R:

delta[x_,y_] = 1 - y^2;

M = Integrate[delta[x,y], {y,0,1}, {x,y-1,1-y}]

The moment about the y-axis is the average value of x*delta[x,y]. By symmetry, this should clearly be 0.

My = Integrate[x*delta[x,y], {y,0,1}, {x,y-1,1-y}]/M

The moment about the x-axis is the average value of y*delta[x,y]:

My = Integrate[y*delta[x,y], {y,0,1}, {x,y-1,1-y}]/M