Finding Areas by Integration
Area between two curves using definite integrals
Building on the concept of definite integrals, which measure the area between a curve and the x-axis, we can extend the same idea to find the area enclosed between two curves. Let $f ( x )$ and $g ( x )$ be two continuous functions defined on the same interval $[ a , b ]$, such that $f ( x ) \geq g ( x )$ for every $x \in [ a , b ]$, and suppose their graphs enclose a region. The area of this region is given by:
\[(\text{1}) A = \int_{a}^{b} [ f ( x ) - g ( x ) ] d x\]Since both $f$ and $g$ are continuous on $[ a , b ]$, their difference $f ( x ) - g ( x )$ is also continuous on the same interval. A continuous function on a closed and bounded interval is Riemann-integrable. Therefore, the function $f ( x ) - g ( x )$ is integrable on $[ a , b ]$, and the area between the two curves is well defined through a definite integral.
We want to calculate the area of the gray-shaded region between the curves $f ( x )$ and $g ( x )$:

Intuitively, we can see that the area $A$ is given by the difference between the area under the curve $f ( x )$ and the area under the curve $g ( x )$. In other words, formally:
\[A = \int_{a}^{b} f ( x ) d x - \int_{a}^{b} g ( x ) d x\]By the linearity of the integral, this becomes equation $1$.
Areas between intersecting curves
So far we assumed that $f ( x ) \geq g ( x )$ throughout the entire interval $[ a , b ]$. In many cases, however, the interval itself is not given: the two curves determine it, and the first step is to find where they meet. To locate the intersection points, set $f ( x ) = g ( x )$ and solve for $x$. The solutions are the limits of integration.
Once the interval is known, the two curves can cross inside it, meaning that $f ( x )$ and $g ( x )$ swap their relative position at some interior point $c$. When this happens, the integrand $f ( x ) - g ( x )$ changes sign, and a single integral over $[ a , b ]$ would cause areas above and below the x-axis to cancel out, producing an incorrect result.
The correct approach is to split the interval at each crossing point and integrate separately over each subinterval, always subtracting the lower curve from the upper one:
\[A = \int_{a}^{c} [ f ( x ) - g ( x ) ] d x + \int_{c}^{b} [ g ( x ) - f ( x ) ] d x\]A compact way to write this without tracking which curve is on top is:
\[A = \int_{a}^{b} | f ( x ) - g ( x ) | d x\]
The absolute value guarantees that each piece of area is counted as positive, regardless of which function is larger on that subinterval.
The formula $A = \int_{a}^{b} | f ( x ) - g ( x ) | d x$ is valid provided that all intersection points of the two curves are included among the limits of integration. The absolute value ensures that the difference between the two functions is always taken as positive, so that no portion of the enclosed region cancels out when the curves swap their relative position.
Example 1
Suppose we want to find the area enclosed between the curves $y_{1} = e^{x}$ and $y_{2} = x^{2} - 1$ over the interval $x \in [ - 1 , 1 ]$. Graphically, we have the following situation:

To calculate the area, we use equation $( 1 )$ and set up the following definite integral:
\[A = \int_{- 1}^{1} [ e^{x} - ( x^{2} - 1 ) ] d x\]Solving the integral, we obtain:
\[A & = \int_{- 1}^{1} [ e^{x} - x^{2} + 1 ] d x \\ & = ([ e^{x} - \frac{x^{3}}{3} + x ])_{- 1}^{1} \\ & = ( e - \frac{1}{3} + 1 ) - ( e^{- 1} + \frac{1}{3} - 1 ) \\ & = e - \frac{1}{e} + \frac{4}{3}\]Therefore, the area between the two curves is:
\[A = e - \frac{1}{e} + \frac{4}{3}\]Example 2
Find the area of the region enclosed between the curves $f ( x ) = x^{3} - 3 x$ and $g ( x ) = x$. The interval is not given. We start by finding where the two curves intersect, setting $f ( x ) = g ( x )$:
\[x^{3} - 3 x & = x \\ x^{3} - 4 x & = 0 \\ x ( x^{2} - 4 ) & = 0\]The solutions are $x = - 2$, $x = 0$, and $x = 2$. These are the limits of integration.
Since the curves cross at $x = 0$, we check which function is on top in each subinterval. Evaluating at $x = - 1$ we obtain:
\[f ( - 1 ) & = ( - 1 )^{3} - 3 ( - 1 ) = 2 \\ g ( - 1 ) & = - 1\]So $f ( x ) \geq g ( x )$ on $[ - 2 , 0 ]$. By symmetry, $g ( x ) \geq f ( x )$ on $[ 0 , 2 ]$.
We now split the integral accordingly:
\[A = \int_{- 2}^{0} [ f ( x ) - g ( x ) ] d x + \int_{0}^{2} [ g ( x ) - f ( x ) ] d x\] \[A = \int_{- 2}^{0} ( x^{3} - 4 x ) d x + \int_{0}^{2} ( 4 x - x^{3} ) d x\]Computing the first integral, we have:
\[\int_{- 2}^{0} ( x^{3} - 4 x ) d x & = ([ \frac{x^{4}}{4} - 2 x^{2} ])_{- 2}^{0} \\ & = ( 0 ) - ( \frac{16}{4} - 2 \cdot 4 ) \\ & = 0 - ( 4 - 8 ) \\ & = 4\]Computing the second integral, we obtain:
\[\int_{0}^{2} ( 4 x - x^{3} ) d x & = ([ 2 x^{2} - \frac{x^{4}}{4} ])_{0}^{2} \\ & = ( 2 \cdot 4 - \frac{16}{4} ) - 0 \\ & = 8 - 4 \\ & = 4\]The total area is:
\[A = 4 + 4 = 8\]The symmetry of the result is not a coincidence: $f ( x ) = x^{3} - 3 x$ is an odd function, and the two regions are mirror images of each other across the origin.
Selected references
- New York University, S.R.S. Varadhan. Area Between Curves
- University of Washington, A. Nichifor. Areas Between Curves: Applications of Integration
- University of Washington. Area Between Curves
- UC Davis, D. Kouba. Areas of Enclosed Regions
- Columbia University, A. Vizeff. Applications of Integration