# Areas by integration

The definition of a definite integral is derived trough the area of the region bounded by the graph of the given function, the $x$- axis and the vertical lines $x=a$ and $x=b$. Therefore, a definite integral is directly used in the calculation of the area of the such region:

$$A =\int_{a}^{b} f(x) dx.$$

Thereby, we assume that the function $f$ is continuous and non-negative on the interval $[a, b]$.

In some cases it is easier to rewrite the function $f$ in terms of $y$. Then we calculate the area using horizontal elements, that is, we need to calculate the area of the region bounded by the graph of the given function, the $y$- axis and the horizontal lines $y=a$ and $y=b$. In this case, the area is

$$A = \int_a^b f(y) dy.$$

A more general approach is finding the area of the region between two or more curves.

Let $f, g: [a, b] \to \mathbb{R}$ be two integrable functions on $[a, b]$ and $f(x) \ge g(x), \forall x \in [a, b]$. Then the area of the region bounded by the graphs of the functions $f$ and $g$ and the vertical lines $x=a$ and $x=b$ is equal to the integral:

$$A = \int_{a}^{b} [f(x) – g(x)] dx.$$

Note. The area is always non-negative. We have singled out the rectangle of the width $\Delta x$ and height $f(x_i) – g(x_i)$, therefore the area of this representative rectangle is

$$[f(x_i) – g(x_i)] \cdot \Delta x.$$

Now we will add up the area of all $n$ rectangles to get an approximation to the total area between the graphs of the functions $f$ and $g$ and the vertical lines $x=a$ and $x=b$:

$$A = \sum_{i = 1}^n [f(x_i) – g(x_i)] \Delta x.$$

We take the limit as $n \to \infty$:

$$\lim_{n \to \infty} \sum_{i = 1}^n [f(x_i) – g(x_i)] \Delta x.$$

Since $f$ and $g$ are both continuous functions, this limit exists. Therefore, the area of the given region is

$$A = \lim_{n \to \infty} \sum_{i = 1}^n [f(x_i) – g(x_i)] \Delta x = \int_a^b [f(x) – g(x)] dx.$$

In the case when we need to find the area of the region enclosed by the graphs of two functions that intersect, firstly we need to find their intersection points and thus determine boundaries of a definite integral.

Example 1. Find the area of the region enclosed by $y= x^2 – 4x +5$ and $y= x+1$.

Solution.

Let $f(x) = x^2 – 4x +5$ and $g(x) = x + 1$.

The intersections of the graphs of the functions $f$ and $g$ we finding by solving the equation $f(x) = g(x)$. It follows

$$x^2 – 4x + 5 = x + 1 \Longrightarrow x^2 – 5x +4 = 0 \Longrightarrow x_{1,2} = 1, 4.$$ From the sketch above, we can see that the graph of the function $g$ lies above the graph of the function $f$ over the interval $[1, 4]$. Therefore

$$A = \int_1^4 [g(x) – f(x)] dx$$

$$= \int_1^4 [(x+1) – (x^2 – 4x + 5)] dx$$

$$= \int_1^4 (-x^2 + 5x -4) dx$$

$$= – \frac{x^3}{3} \bigg|_1^4 + \frac{5 x^2}{2} \bigg|_1^4 – 4x \bigg|_1^4$$

$$= \left( – \frac{64}{3} + \frac{1}{3} \right) + \left( 40 – \frac{5}{2} \right) – (16 – 4)$$

$$= – \frac{63}{3} + \frac{75}{2} – 12$$

$$= \frac{9}{2}$$

Example 2. Find the area of the region enclosed by $y =e^x$, $y=e^{-x}$ and $x=2$.

Solution.

Let $f(x) = e^x$ and $g(x) = e^{-x}$.

The graphs of the functions intersects at point $x=0$. Since the graph of the function $f$ lies above the graph of the function $g$, then the area of the region enclosed by the graphs of the function $f$ and $g$, the $x$- axis and the vertical line $x=2$ is

$$A = \int_0^2 [f(x) – g(x)] dx$$

$$= \int_0^2 (e^x – e^{-x}) dx$$

$$= e^x \bigg|_0^2 + e^{-x} \bigg|_0^2$$

$$= e^2 + \frac{1}{e^2} – 2$$ Example 3. Find the area of the region enclosed by $y = \frac{x^2}{2}, y= 2 \sqrt{x}$ and below the line $y=2$.

