(IC2) Area Under the Graph#

By the end of the lesson you will be able to:

  • Use definite integrals and geometric formulas to calculate the net area between a curve and the \(x\)-axis.

  • Use definite integrals and geometric formulas to calculate the total area between a curve and the \(x\)-axis.

Lecture Videos#


Region Under a Graph#

The phrase area under the curve refers to the area of the region which is:

  • bounded above by the graph of \(y=f(x)\).

  • bounded below by the \(x\)-axis.

  • bounded on the left by the vertical line \(x=a\).

  • bounded on the right by the vertical line \(x=b\)

Graph of a positive function

For this interpretation, we need function \(f\) to be:

  • continuous on the closed interval \([a,b]\)

  • nonnegative on the closed interval \([a,b]\)

Calculate Area

Let \(f\) be a continuous, nonnegative function on the interval \([a,b]\). The area under the graph of \(f\) from \(a\) to \(b\) is given by:

\[ \text{Area } = \int_a^b f(x)\; dx \]

Note that this formula only applies if \(f\) is nonnegative (graph never goes below the \(x\)-axis).


Example 1#

Compute the area under the given curve

\[ f(x)=\dfrac{3}{x}+e^x \qquad \text{from } x=1 \text{ to } x=2 \]

Click through the tabs to see the solution.

Give this a try for yourself first!

Graph of a piecewise function

We note that this function is continuous and nonnegative on the closed interval \([1,2]\). Even though the function has a discontinuity at \(x=0\), this is okay since that location is not inside the interval.

Since the function satisfies both necessary conditions, we can set up our area calculation:

\[ \text{Area } = \int_1^2 \left( \dfrac{3}{x}+e^x \right)\; dx \]

Calculating the area of this region, then becomes a problem of calculating the definite integral:

\[\begin{split} \begin{aligned} \text{Area } & = \int_1^2 \left( \dfrac{3}{x}+e^x \right)\; dx\\ & \\ & = \left( \ln |x| +e^x \right) \bigg|_{x=1}^{x=2}\\ & \\ & = \left( \ln |2| +e^2 \right) - \left( \ln |1| +e^1 \right) \\ & \\ & = \ln 2 +e^2 - e\\ \end{aligned} \end{split}\]

Example 2#

Find the area under the graph of \(f\) from \(a\) to \(b\) where

\[\begin{split} f(x) = \begin{cases} x \quad \text{if} \; x\leq 2 \\ 2 \quad \text{if} \; x>2\\ \end{cases} \qquad \text{and} \quad a=0 \quad b=4 \end{split}\]

Click through the tabs to see the solution.

Give this a try for yourself first!

Graph of a piecewise function

We note that this function is continuous and nonnegative on the closed interval \([0,4]\). Even though the function is negative for \(x<0\), this is okay since those locations are not inside the interval.

Since the function satisfies both necessary conditions, we can set up our area calculation:

\[ \text{Area } = \int_0^4 f(x) \; dx \]

The main difficulty with integrating a piecewise function (like we have) is that the function behaves differently over different sections of the \(x\)-axis.

For this problem, we see that the function splits at \(x=2\):

  • Over the interval \(x\leq 2\), our function is \(f(x)=x\)

  • Over the interval \(x>2\), it is \(f(x)=2\)

So how do we use apparently two different formulas in our integration?

We split up the integral! Since the different pieces of our function split at \(x=2\), we split up the integration there as well.

\[ \text{Area } = \int_0^4 f(x) \; dx = \int_0^2 f(x) \; dx + \int_2^4 f(x) \; dx \]

For the first integral, we are looking at the interval from \(0\) to \(2\), which satisfies: \(x\leq 2\). This means we are going to use the \(f(x)=x\) piece for this integral.

For the second integral, we have the interval from \(2\) to \(4\), which satisfies \(x\geq 2\). This means we are going to use the \(f(x)=2\) piece for this integral. (Note that since \(f\) is continuous, we don’t have an issue here with the equal sign.)

This gives us:

\[ \text{Area } = \int_0^4 f(x) \; dx = \int_0^2 x \; dx + \int_2^4 2 \; dx \]

