Area Enclosed by a Curve and the x-axis

Definite integrals, total geometrical area, sign changes, and absolute value.

Topic 5 · Calculus
Learning goal Calculate the total geometrical area enclosed by a curve and the x-axis over a given interval. Decide when a definite integral is already an area and when it must be adjusted.
Syllabus link IB Mathematics AA SL/HL: SL 5.5, SL 5.11. IB Mathematics AI SL/HL: SL 5.5. IB Mathematics AI HL: AHL 5.12.
Big idea A definite integral gives signed area. Total geometrical area counts every enclosed region positively, so parts below the x-axis must be made positive.
Key formula \[ A_{\text{total}}=\int_a^b |f(x)|\,dx, \] or equivalently, split the interval at the roots and add positive areas.
IB focus. This page develops the transition from signed area to total geometrical area for curves and the x-axis. It is especially useful after a lesson on signed definite integrals and before area-between-curves questions.

1What area are we trying to find?

When a question asks for the area enclosed by a curve and the x-axis, it means the ordinary geometrical area of the shaded region. Area cannot be negative.

Vocabulary note

The phrase “area under a curve” is common, but it can be misleading. On this page we say total area or area enclosed by the curve and the x-axis when every region is counted positively.

A shaded area bounded by y equals f of x, the x-axis, x equals a and x equals b.
The shaded region is bounded by \(y=f(x)\), the x-axis, \(x=a\) and \(x=b\).

2Definite integral versus total area

A definite integral has a sign. Regions above the x-axis contribute positively; regions below the x-axis contribute negatively.

The graph of y equals x squared minus 4 with positive regions above the x-axis and a negative region below the x-axis.\(y=x^2-4\)
A signed integral adds positive regions and subtracts negative regions.
Important distinction
\[ \int_a^b f(x)\,dx=\text{signed area},\qquad \int_a^b |f(x)|\,dx=\text{total geometrical area}. \]

A signed integral can be zero even when there is visible area, because positive and negative contributions can cancel.

3Formula for the area

The formula depends on where the curve lies relative to the x-axis. The three scenarios below are treated separately in the worked examples that follow: Example 1 stays above the x-axis, Example 2 stays below the x-axis, and Example 3 crosses the x-axis. Example 4 then shows the absolute value form.

Case 1: above the axis

If \(f(x)\ge 0\) on \([a,b]\), then

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

No sign adjustment is needed.

Case 2: below the axis

If \(f(x)\le 0\) on \([a,b]\), then

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

The signed integral is negative, so change its sign.

Case 3: crosses the axis

If \(f\) changes sign, split at the roots and make each piece positive.

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

For exact working, write it as a sum of positive integrals.

The formula that always works

For total geometrical area between \(y=f(x)\) and the x-axis,

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

This is the most reliable formula, and it is definitely recommended when using a graphical calculator or GDC. For exact handwritten work, it is often clearer to split the interval at the roots and write each part as a positive integral.

4Method for exact handwritten working

  1. Sketch or analyse the function on the interval.
  2. Find the x-intercepts by solving \(f(x)=0\). These are where the graph may change sign.
  3. Split the interval at any roots that lie inside the interval.
  4. Decide the sign of \(f(x)\) on each subinterval.
  5. Make every area positive: integrate \(f(x)\) where the graph is above the x-axis, and \(-f(x)\) where it is below.
  6. Add the pieces and check that the final area is positive.
Calculator/GDC form

Once the sketch is understood, a calculator can often evaluate

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

For IB AA, exact analytical splitting is often expected. For IB AI, technology is central, but students should still write the correct area expression and interpret the answer.

5Worked examples

Worked example 1: the curve stays above the x-axis

Find the area enclosed by \(y=4-x^2\), the x-axis, \(x=0\), and \(x=2\).

The graph of y equals 4 minus x squared above the x-axis from x equals 0 to x equals 2 with area shaded.\(y=4-x^2\)

Since \(4-x^2\ge 0\) on \([0,2]\), the area is the definite integral:

\[ A=\int_0^2(4-x^2)\,dx. \]

Now evaluate:

\[ A=\left[4x-\frac{x^3}{3}\right]_0^2 =\left(8-\frac{8}{3}\right)-0 =\frac{16}{3}. \]

Answer \(\frac{16}{3}\) square units.

Worked example 2: the curve stays below the x-axis

Find the area enclosed by \(y=-x^2-1\), the x-axis, \(x=0\), and \(x=2\).

The graph of y equals negative x squared minus 1 below the x-axis from x equals 0 to x equals 2, with the enclosed area shaded and annotated: area is negative, needs to be made positive.

The curve is entirely below the x-axis, so the signed area would be negative. The total area is therefore found by considering the opposite of the definite integral \(\displaystyle \int_0^2(-x^2-1)\,dx\):

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

