16.3 Double Integrals

Example

Compute \(TraditionalForm\`∫\_0\%2\(∫\_\(1 + y\^2\)\%5\ 
          y\ cos[\((x - 1)\)\^2]\ dx \(\(d\)\(y\)\(\ \)\)\)\).

Solution

Since there is no easy way to integrate cos[(((x - 1))^2)] first., we'll try reversing the order of integration. The region is D  =  {(x, y)  |  
            1 + (y^2) ≤  x  ≤ 5,  
          0  ≤  y  ≤  2 } and is horizontally simple.

lines = 
        Table[{((4 - (y^2)) x  +  5  (y^2))/4, y}, {y, 1/4, 7/4, 
            1/4}];
lines = Append[lines, {x, (Sqrt[x - 1])}];
lines  = Append[lines, {5, (x - 1)/2}];

ParametricPlot[Evaluate[lines], {x, 1, 5}, 
      PlotRange -> {{0, 5}, {0, 2}}]

The region is also vertically simple

lines = Table[{x, y (Sqrt[ x - 1])/2}, {x, 3/2, 9/2, 1/2}];
lines = Append[lines, {1 + (y^2), y}];
lines  = Append[lines, {5, y}];

ParametricPlot[Evaluate[lines], {y, 0, 2}, 
      PlotRange -> {{0, 5}, {0, 2}}]

So D can be described by the inequalities: D  =  { (x, y)  |  
            0  ≤  y  ≤  (Sqrt[x - 1]) ,  
          1  ≤  x  ≤  5 }. Therefore the integral may be evaluated as \(TraditionalForm\`∫\_1\%5\(∫\_0\%\(\@\(x - 1\)\)\ 
          y\ cos[\((x - 1)\)\^2]\ dy \(\(dx\)\(\ \)\)\)\). Computing the iterated integral we get

(∫_0^((Sqrt[x - 1]))) 
      y Cos[(((x - 1))^2)] \[DifferentialD]y

Use the substitution u  =  (((x - 1))^2), d u  =  2 (x - 1) d x, to integrate this function.

(∫_1^5) (1/2) (x - 
            1) Cos[(((x - 1))^2)] \[DifferentialD]x

Of course, Mathematica can do it in one step:

(∫_1^5)(∫_0^((Sqrt[x - 1]))) 
        y Cos[(((x - 1))^2)] \[DifferentialD]y \[DifferentialD]x

N[%]

Actually, Mathematica has no trouble with the original integral:

(∫_0^2)(∫_(1 + (y^2))^5) 
        y Cos[(((x - 1))^2)] \[DifferentialD]x \[DifferentialD]y

Here's a plot of the function f(x, y)  =  y cos[(((x - 1))^2)] over the region D.

x  =   (1 - u) (1 + y^2)  +  5  u;

graph  =  
        ParametricPlot3D[{x, y,  y Cos[(((x - 1))^2)]}, {u, 0, 1}, {y, 0, 
            2}, PlotPoints -> {50, 30}];
zero  =  
        ParametricPlot3D[{x, y,  0}, {u, 0, 1}, {y, 0, 2}];
Show[graph, zero, ViewPoint -> {2.022,  2.192,  1.600}]

The flat blue surface is the region D in the x y-plane. The graph lies above and below the x y-plane, so the function is both positive and negative. The value of the integral (sin(16)/4  =  -0.0719758) does not give the volume under this graph, but rather the volume under the graph above the x y-plane minus the volume under the x y-plane above the graph. The integral may also be interpreted as the average value of the function over the region times the area of the region. The area is

(∫_1^5)(Sqrt[ x - 1]) \[DifferentialD]x

so the average value of f in the region D is:

Sin[16]/4/(16/3)

N[%]