Hands-On Mathematics for Deep Learning
上QQ阅读APP看书,第一时间看更新

Integrals

As in the single variable case, we have antiderivatives and integrals for functions that depend on multiple variables as well. Earlier, we learned that an integral gives us the area under a curve  between an interval [a, b]. Now, instead of finding the area over an interval, we will be finding the volume under the graph  over a region. The equation looks like this:

In the preceding equation, R is a region in the xy-plane. Think of R as being cut into multiple small rectangular regions, denoted ΔA. Then, we can approximate the volume as follows:

Additionally, ; thus, .

Note: A double integral is not the same as taking an integral twice.

Now, instead of calculating over small rectangular regions, let's divide the region into long, thin slices of a fixed width Δx. Sound familiar? It should, as this is very similar to what we did earlier in single variable integration. 

Let's assign , and now, our integral takes the following form:

We then multiply the result by Δx.

We can now rewrite the integral, as follows:

Here,  and .

Suppose that we have the function  and the boundaries of the region are defined over  and . Then, the integral is as follows:

And by evaluating the inner integral, we get the following:

And by evaluating the outer integral, we get the following:

And there you have it. That is how we find integrals of multivariable functions.

Let's now suppose that we have a function , and we evaluate the integral over the region where  and . Then, we have the following:

This is a direct result of the distributive law.

The region we have been integrating over so far has been rectangular, but this most likely will not always be the case. If the region is an irregular shape, then the limits of integration will vary at each slice.

The best way to deal with this is to write it as a function of the variable we are not integrating. 

Let's suppose that we have , and the set of points it exists on is , which tells us  and . We can now write this in the following form:

Here, as we can see, x is defined on the interval [a, b], and y exists between two functions of x—g(x) and h(x).

We know from trigonometry, particularly the Pythagorean theorem, that the smallest value for y will be and the largest value will be .

We can now proceed to rewrite the preceding set of points, as follows:

Changing it up and writing it this way slices the unit disk into vertical lines spaced apart by a fixed width. 

Then, our integral becomes this one:

And because , we can rewrite the preceding integral, like so:

We then proceed by evaluating the inner integral and then the outer integral, like so:

We know this to be true from the area of a circle: 

Some important properties for double integrals are shown in the following list:

  •  , where c is some constant
  •  if the R can be split into two regions, R1 and R2
  •  when  for all 

Let's now suppose we have a cylinder with a spherical top, as in the following diagram, and we want to find its volume. The region under the sphere is  and inside the cylinder  and above z = 0, as follows:

We know that we find the volume of a region as follows:

To evaluate this integral, we start by rewriting the equation of the sphere into , and the set of points where x and y are defined is 

We rewrite our points and define the limits of the region in terms of polar coordinates θ and the radius r, so that the equation looks like this:

We can now rewrite z, as follows:

So, the volume is as follows:

And by evaluating the inner and outer integrals, we get the following:

We now know how to integrate our regions in and find the volume under the graph. But what about when we have regions in ? Earlier, we used a double integral for two-dimensional regions; so, naturally, for a three-dimensional region, we will use three integrals. We write this as follows:

Suppose now that the region we integrate over is defined by  and . The triple integral then becomes the following:

Earlier on, we came across something called substitution, where we made our function equal to a variable to make it easier for us to find the derivative. We can also do the same in integration. 

Suppose we have the following integral:

We can make , and the integral then becomes this:

Now, let's move on to double integrals, and see how we can transform regions to make them easier for us to deal with. To do this, we will need to call on our old friend the Jacobian matrix for help. 

As a refresher, suppose we have  and . Then, the Jacobian matrix is as follows:

Also, recall that the Jacobian matrix can also be thought of as the determinant. So, we can rewrite the preceding equation as follows:

Suppose now that we want to integrate  over R. Now, let's make  and , and rename our region as S. The integral now looks like this:

From this, we can easily observe that .

Let's move on to triple integrals now. Suppose we have a function  and we want to integrate it over R. We start by making , and , and as before, we rename the new region as S. The Jacobian matrix is then the following one:

The triple integral now looks like this:

We now have a good enough understanding of multivariable calculus and are ready to dive into the wonderful world of vector calculus.