Now we just need to calculate each of these definite integrals individually.

\[\begin{split} \begin{aligned} \text{Area } & = \int_0^4 f(x) \; dx \\ & \\ & = \int_0^2 x \; dx \quad + \quad \int_2^4 2 \; dx \\ & \\ & = \big( \tfrac{1}{2} x^2 \big) \bigg|_{x=0}^{x=2} \quad + \quad \big( 2x \big) \bigg|_{x=2}^{x=4}\\ & \\ & = \big( \tfrac{1}{2} 2^2 - \tfrac{1}{2} 0^2 \big) \quad + \quad \big( 2(4)-2(2) \big) \\ & \\ & = 6\\ \end{aligned} \end{split}\]

Notice that you could also use a little Geometry to calculate this area instead:

Graph of a piecewise function

Area of Triangle

From \(0\) to \(2\), our region is a right triangle, which we can calculate the area for using:

\[\begin{split} \begin{aligned} \text{Area of Triangle } & = \tfrac{1}{2} (\text{base})\cdot (\text{height})\\ & = \tfrac{1}{2} (2)\cdot (2)\\ & = 2\\ \end{aligned} \end{split}\]

Area of Rectangle

From \(2\) to \(4\), our region is a rectangle (actually a square), which we can calculate the area for using:

\[\begin{split} \begin{aligned} \text{Area of Rectangle } & = (\text{length})\cdot (\text{width})\\ & = (2)\cdot (2)\\ & = 4 \\ \end{aligned} \end{split}\]

Put it together

And then putting these two areas together we get:

\[ \text{Area Triangle} + \text{Area Rectangle} = 2+ 4 =6 \]

Area and the Definite Integral#

Graph of a positive function

In this graph we see that the region is on or above the \(x\)-axis.

In this case the definite integral represents the area of the shaded region (as we’ve already discussed):

\[ \int_a^b f(x)\; dx = \text{ Area} \]
Graph of a negative function

In this graph we see that the region is on or below the \(x\)-axis.

In this case the definite integral represents the negative of the area of the shaded region:

\[ \int_a^b f(x)\; dx = -\text{Area} \]
Graph of an arbitrary function

In this graph we see that the region is partially above and partially below the \(x\)-axis.

In this case the definite integral represents the area of the section that lies above the \(x\)-axis minus the area of the section that is below:

\[ \int_a^b f(x)\; dx = \left(\text{Area} \atop \text{Above}\right) - \left(\text{Area} \atop \text{Below}\right) \]

Net Area#

As these graphs illustrate, we now have a way to interpret the definite integral of continuous functions, without the nonnegativity condition. We call this net area.

Net Area

Let \(f\) be a continuous function on the interval \([a,b]\).

\[ \text{Net Area } = \int_a^b f(x)\; dx = \left(\text{Area} \atop \text{Above}\right) - \left(\text{Area} \atop \text{Below}\right) \]

The Net Area gives us a way to measure how much of our region sits above the \(x\)-axis compared to how much is below:

  • Positive: If the region above has a larger area than the region below, then the definite integral will be positive.

  • Negative: If the region above has a smaller area than the region below, then the definite integral will be negative.

  • Zero: If the region above and the region below are perfectly balanced (have the same area), then the definite integral will be \(0\).

Total Area#

While the net area over an interval can be helpful, sometimes we are also interested in finding the total area of the region between a curve and the \(x\)-axis. What is the difference between these two values?

Graph of an arbitrary function
  • Net Area is a comparison, there’s a direction component to the value. It represents how much of the region sits above the \(x\)-axis compared to how much is below.

\[ \text{Net Area } = \int_a^b f(x)\; dx = \left(\text{Area} \atop \text{Above}\right) - \left(\text{Area} \atop \text{Below}\right) \]
  • Total Area represents the area of the shaded region, without accounting for whether a specific region is above or below the \(x\)-axis. We’re just finding the area of the shaded region. Essentially, we’ve removed the direction component.

\[ \text{Total Area } = \int_a^b \big|f(x)\big|\; dx = \left(\text{Area} \atop \text{Above}\right) + \left(\text{Area} \atop \text{Below}\right) \]

