9. Double and multiple integrals, line integrals

Double integrals

Given a function f\colon \mathbb{R}^2\to \mathbb{R} and a set D\subseteq \mathbb{R}^2, the integral

    \[\iint_{D} f(x,y)\,dx\,dy\]

is simply the volume under the graph of f over the given set.

Assume that we would like to calculate the volume of a pyramid with a base in form of a isosceles right triangle (with boundary of axes and line y=-x+1) and height 1, so in point (x,y) the height is given by the following formula h(x,y)=-x-y+1. So the volume is

    \[\iint_D h(x,y)\,dx\,dy\]

where D is the triangle mentioned above.

How to calculate this integral? It will be described below.

Fubini Theorem

Fubini theorem states that such an integral is the integral over x of the integral over y, and i the same as integral over y of the integral over x, in other words (for functions nice enough):

    \[\iint_{D} f(x,y)\,dx\,dy = \int_{y_0}^{y_1}\left(\int_{x_0(y)}^{x_1(y)} f(x,y)\,dx\right)\,dy=\]

    \[=\int_{x_0}^{x_1}\left(\int_{y_0(x)}^{y_1(x)} f(x,y)\,dy\right)\,dx,\]

where y_0,y_1, x_0(y), x_1(y) and x_0,x_1, y_0(y), y_1(y) are such that

    \[D=\{(x,y)\colon y_0\leq y\leq y_1, x_0(y)\leq x\leq  x_1(y)\}=\]

    \[=\{(x,y)\colon x_0\leq x\leq x_1, y_0(x)\leq y\leq  y_1(x)\}.\]

Obviously you have to treat the outer variable as a constant parameter when calculating the inner integral.

Therefore, returning to our example of the pyramid, the section at x has area P_x=\int_0^{1-x} h(x,y)\, dy, so the volume is:

    \[\int_0^1\left(\int_0^{1-x} h(x,y)\,dy\right)\, dx= \int_0^1\left(-xy-y^2/2+y\right)|_0^{1-x}\,dx=\]

    \[=\int_0^1\frac{1}{2}(x-1)^2\,dx=(x^3/6-x^2/2+x/2)|_0^1=\frac{1}{6},\]

which is consistent with our knowledge about geometry.

Integration with change of variables

