Area Under a Curve

A textbook-style lesson on definite integrals, signed area, total area, and the absolute value method.

IB MathematicsAA SL/HLAI SL note includedWorked examplesRadford Mathematics

On this page

  1. The central idea
  2. What the definite integral is adding
  3. When the curve stays above the x-axis
  4. Signed area and cancellation
  5. Total area using absolute value
  6. Step-by-step method
  7. Worked examples
  8. Summary
  9. Video
  10. Practice

Integration pathway

This page sits between the basic idea of a definite integral and later area applications.

1. The central idea

The phrase area under a curve is used a lot in calculus, but it needs to be interpreted carefully. A definite integral gives a signed area: area above the x-axis counts positively, while area below the x-axis counts negatively.

Above the x-axis

If \(f(x)\geq0\) on \([a,b]\), then the definite integral is exactly the geometric area between the graph and the x-axis.

\[A=\int_a^b f(x)\,dx\]

Below the x-axis

If \(f(x)\leq0\), then the definite integral is negative. The geometric area is the negative of that integral.

\[A=-\int_a^b f(x)\,dx\]

Crossing the x-axis

If the curve crosses the x-axis, the negative part can cancel the positive part in the signed integral.

\[\int_a^b f(x)\,dx=A_+-A_-\]

IB AI SL note: in AI SL questions on area under a curve, the curve is usually non-negative on the interval being considered. In that case, students can normally interpret the definite integral directly as area. The extra care below is needed when the graph passes below the x-axis, which is more common in AA and in fuller calculus treatments.

2. What the definite integral is adding

The integral symbol \(\int\) can be thought of as an elongated letter “S”, standing for a sum. In the expression \(\int_a^b f(x)\,dx\), we are adding up many tiny strips from \(x=a\) to \(x=b\).

\(f(x)\)

The height of the curve at the current value of \(x\).

\(dx\)

An extremely small width along the x-axis.

\(f(x)\,dx\)

The approximate area of one very thin rectangle.

x y a b dx height f(x) The integral adds strips height × width ≈ f(x)dx as the width tends to 0 sum from a to b y=f(x)

The rectangles are deliberately drawn with visible width. In the limit, their widths become infinitesimally small and the sum becomes a definite integral.

\[\int_a^b f(x)\,dx=\lim_{\Delta x\to 0}\sum f(x)\Delta x\]

3. When the curve stays above the x-axis

When \(f(x)\geq0\), there is no sign issue. The definite integral accumulates positive area only.

y x 1 2 3 0 1 2 3 4 If f(x) ≥ 0, the integral is geometric area y=f(x) a b area = integral

If the entire region is above the x-axis, the definite integral equals the area enclosed by the curve, the x-axis, \(x=a\), and \(x=b\).

\[f(x)\geq0\quad\mathrm{on}\quad [a,b]\quad\Rightarrow\quad A=\int_a^b f(x)\,dx\]

4. Signed area and cancellation

The issue begins when part of the graph is below the x-axis. The definite integral still has a clear meaning, but it is now signed area, not total geometric area.

y x -3 -2 -1 1 2 3 0 -4 -2 2 4 positive negative positive y=x²−4 −2 2

The blue regions contribute positively. The red region is below the x-axis and contributes negatively to the signed integral.

Key warning: a signed integral can be zero even when there is visible area. This happens when positive and negative contributions cancel.

5. Total area using absolute value

If the question asks for the total area enclosed by the graph and the x-axis, then all regions must be counted positively. One clean way to show this is to graph \(y=|f(x)|\). The original function is shown dashed, and the absolute value graph is shown as a solid curve.

yx-3-2-10123-4-2246-22reflected partdashed: original y=x²−4solid: y=|x²−4|

The dashed curve is the original function, shown in full so students can compare it directly with the solid graph \(y=|f(x)|\). The solid curve reflects the negative part upward.

\[A_{\mathrm{total}}=\int_a^b |f(x)|\,dx\]
\[|f(x)|=\begin{cases} -f(x), & f(x)<0\\ f(x), & f(x)\geq0 \end{cases}\]

This is equivalent to splitting the interval at the roots and changing the sign of any part below the x-axis.

6. Step-by-step method for total area

  1. Sketch or analyse the function on the interval.
  2. Find the roots of \(f(x)\) inside the interval.
  3. Use the roots to split the interval into sub-intervals.
  4. Decide whether \(f(x)\) is positive or negative on each sub-interval.
  5. Integrate each region as a positive area.

Shortcut once the picture is understood: write the total area as \(\int_a^b |f(x)|\,dx\). The sketch explains why the absolute value is needed.