Since the total area is the area of the geometric region, it can only be positive (or possibly \(0\) if the region has zero width).

As we’ve seen though, net area can be positive (if a majority of the region is above), negative (majority of the region is below), or zero (if the regions above and below are completely balanced).


Example 3#

Consider the function \(f(x)=x^2-x\) on the interval \([0,2]\).

  1. Find the total area of the region between the curve and the \(x\)-axis on this interval.

  2. Find the net area on this interval.

Click through the tabs to see the solution.

Give this a try for yourself first!

Graph of a piecewise function

Total Area Strategy: Since the integral formula for total area involves absolute value (which is a piecewise function), we are going to need to split up the integration based on where the function is positive and negative.

  1. Find the \(x\)-values where \(f\) intersects the \(x\)-axis.

  2. Determine the intervals where \(f\) is above / below the \(x\)-axis.

  3. Calculate the area over each interval.

  4. Add the results

Essentially, we are going to do calculations to find the area of the region that sits above the \(x\)-axis and then separately, the area of the region that sits below. Once we have the area of each distinct region we add the results together to get the total area.

To find the distinct regions, we essentially need to do a sign chart for \(f\).

  1. Determine where \(f(x)=0\) (where the graph intersects the \(x\)-axis)

  2. Find the sign of \(f\) on each of the resulting intervals. This will tell us if the region is above or below the \(x\)-axis on that subinterval.

Intersection Points

We start by setting \(f(x)=0\) and solving for \(x\).

\[\begin{split} f(x) = 0 & \xrightarrow{\text{set up}} x^2-x=0 \\ & \\ & \xrightarrow{\text{factor}} x(x-1)=0 \\ & \\ & \xrightarrow{\text{set each factor} =0} x =0 \quad \text{or}\quad (x-1)=0\\ & \\ & \xrightarrow{\text{solve for } x} x=0 \quad \text{or}\quad x=1\\ \end{split}\]

Sign Chart

These \(x\)-values we just found, \(x=0\) and \(x=1\), split up the interval \([0,2]\) into separate subintervals: \((0,1)\) and \((1,2]\).

We use these intervals to help create the sign chart for \(f\). In the first column we put the factors of \(f\) and in the first row we list the intervals and then we fill in the sign chart accordingly:

\[\begin{split} \begin{array}{ccc} & (0,1)& (1,2] \\ \hline x & + & + \\ \hline (x-1) & - & + \\ \hline f & - & + \\ \hline \text{Region} & \text{Below} & \text{Above} \\ \hline \end{array} \end{split}\]

Note that we could also come to this conclusion by looking at the graph of the function (but using a sign chart is helpful if we don’t have the graph).

  • On the interval \((0,1)\) the graph is below the \(x\)-axis.

  • On the interval \((1,2]\) the graph is above the \(x\)-axis.

Graph of a piecewise function

To find the area of the region that sits above the \(x\)-axis, we simply integrate the function over the interval \([1,2]\) (since it is nonnegative on this interval).

\[\begin{split} \begin{aligned} \text{Area} \atop \text{Above} & = \int_1^2 \big( x^2 - x \big )\; dx \\ & \\ & = \big(\tfrac{1}{3}x^3 -\tfrac{1}{2}x^2\big) \bigg|_{x=1}^{x=2} \\ & \\ & = \big(\tfrac{1}{3}2^3 -\tfrac{1}{2}2^2\big) - \big(\tfrac{1}{3}1^3 -\tfrac{1}{2}1^2\big) \\ & \\ & = \dfrac{8}{3} -2 - \dfrac{1}{3} +\dfrac{1}{2} \\ & \\ & = \dfrac{5}{6} \\ \end{aligned} \end{split}\]

To find the area of the region that sits below the \(x\)-axis, we are going to integrate the function over the interval \([0,1]\). But since the graph is below the \(x\)-axis here, we will need to negate our result in order to get the area.

