## Multivariate Calculus for Actuarial Science, Part II

### Setting Up an Integral

Of course, you usually have to set up the interated integral yourself. For example you may be asked to evaluate the integral

$$\iint_R \left(x+y\right) \, dA,$$

where $$R$$ is the rectangle bounded by $$x=1$$, $$x=2$$, $$y=0$$, and $$y=2$$. In this case, it is clear that the variable $$x$$ is varying from $$1$$ to $$2$$, and the variable $$y$$ is varying from $$0$$ to $$2$$. You can think of determining the bounds on $$x$$ by drawing a horizontal line through the rectangle $$R$$, and determining the bounds on $$y$$ by drawing a vertical line through the rectangle $$R$$. It really doesn't matter whether you decide to integrate $$dx \ dy$$ or $$dy \ dx$$. We need to evaluate one of these integrals:

$$\iint_R \left(x+y\right) \, dA=\int_1^2 \int_0^2 \left(x+y\right)dy\ dx = \int_0^2 \int_1^2 \left(x+y\right)dx\ dy.$$

Let us integrate $$dx$$ first.

$$\int_0^2 \int_1^2 \left(x+y\right)dx\ dy=\int_0^2\left(\frac{1}{2}x^2 + xy\right|_1^2\ dy=\int_0^2 \left(\frac{3}{2}+y\right)\ dy = \left(\frac{3}{2}y + \frac{1}{2}y^2\right|_0^2=5.$$

When the region of integration is not a rectangle, we can still use the same procedure. Let us evaluate the integral

$$\iint_R \left(x+y\right) \, dA,$$

where $$R$$ is the region bounded by $$x=1$$, $$y=0$$, and $$y=x^2$$.

Drawing horizontal and vertical lines through the region can help us find the limits. If we integrate $$dy$$ then $$dx$$, the interated integral is

$$\int_0^1 \int_0^{x^2}(x+y)\ dy \ dx.$$

When we integrate $$dx$$ then $$dy$$, the integral is

$$\int_0^1 \int_\sqrt{y}^1 (x+y)\ dx \ dy$$

Most people prefer to do the first integral because both integrals have 0 as the lower limit. Do the integral of your choice, and check your solution below.

Show the solution

$$\int_0^1 \int_0^{x^2} \left(x+y\right) \, dy\ dx= \int_0^1 \left(xy+\frac{1}{2}y^2\right|_0^{x^2} dx= \int_0^1\left(x^3+\frac{1}{2}x^4\right)\, dx = \left(\frac{1}{4}x^4 + \frac{1}{10}x^5\right|_0^1=\frac{7}{20}$$

$$\int_0^1 \int_\sqrt{y}^{1} \left(x+y\right) \, dx\ dy= \int_0^1 \left(\frac{1}{2}x^2 + xy\right|_\sqrt{y}^{1} dy= \int_0^1\left(\frac{1}{2}+\frac{1}{2}y-y^{3/2}\right)\, dy = \left(\frac{1}{2}y+\frac{1}{4}y^2-\frac{2}{5}y^{5/2}\right|_0^1=\frac{7}{20}$$