7. Worked examples

Worked example 1: a curve that crosses the x-axis

Find the total area between \(y=x^2-4\) and the x-axis from \(x=-3\) to \(x=3\).

y x x = −2 x = 2 (0, −4) positive area negative area positive area y = x² − 4 Crosses the x-axis at x = −2 and x = 2 So the middle region is below the axis and counts negatively in the signed integral.

This annotated graph makes the sign issue clear: the curve crosses the x-axis at \(x=-2\) and \(x=2\), so the middle region lies below the axis and would count as negative area in the signed integral.

Why absolute value is needed: if we used \(\int_{-3}^{3}(x^2-4)\,dx\) directly, the negative middle region would cancel part of the positive area on the left and right.

Because the question asks for total area, we must make every contribution positive. That is why we use \(\int_{-3}^{3}|x^2-4|\,dx\).

Because the question asks for total area, we begin with an absolute value integral:

\[A=\int_{-3}^{3}|x^2-4|\,dx\]

First find where the graph meets the x-axis:

\[x^2-4=0\quad\Rightarrow\quad x=-2,\;2.\]

These two roots split the interval into three parts. Now decide the sign of \(x^2-4\) on each interval:

  • on \([-3,-2]\), \(x^2-4\geq0\), so area here is positive
  • on \([-2,2]\), \(x^2-4<0\), so this region lies below the x-axis and would be negative in the signed integral
  • on \([2,3]\), \(x^2-4\geq0\), so area here is positive

So the absolute value function can be written explicitly as

\[ |x^2-4|= \begin{cases} x^2-4, & -3\leq x\leq -2\\ 4-x^2, & -2\leq x\leq 2\\ x^2-4, & 2\leq x\leq 3 \end{cases} \]

Therefore we split the total area into three positive parts:

\[ A=\int_{-3}^{-2}(x^2-4)\,dx+\int_{-2}^{2}(4-x^2)\,dx+\int_{2}^{3}(x^2-4)\,dx \]

Now evaluate each integral carefully.

\[ \int_{-3}^{-2}(x^2-4)\,dx =\left[\frac{x^3}{3}-4x\right]_{-3}^{-2} =\left(-\frac{8}{3}+8\right)-\left(-9+12\right) =\frac{16}{3}-3 =\frac{7}{3} \]
\[ \int_{-2}^{2}(4-x^2)\,dx =\left[4x-\frac{x^3}{3}\right]_{-2}^{2} =\left(8-\frac{8}{3}\right)-\left(-8+\frac{8}{3}\right) =\frac{16}{3}+\frac{16}{3} =\frac{32}{3} \]
\[ \int_{2}^{3}(x^2-4)\,dx =\left[\frac{x^3}{3}-4x\right]_{2}^{3} =\left(9-12\right)-\left(\frac{8}{3}-8\right) =-3+\frac{16}{3} =\frac{7}{3} \]

Finally, add the three positive areas:

\[ A=\frac{7}{3}+\frac{32}{3}+\frac{7}{3} =\frac{46}{3} \]

Worked example 2: a curve entirely below the x-axis

Find the area between \(y=-x^2-1\) and the x-axis from \(x=0\) to \(x=2\).

yx(0, −1)(2, −5)y = −x² − 1The curve stays entirely below the x-axisSo the whole signed integral is negative on 0 ≤ x ≤ 2.012-1-3-5

A quick sketch first: on the whole interval from \(x=0\) to \(x=2\), the graph is below the x-axis, so the signed integral is negative and we need absolute value for total area.

Graph observation: this curve does not cross the x-axis on the interval \(0\leq x\leq2\). It stays below the axis throughout, so the whole signed integral would be negative.

That is why we replace \(f(x)\) by \(|f(x)|\) when calculating the total area.

The graph lies completely below the x-axis, so its definite integral would be negative. Since the question asks for area, we use absolute value:

\[A=\int_0^2 |-x^2-1|\,dx\]

For every \(x\) in \([0,2]\), we have \(-x^2-1<0\). Therefore

\[ |-x^2-1|= \begin{cases} x^2+1, & 0\leq x\leq 2 \end{cases} \]

So the area becomes

\[ A=\int_0^2 (x^2+1)\,dx \]

Now integrate and substitute the limits:

\[ A=\left[\frac{x^3}{3}+x\right]_0^2 =\left(\frac{8}{3}+2\right)-0 =\frac{8}{3}+\frac{6}{3} =\frac{14}{3} \]
y x 1 2 0 -5 -4 -3 -2 -1 1 2 3 4 5 solid: y=|−x²−1| dashed: y=−x²−1 (0,1) (2,5)

