Skip to main content

Area under a curve

a curve with the blue shaded area above the x axis and below the curve. It also shows orange areas below the x axis and above the curve

Integrals can be used to find the area between a curve and the \(x\)-axis. We can use this to calculate the total accumulation of a quantity in physics, economics and engineering. Use this resource to learn how to calculate area under the curve.

Finding the area under a curve

Consider a curve defined by \(y=f(x)\). We can find the area under the curve between \(x=a\) and \(x=b\) using a definite integral:
\[ \int_{a}^{b}f(x)dx \]

This is the area bordered by the lines \(x=a\), \(x=b\), \(y=0\) (the \(x\)-axis) and the graph of \(f(x)\).

A curve with the green shaded area above the x axis and below the curve.

The area under a curve might be above the axis (and therefore, positive) or below the axis (and therefore, negative).

  • If \(f(x)\geq0\) between \(x=a\) and \(x=b\), you would get a positive value for the definite integral.
    A curve with the green shaded area above the x axis and below the curve also between x=a and x=b depicting a positive area.
  • If, \(f(x)\leq0\) between \(x=a\) and \(x=b\), you would get a negative value for the definite integral.
    A curve with the green shaded area below the x axis and above the curve also between x=a and x=b depicting a negative area.

Regardless of whether the area is above or below the curve, the area under a curve is always given as a positive number.

\[ \textrm{Area }=\left|\int_{a}^{b}f(x)dx\right|\]

Where \(f(x)\) crosses the \(x\)-axis between \(a\) and \(b\), the value of the definite integral may be positive or negative. However, the area under the curve is always taken as the sum of the modulus of the signed areas.

For example, the function \(f(x)=x^{3}-x^{2}-2x\) is plotted. The graph cuts the \(x\)-axis at \(-1\), \(0\) and \(2\). The integral for \(-1\geq x\geq0\) is positive and the integral for \(0\geq x\geq2\) is negative. The overall integral from \(-1\geq x\geq2\) is \(-2.25\), but the area under the curve is positive. See Example 1 for how to work this out.

a curve with the blue shaded area above the x axis and below the curve showing the positive area being +0.42 . It also shows an orange area below the x axis and above the curve showing the negative area of the curve being -2.67

Example 1 – finding the area under the curve

Given the function \(f(x)=x^{3}-x^{2}-2x\), find the area under the curve between \(x=-1\) and \(x=2\).

To calculate the area, we need to evaluate two integrals. One from \(-1\) to \(0\) the other from \(0\) to \(2\). The actual area would then be the sum of the absolute value of these integrals. That is:
\[\begin{align*} \textrm{Area} & = \left|\int_{-1}^{0}\left(x^{3}-x^{2}-2x\right)dx\right|+\left|\int_{0}^{2}\left(x^{3}-x^{2}-2x\right)dx\right|\\
& = \left|\left[\frac{1}{4}x^{4}-\frac{1}{3}x^{3}-x^{2}\right]_{x=-1}^{x=0}\right|+\left|\left[\frac{1}{4}x^{4}-\frac{1}{3}x^{3}-x^{2}\right]_{x=0}^{x=2}\right|\\
& = \left|0-\left(\frac{1}{4}\left(-1\right)^{4}-\frac{1}{3}\left(-1\right)^{3}-\left(-1\right)^{2}\right)\right|+\left|\frac{1}{4}\left(2\right)^{4}-\frac{1}{3}\left(2\right)^{3}-2^{2}\right|\\
& = \left|-\left(\frac{1}{4}+\frac{1}{3}-1\right)\right|+\left|4-\frac{8}{3}-4\right|\\
& = \left|\frac{1}{4}+\frac{1}{3}-1\right|+\frac{8}{3}\\
& = \frac{5}{12}+\frac{8}{3}\\
& = \frac{37}{12}\textrm{ square units}
\end{align*}\]

Given the function \(f(x)=4x-x^{2}\), find the area between the graph of the function and the \(x\)-axis.

First, sketch the graph of the function. To do this, we determine where the graph of the function cuts the \(x\)-axis. This gives us the limits of integration for the definite integral.

To solve for \(x\), we can factorise the function and let \(y=0\):
\[\begin{align*} 0 & = 4x-x^{2}\\
& = x(4-x)\\
0=x\quad & \textrm{ or }\quad0=4-x\\
x=0\quad & \textrm{ or }\quad x=4
\end{align*}\]

This means that the graph cuts the \(x\)-axis at \(x=0\) and \(x=4\). \(x=0\) becomes the lower limit for the integral and \(x=4\) becomes the upper limit. The graph is:

The curve with the shaded area above the x axis and below the curve also between x=0 and x=4 depicting a positive area.

The function is above the \(x\)-axis, so the area will be positive. We do not need the absolute value sign.
\[\begin{align*} \textrm{Area} & = \int_{0}^{4}f(x)dx\\
& =\int_{0}^{4}(4x-x^{2})dx\\
& = \left[\frac{4x^{2}}{2}-\frac{x^{3}}{3}\right]_{x=0}^{x=4}\\
& = \frac{4(4)^{2}}{2}-\frac{(4)^{3}}{3}-\left(\frac{4(0)^{2}}{2}-\frac{(0)^{3}}{3}\right)\\
& =\frac{64}{2}-\frac{64}{3}\\
& =\frac{3(64)-2(64)}{6}\\
& =\frac{64}{6}\\
& =\frac{32}{3}\textrm{ square units}
\end{align*}\]

Given the function \(f(x)=x^{2}-1\), find the area bounded by the curve, the \(x\)-axis and the lines \(x=-1\) and \(x=1\).

We need to sketch the graph of the function and then consider the range of integration. Factorising the function and solving for \(x\) when \(y=0\):
\[\begin{align*} 0 & = x^{2}-1\\
& = (x+1)(x-1)\\
x+1=0\quad & \textrm{ or }x-1=0\\
x=-1\quad & \textrm{ or }x=1
\end{align*}\]

The \(x\)-axis intercepts where \(f(x)=x^{2}-1=0\) are \(x=-1\) and \(x=1\).

A curve with the blue shaded area below the x axis and above the curve which intersects at y=-1 also between x=-1 and x=+1 depicting the area required.

The area will be negative as \(f(x)\) is below the axis between the points of integration. So, we must use the modulus of the definite integral:
\[\begin{align*} \textrm{Area } & =\left|\int_{-1}^{1}(x^{2}-1)dx\right|\\
& =\left|\left[\frac{1}{3}x^{3}-x\right]_{x=-1}^{x=1}\right|\\
& =\left|\frac{1}{3}-1-\left(\frac{1}{3}(-1)^{3}-(-1)\right)\right|\\
& =\left|\frac{1}{3}-1-\left(-\frac{1}{3}+1\right)\right|\\
& =\left|-\frac{2}{3}-\frac{2}{3}\right|\\
& =\left|-\frac{4}{3}\right|\\
& =\frac{4}{3}\textrm{ square units}
\end{align*}\]

Given the function \(f(x)=x^{2}-1\), find the area bounded by the curve, the \(x\)-axis and the lines \(x=0\) and \(x=2\).

This is the same function as in Example 3. First, we graph the function.

A curve with the blue shaded area above the x axis and below the curve between x=1 and x=2 depicting one area required. Also showing the extension of the curve with a orange shaded area below the x axis and above the curve between x=0 and x=1 depicting the other area required

As the function crosses the \(x\)-axis, between \(0\) and \(2\), we will have to evaluate two integrals. The first from \(0\) to \(1\) and the second from \(1\) to \(2\).
\[\begin{align*} \textrm{Area} & = \left|\int_{0}^{1}\left(x^{2}-1\right)dx\right|+\left|\int_{1}^{2}\left(x^{2}-1\right)dx\right|\\
& =\left|\left[\frac{1}{3}x^{3}-x\right]_{x=0}^{x=1}\right|+\left|\left[\frac{1}{3}x^{3}-x\right]_{x=1}^{x=2}\right|\\
& = \left|\frac{1}{3}-1\right|+\left|\frac{8}{3}-2-\left(\frac{1}{3}-1\right)\right|\\
& = \left|-\frac{2}{3}\right|+\left|\frac{8}{3}-\frac{6}{3}-\left(-\frac{2}{3}\right)\right|\\
& = \frac{2}{3}+\frac{2}{3}+\frac{2}{3}\\
& = 2\textrm{ square units}
\end{align*}\]

Exercise – finding the area under the curve

  1. Find the area enclosed by the curve \(y=6x-x^{2}\) and the \(x\)-axis.
  2. Find the area bounded by the curve \(y=\sin(x)\), the \(x\)– axis and the line \(x=\dfrac{\pi}{2}\).
  3. Find the area bounded by the curve \(y=x^{2}-3x+2\) and the \(x\)-axis between \(x=0\) and \(x=2\).

  1. \(36\textrm{ square units}\)
  2. \(1\textrm{ square unit}\)
  3. \(1\textrm{ square unit}\)

Images on this page by RMIT, licensed under CC BY-NC 4.0


Keywords