Solution. The line $y=2$ and the parabola $y= 2 \sqrt{x}$ intersects at point $(1,2)$ and the line $y=3$ and the parabola $y= \frac{x^2}{2}$ at point $(2,2)$. Thus, it is more appropriate to display the region enclosed by the graphs of the given functions as the sum of two regions, one over the interval $[0,1]$ and another over the interval $[1,2]$.

$$A = A_1 + A_2 = \int_0^1 \left ( 2 \sqrt{x} – \frac{x^2}{2} \right) dx + \int_1^2 \left( 2 – \frac{x^2}{2} \right)$$

$$= \left( \frac{4}{3}\sqrt{x^3} – \frac{1}{6} x^3 \right) \bigg|_0^1 + \left( 2x – \frac{1}{6} x^3 \right)\bigg|_1^2$$

$$= 2$$

Also, we could rewrite the given functions in terms of $y$:

$$y =\frac{x^2}{2} \Longrightarrow x= \sqrt{2y},$$

$$y= 2 \sqrt{x} \Longrightarrow x= \frac{y^2}{4},$$

that is,

$$f(y) = \sqrt{2y}, \quad g(y) = \frac{y^2}{4}.$$

In this case, we need to find the area enclosed by the graphs of the functions $f$ and $g$, the $x$- axis and the horizontal line $y=2$. We will get the same result.

Example 4. Find the area of the region enclosed by $y=x^3 +1$ and $y= x+1$.

Solution.

Let $f(x) = x^3 + 1$ and $g(x) = x + 1$. The intersections of the graphs of $f$ and $g$ we finding by solving the equation $f(x) = g(x)$, that is

$$x^3 + 1 = x +1 \Longrightarrow x^3 – x = 0 \Longrightarrow x(x^2 – 1) = 0.$$

Solutions of the equation above are $x_1 = -1, x_2 = 0$ and $x_3 = 1$.

Draw a sketch: We can see that the graph of the function $g$ lies below the graph of the function $f$ over the interval $[-1, 0]$ and above the graph of the function $f$ over the interval $[0, 1]$. Therefore, we have

$$A = \int_{-1}^0 [f(x) – g(x)] dx + \int_0^1 [g(x) – f(x)] dx = \int_{-1}^0 [(x^3 + 1) – (x+1)] dx + \int_0^1 [(x+1) – (x^3 +1)] dx$$

$$= \int_{-1}^0 (x^3 – x) dx + \int_0^1 (x – x^3) dx$$

$$= \left(\frac{x^4}{4} – \frac{x^2}{2} \right) \bigg|_{-1}^0 + \left( \frac{x^2}{2} – \frac{x^4}{4} \right) \bigg|_{0}^1$$

$$= \frac{1}{2}$$

Example 5. Find the area of the region enclosed by $y= \cos x$, $y =\sin 2x$, $x=0$ and $x= \frac{\pi}{2}$.

Solution.

Let $f(x) = \cos x$ and $g(x) = \sin 2x$. The intersection points are:

$$f(x) = g(x) \Longrightarrow \cos x = \sin 2x \Longrightarrow \cos x – 2 \sin x \cos x = 0 \Longrightarrow \cos x (1 – \sin x) = 0.$$

The solutions of the equation above are $x_1 = \frac{\pi}{2} + 2k \pi$ and $x_2 = \frac{\pi}{6} + 2k\pi$. Since we observe the interval $\left[0, \frac{\pi}{2} \right]$, then the intersection points are $x_1 = \frac{\pi}{6}$ and $x_2 = \frac{\pi}{2}$. The graph of the function $g$ lies below the graph of the function $f$ over the interval $\left[0, \frac{\pi}{6}\right]$ and above the graph of the function $f$ over the interval $\left[ \frac{\pi}{6}, \frac{\pi}{2} \right]$. Therefore, the area of the given region is

$$A = \int_0^{\frac{\pi}{6}} [f(x) – g(x)] dx + \int_{\frac{\pi}{6}}^{\frac{\pi}{2}} [g(x) – f(x)] dx$$

$$= \int_0^{\frac{\pi}{6}} (\cos x – \sin 2x) dx + \int_{\frac{\pi}{6}}^{\frac{\pi}{2}} (\sin 2x – \cos x) dx$$

$$= \left (\sin x + \frac{\cos 2x}{2} \right) \bigg|_0^{\frac{\pi}{6}} – \left(\frac{\cos 2x}{2} + \sin x \right) \bigg|_{\frac{\pi}{6}}^{\frac{\pi}{2}}$$

$$= \frac{1}{2}$$