The dashed graph is the original curve below the axis. The solid graph is the absolute value curve used to measure positive area.

Worked example 3: cancellation over a full sine wave

Find the total area between \(y=\sin x\) and the x-axis from \(x=0\) to \(x=2\pi\).

First look at the ordinary sine graph. From \(x=0\) to \(x=\pi\), the curve is above the x-axis, so that part contributes positively. From \(x=\pi\) to \(x=2\pi\), the curve is below the x-axis, so that part contributes negatively to the signed integral.

\[ \int_0^{2\pi}\sin x\,dx =\left[-\cos x\right]_0^{2\pi} =-\cos(2\pi)-\left(-\cos 0\right) =-1+1 =0 \]
x y positive negative 0 π 1 -1 y=sin x

The ordinary sine graph: the blue region is positive and the red region is negative, so they cancel in the signed integral.

However, the question asks for total area, not signed area. Because the graph crosses the x-axis at \(x=0\), \(x=\pi\), and \(x=2\pi\), part of the region lies below the axis. So we must turn that negative part into a positive contribution.

Since \(\sin x\geq0\) on \([0,\pi]\) and \(\sin x<0\) on \([\pi,2\pi]\), we can write

\[ |\sin x|= \begin{cases} \sin x, & 0\leq x\leq \pi\\ -\sin x, & \pi\leq x\leq 2\pi \end{cases} \]

Therefore

\[ A=\int_0^{2\pi}|\sin x|\,dx =\int_0^\pi \sin x\,dx+\int_\pi^{2\pi}(-\sin x)\,dx \]

Now evaluate each part:

\[ \int_0^\pi \sin x\,dx =\left[-\cos x\right]_0^\pi =-\cos \pi-\left(-\cos 0\right) =1+1 =2 \]
\[ \int_\pi^{2\pi}(-\sin x)\,dx =\left[\cos x\right]_\pi^{2\pi} =\cos(2\pi)-\cos(\pi) =1-(-1) =2 \]

So the total area is

\[ A=2+2=4 \]
y x 1 2 3 4 5 6 0 -1 1 solid: y=|sin x| dashed: y=sin x 0 π

The dashed curve is \(y=\sin x\). The solid curve is \(y=|\sin x|\), so both half-waves contribute positive area.

8. Summary of the two approaches

Signed integral

Use this when the question asks for the value of a definite integral.

\[\int_a^b f(x)\,dx=A_+-A_-\]

Total area

Use this when the question asks for area enclosed by the curve and the x-axis.

\[A_{\mathrm{total}}=\int_a^b |f(x)|\,dx\]

Common mistake: do not assume \(\int_a^b f(x)\,dx\) is the total area if the graph goes below the x-axis. Negative area can cancel positive area.

9. Related Radford Mathematics video

This tutorial explains the area enclosed by a curve and the x-axis between \(x=a\) and \(x=b\), including why absolute value is needed when the graph goes below the x-axis.

Area enclosed by a curve and the x-axis

10. Practice with solutions

  1. Find the area between \(y=x^2+1\), the x-axis, \(x=0\), and \(x=2\).
    Show solution

    The curve is above the x-axis, so the area is the definite integral.

    \[A=\int_0^2(x^2+1)\,dx=\left[\frac{x^3}{3}+x\right]_0^2=\frac{14}{3}\]
  2. Find the total area between \(y=x^2-1\) and the x-axis from \(x=-2\) to \(x=2\).
    Show solution

    The roots are \(-1\) and \(1\). Split at these roots.

    \[A=\int_{-2}^{-1}(x^2-1)\,dx+\int_{-1}^{1}(1-x^2)\,dx+\int_{1}^{2}(x^2-1)\,dx=4\]
  3. Why is \(\int_{-2}^{2}(x^2-4)\,dx\) not the total area?
    Show solution

    Because \(x^2-4\) is below the x-axis between \(-2\) and \(2\), so the definite integral includes a negative contribution. Total area requires \(\int_{-2}^{2}|x^2-4|\,dx\), or splitting the interval.

  4. Find the total area between \(y=-2x\) and the x-axis from \(x=0\) to \(x=3\).
    Show solution

    The function is below the x-axis, so use \(|-2x|=2x\).

    \[A=\int_0^3 2x\,dx=9\]
  5. Find the total area between \(y=\cos x\) and the x-axis from \(x=0\) to \(x=\pi\).
    Show solution

    The function changes sign at \(x=\frac{\pi}{2}\).

    \[A=\int_0^{\pi/2}\cos x\,dx+\int_{\pi/2}^{\pi}(-\cos x)\,dx=1+1=2\]