\[\begin{split} \begin{aligned} \int_0^1 \big( x^2 - x \big )\; dx & = \big(\tfrac{1}{3}x^3 -\tfrac{1}{2}x^2\big) \bigg|_{x=0}^{x=1} \\ & \\ & = \big(\tfrac{1}{3}1^3 -\tfrac{1}{2}1^2\big) - \big(\tfrac{1}{3}0^3 -\tfrac{1}{2}0^2\big) \\ & \\ & = \dfrac{1}{3} -\dfrac{1}{2} \\ & \\ & = -\dfrac{1}{6} \\ \end{aligned} \end{split}\]

Notice that since the function is negative on the interval \([0,1]\), when we calculate the definite integral over this interval we are getting a negative result.

In this case the negative can be thought of as a direction: it’s telling us that the region is indeed below the \(x\)-axis. So to then get the area for this region we just use the magnitude (or negation of the integral):

\[ \left(\text{Area} \atop \text{Below}\right) = - \int_0^1 \big( x^2 - x \big )\; dx = - \left(-\dfrac{1}{6} \right) = \dfrac{1}{6} \]

To find the total area then, we use:

\[\begin{split} \begin{aligned} \text{Total Area } & = \int_0^2 \big|f(x)\big|\; dx \\ & \\ & = \left(\text{Area} \atop \text{Above}\right) + \left(\text{Area} \atop \text{Below}\right)\\ & \\ & = \left(\dfrac{5}{6}\right) + \left(\dfrac{1}{6}\right)\\ & \\ & = 1 \end{aligned} \end{split}\]

Since we’ve already found the area of each individual region, we can then find the net area using:

\[\begin{split} \begin{aligned} \text{Net Area } & = \int_0^2 f(x)\; dx \\ & \\ & = \left(\text{Area} \atop \text{Above}\right) - \left(\text{Area} \atop \text{Below}\right)\\ & \\ & = \left(\dfrac{5}{6}\right) - \left(\dfrac{1}{6}\right)\\ & \\ & = \dfrac{2}{3} \end{aligned} \end{split}\]

Note that you could check this directly by just calculating the definite integral over the entire interval \([0,2]\).

\[\begin{split} \begin{aligned} \text{Net Area} & = \int_0^2 \big( x^2 - x \big )\; dx \\ & \\ & = \big(\tfrac{1}{3}x^3 -\tfrac{1}{2}x^2\big) \bigg|_{x=0}^{x=2} \\ & \\ & = \big(\tfrac{1}{3}2^3 -\tfrac{1}{2}2^2\big) - \big(\tfrac{1}{3}0^3 -\tfrac{1}{2}0^2\big) \\ & \\ & = \dfrac{8}{3} -2 \\ & \\ & = \dfrac{2}{3} \\ \end{aligned} \end{split}\]

Example 4#

Evaluate the following integrals by interpreting each in terms of area:

  1. \(\displaystyle \int_0^2 \sqrt{4-x^2} \; dx\)

  2. \(\displaystyle \int_0^3 \big(x-1\big) \; dx\)

Graph of a circular region
Graph of a linear function

Properties of Definite Integrals#

For a continuous function \(f\) on closed interval \([a,b]\) we had previously looked at two properties of the definite integral that are probably best interpreted in terms of area:

Zero Width

\[ \int_a^a f(x)\; dx =0 \]

Splitting the Integral

\[ \int_a^m f(x)\; dx \quad + \int_m^b f(x)\; dx = \int_a^b f(x)\; dx \]

Symmetric Functions#

Odd / Even Functions

Suppose \(f\) is continuous on the interval \([-a,a]\).

Even Functions If \(f\) is even (\(f(-x)=f(x)\) for all \(x\)) then:

\[ \int_{-a}^a f(x)\; dx = 2\int_0^a f(x)\; dx \]

Odd Functions If \(f\) is odd (\(f(-x)=-f(x)\) for all \(x\)) then:

\[ \int_{-a}^a f(x)\; dx = 0 \]
Even Function

This graph is an example of an even function. Notice the symmetry. It looks as if it is reflected across the \(y\)-axis.

Common examples of even functions:

  • cosine

  • power functions with an even exponent

Odd Function

This graph is an example of an odd function. Notice the symmetry. It looks as if it is reflected through the origin.

Common examples of odd functions:

  • sine

  • tangent

  • power functions with an odd exponent