If D\colon A\to B is a diffeomorphism, the following theorem holds

    \[\iint_{B}F(x,y)\,dx\,dy=\int\int_{A}F(D(t,u))\cdot |\det D'|\, dt\,du.\]

,
where D' = \left[\begin{array}{cc}\frac{\partial f_1}{\partial x} & \frac{\partial f_1}{\partial y}\\ \frac{\partial f_2}{\partial x} & \frac{\partial f_2}{\partial y}\end{array}\right], where F=(f_1, f_2).

Polar coordinates

The most common use of the above method are polar coordinates which are defined by the diffeomorphism \Phi(r,\theta)=(r\cos \theta,r\sin\theta)=(x,y). Thus, x^2+y^2=r^2(\cos^2\theta+\sin^2\theta)=r^2.
Moreover,

    \[\Phi'=\left[\begin{array}{cc}\cos \theta& -r\sin\theta \\ \sin \theta & r\cos\theta\end{array}\right],\]

so

    \[\det \Phi'= r(\cos^2\theta+\sin^2\theta)=r.\]

E.g. let us calculate

    \[\int\int_{\R^2}e^{-x^2-y^2}\,dx\,dy.\]

We get:

    \[\iint_{\R^2}e^{-x^2-y^2}\,dx\,dy=\int_{(0,\infty)\times (0,2\pi)}|r|e^{r^2}\,dr\,d\theta=\]

    \[=\int_{0}^{\infty}\int_0^{2\pi} re^{r^2}\,d\theta\,dr=\int_{0}^{\infty} \theta\cdot re^{r^2}|_{2}^{2\pi}\,dr=\]

    \[=\pi\int_{0}^{\infty} 2re^{r^2}\,dr=\pi \lim_{a\to \infty}\int_{0}^{a} 2re^{r^2}\,dr=\pi \lim_{a\to \infty} e^{r^2}|_0^2=\pi(1-0)=\pi.\]

Volume

If we want to calculate the volume of a set V we can do it using one of the following three methods:

    \[V=\iiint_{V} 1\,dx\,dy\,dz=\iint_{S} H(x,y)\,dx\,dy=\int_a^b S(x)\,dx,\]

where S is the basis H(x,y) is the height at x,y and S(x) is the area of the section for given x.

Assume that we would like to calculate the volume of a pyramid with a base in form of a isosceles right triangle (with boundary of axes and line y=-x+1) and height 1, so in point (x,y) the height is given by the following formula h(x,y)=-x-y+1. Therefore the section at x has area P_x=\int_0^{1-x} h(x,y)\, dy, so the volume is:

    \[\int_0^1\left(\int_0^{1-x} h(x,y)\,dy\right)\, dx= \int_0^1\left(-xy-y^2/2+y\right)|_0^{1-x}\,dx=\]

    \[=\int_0^1\frac{1}{2}(x-1)^2\,dx=(x^3/6-x^2/2+x/2)|_0^1=\frac{1}{6},\]

which is consistent with our knowledge about geometry.

Volume of a solid of revolution

If we take a graph of a function f(x) and revolve it around axis x, on the interval [a,b], we will get a solid of revolution. Since the area of a section for given x equals \pi (f(x))^2, from the above considerations we get that the volume equals \int_a^b\pi (f(x))^2\,dx.

Integrals in natural sciences

Very often physical variables can be described as a surface area or volume under a graph of another variable, i.e. as an integral. E.g. the change of position is the area below the graph of speed (because speed is the derivative of position), the force applied by a fluid is the integral over pressure, the mass of an object is an integral over its density at each point. Such situations can be expected whenever if the variable is constant on the whole length/ area / volume we would multiply it by length / area / volume.

Average value of a function

Similarly the average value of a function (i.e. average height of its graph), is simply the area/ volume under the graph (i.e. the integral) divided by the length/area of the base.

Centre of mass

The centre of mass along x axis, is a point x_0, such that the torque of weight (i.e. length of lever arm times mass times a constant, which here can be omitted) is equalized. Let us say that the mass of a section for given x is M(x). The lever arm length (x-x_0). So we get that \int_a^b(x-x_0) M(x)\,dx=0, where a and b are x ends of a studied object. Thus, \int_a^b x M(x)\,dx=x_0\int_a^b M(x),dx=x_0 M, where M is the whole mass. Thus, x_0= \frac{\int_a^b x M(x)}{M}. Notice that in order to calculate M(x) and M we usually also have to calculate integrals.

Line integral of a scalar field

Imagine a curve S described as a parametrization (x(t),y(t)) (e.g. as a route of a moving point). Assume that there is a value f(x,y) associated with each point, e.g. density of the material. We can calculate the mass of the whole curve between t=a and t=b. It is clear that since the change of position is the are between the graph of speed and the velocity is v_x= (x'(t)) and v_y=(y'(t)) we get speed \sqrt{(x'(t))^2+(y'(t))^2}, so the length of the curve is \int_a^b \sqrt{(x'(t))^2+(y'(t))^2}\, dt. Thus, to calculate its mass we have to multiply it in every point by the density, i.e.

    \[\int_S f\, dS = \int_a^b f(x(t),y(t))\sqrt{(x'(t))^2+(y'(t))^2}\, dt \]

and this is actually what is called the line integral of a scalar field.

Surface are of a solid of revolution

Thus, if we have a function f(x), its graph is described by the parametrization x(t)=t, y(t)=f(x)=f(t). Thus, its length is simply

    \[L=\int_a^b \sqrt{1+(f'(t))^2}\, dt .\]

Now, if we revolve it around x axis, then at given x we get circumference O(x)=2\pi f(x), so the surface area of the solid of revolution is

    \[\int_S O\, dS = \int_a^b 2\pi f(x)\sqrt{1+(f'(t))^2}\, dt .\]

Line integral of a vector field

Let us imagine S (imagine a rigid wire), described by a parametrization (x(t), y(t)), on an interval t\in [a,b]. Imagine a bead moving along this wire. This time, not a scalar but a vector is associated with every point of the plane, e.g. a force which would be applied on the bead in this point. Let this force have an x-coordinate P(x,y) and y-coordinate Q(x,y).

We would like to calculate the work which is subtracted (or added) by this forces when moving the bead in the indicated way along the wire. This is exactly the line integral of the vector field and is denoted by:

    \[\int_S P\,dx+Q,dy,\]

and equals

    \[\int_a^b (P(x(t),y(t))x'(t)+Q(x(t),y(t))y'(t))\, dt,\]

which is nicely shown by this animation (by Wikipedia).

Line integration over closed curve

If the curve S is closed it is important to set its orientation (we would always assume anti-clockwise orientation, in the clockwise case one has to multiply the integral by -1). We write then:

    \[\oint_S P\,dx+Q\,dy.\]

Green Theorem allows us to change such an integral into double integral, namely

    \[\oint_S P\,dx+Q,dy=\iint_D \left(\frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y}\right) \,dx\,dy,\]

where D is the area cut out by the curve S.