Therefore

\[ A=\left[\frac{x^3}{3}+x\right]_0^2 =\frac{8}{3}+2 =\frac{14}{3}. \]

Answer \(\frac{14}{3}\) square units.

Worked example 3: the curve crosses the x-axis

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

The graph of y equals x squared minus 4 from x equals negative 3 to x equals 3 split at roots negative 2 and 2.\(y=x^2-4\)

First find the roots:

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

The function is positive on \([-3,-2]\), negative on \([-2,2]\), and positive on \([2,3]\). The middle integral is a negative signed area, so the total area is found by subtracting that negative area:

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

Now evaluate each signed contribution:

\[ \int_{-3}^{-2}(x^2-4)\,dx =\left[\frac{x^3}{3}-4x\right]_{-3}^{-2}=\frac{7}{3}, \] \[ \int_{-2}^{2}(x^2-4)\,dx =\left[\frac{x^3}{3}-4x\right]_{-2}^{2}=-\frac{32}{3}. \]

Therefore subtracting the negative signed area gives

\[ -\int_{-2}^{2}(x^2-4)\,dx=-\left(-\frac{32}{3}\right)=\frac{32}{3}. \]

The final positive piece is

\[ \int_2^3(x^2-4)\,dx=\left[\frac{x^3}{3}-4x\right]_2^3=\frac{7}{3}. \]

So

\[ A=\frac{7}{3}-\left(-\frac{32}{3}\right)+\frac{7}{3}=\frac{46}{3}. \]

Answer \(\frac{46}{3}\) square units.

Worked example 4: writing the absolute value form

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

The graph of y equals x cubed minus x from negative 1 to 1, above the x-axis on the left and below on the right.

A calculator-friendly expression is

\[ A=\int_{-1}^{1}|x^3-x|\,dx. \]

For exact handwritten work, split at the roots:

\[ x^3-x=x(x-1)(x+1)=0\quad\Rightarrow\quad x=-1,0,1. \]

On \([-1,0]\), \(x^3-x\ge0\). On \([0,1]\), \(x^3-x\le0\).

The absolute value of a function keeps positive values as they are, but if \(f(x)\) is negative, then \(|f(x)|\) turns \(f(x)\) into its opposite, \(-f(x)\). In this example, on \([0,1]\),

\[ |x^3-x|=-(x^3-x)=x-x^3. \]

Hence

\[ A=\int_{-1}^{0}(x^3-x)\,dx-\int_0^1(x^3-x)\,dx. \]

The second part can be seen as subtracting the negative signed area:

\[ -\int_0^1(x^3-x)\,dx =-\left[\frac{x^4}{4}-\frac{x^2}{2}\right]_0^1 =\left[\frac{x^2}{2}-\frac{x^4}{4}\right]_0^1. \]

So

\[ A=\left[\frac{x^4}{4}-\frac{x^2}{2}\right]_{-1}^{0} +\left[\frac{x^2}{2}-\frac{x^4}{4}\right]_0^1 =\frac14+\frac14=\frac12. \]

Answer \(\frac12\) square unit.

6Why the absolute value method works

The graph of \(y=|f(x)|\) keeps the parts of \(y=f(x)\) above the x-axis and reflects the parts below the x-axis upward.

This turns signed area into total geometrical area.

Calculator-friendly setup
\[A_{\text{total}}=\int_a^b |f(x)|\,dx.\]
The graph of y equals the absolute value of x squared minus 4, showing the negative part reflected upward.\(y=|x^2-4|\)\(\text{dashed: }y=x^2-4\)
The negative part of \(y=x^2-4\) is reflected upward in \(y=|x^2-4|\).

7Common mistakes and quick decision checklist

MistakeFix
Using \(\int_a^b f(x)\,dx\) automatically as area.First check whether the graph goes below the x-axis. If it does, use absolute value or split at the roots.
Forgetting roots inside the interval.Solve \(f(x)=0\), then keep only the roots that lie between \(a\) and \(b\).
Changing sign at every root without checking.Use a sign table or test point on each interval. Some roots do not cause a sign change.
Giving a negative final answer for an area.Total area must be positive. A negative answer means you have calculated signed area instead.
Rounding too early.Keep exact values until the end, especially in AA-style questions.
Am I being asked for a definite integral or for total area?
What is the interval?
Where does the curve meet the x-axis?
On which intervals is the function positive or negative?
Should I use \(f(x)\), \(-f(x)\), or \(|f(x)|\)?
Does my final answer make sense from the diagram?

9Practice

Try these without looking at the answers first. Draw a quick sketch before setting up each integral.

Part A: core total-area practice

  1. Find the area enclosed by \(y=x^2+1\), the x-axis, \(x=0\), and \(x=2\).
  2. Find the area enclosed by \(y=-2x\), the x-axis, \(x=0\), and \(x=3\).
  3. Find the total area between \(y=x^2-1\) and the x-axis from \(x=-2\) to \(x=2\).
  4. Find the total area between \(y=6-3x\) and the x-axis from \(x=0\) to \(x=3\).
  5. Find the total area between \(y=x^2-4x+3\) and the x-axis from \(x=0\) to \(x=4\).

Part B: reasoning and setup

  1. Explain why \(\int_{-2}^{2}(x^2-4)\,dx\) is not the total area enclosed by \(y=x^2-4\) and the x-axis on \([-2,2]\).
  2. Write, but do not evaluate, a correct integral expression for the total area between \(y=x^3-4x\) and the x-axis from \(x=-3\) to \(x=3\).
  3. The graph of \(y=f(x)\) lies below the x-axis on \([1,4]\). Write an expression for the total area enclosed by the curve and the x-axis on this interval.

Part C: extension for AA and AI HL

  1. Find the total area between \(y=x^3-x\) and the x-axis from \(x=-2\) to \(x=2\).
  2. Find the total area between \(y=\cos x\) and the x-axis from \(x=0\) to \(x=\pi\).
  3. A particle has velocity \(v(t)=t^2-4t+3\), where \(0\le t\le4\). Write an integral expression for the total distance travelled. Then evaluate it. This is a useful connection to total area and absolute value.
Answer key

Part A

  1. The curve is above the axis: \[A=\int_0^2(x^2+1)\,dx=\left[\frac{x^3}{3}+x\right]_0^2=\frac{14}{3}.\]
  2. The curve is below the axis on \([0,3]\), so use \(-(-2x)=2x\): \[A=\int_0^3 2x\,dx=[x^2]_0^3=9.\]
  3. Roots are \(-1\) and \(1\): \[A=\int_{-2}^{-1}(x^2-1)\,dx+\int_{-1}^{1}(1-x^2)\,dx+\int_1^2(x^2-1)\,dx=4.\]
  4. Root is \(x=2\). The function is positive on \([0,2]\) and negative on \([2,3]\): \[A=\int_0^2(6-3x)\,dx+\int_2^3(3x-6)\,dx=6+\frac32=\frac{15}{2}.\]
  5. \(x^2-4x+3=(x-1)(x-3)\). It is positive on \([0,1]\), negative on \([1,3]\), and positive on \([3,4]\): \[A=\int_0^1(x^2-4x+3)\,dx+\int_1^3(-x^2+4x-3)\,dx+\int_3^4(x^2-4x+3)\,dx=\frac43+\frac43+\frac43=4.\]

Part B

  1. On \([-2,2]\), \(x^2-4\le0\). The definite integral is a signed area and is negative. Total area requires \[A=\int_{-2}^{2}(4-x^2)\,dx=\int_{-2}^{2}|x^2-4|\,dx.\]
  2. Roots are \(-2\), \(0\), and \(2\). Since \(x^3-4x\) is negative on \([-3,-2]\), positive on \([-2,0]\), negative on \([0,2]\), and positive on \([2,3]\), \[A=\int_{-3}^{-2}(4x-x^3)\,dx+\int_{-2}^{0}(x^3-4x)\,dx+\int_0^2(4x-x^3)\,dx+\int_2^3(x^3-4x)\,dx.\] Equivalently, \(A=\int_{-3}^{3}|x^3-4x|\,dx\).
  3. If \(f(x)\le0\) on \([1,4]\), then \[A=-\int_1^4 f(x)\,dx=\int_1^4 |f(x)|\,dx.\]

Part C

  1. Roots are \(-1\), \(0\), and \(1\). The total area is \[A=\int_{-2}^{-1}(x-x^3)\,dx+\int_{-1}^{0}(x^3-x)\,dx+\int_0^1(x-x^3)\,dx+\int_1^2(x^3-x)\,dx.\] Evaluating gives \[A=\frac94+\frac14+\frac14+\frac94=5.\]
  2. \(\cos x\) 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.\]
  3. \(v(t)=t^2-4t+3=(t-1)(t-3)\). The velocity is positive on \([0,1]\), negative on \([1,3]\), and positive on \([3,4]\). Total distance is \[\int_0^4|t^2-4t+3|\,dt=\int_0^1(t^2-4t+3)\,dt+\int_1^3(-t^2+4t-3)\,dt+\int_3^4(t^2-4t+3)\,dt.\] This gives \[\frac43+\frac43+\frac43=4.\]
Where this fits in the sequence. This lesson follows signed area and prepares students for area between two curves. The main shift is from signed accumulation, \(\int_a^b f(x)\,dx\), to total geometrical area, \(\int_a^b |f(x)|\,dx\), or an exact split at the roots.