Area Enclosed by a Curve and the x-axis
Definite integrals, total geometrical area, sign changes, and absolute value.
On this page
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.
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.

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.
\(y=x^2-4\)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.
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
- Sketch or analyse the function on the interval.
- Find the x-intercepts by solving \(f(x)=0\). These are where the graph may change sign.
- Split the interval at any roots that lie inside the interval.
- Decide the sign of \(f(x)\) on each subinterval.
- Make every area positive: integrate \(f(x)\) where the graph is above the x-axis, and \(-f(x)\) where it is below.
- Add the pieces and check that the final area is positive.
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\).
\(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 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\).
\(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\).

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.
\(y=|x^2-4|\)\(\text{dashed: }y=x^2-4\)7Common mistakes and quick decision checklist
| Mistake | Fix |
|---|---|
| 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. |
9Practice
Try these without looking at the answers first. Draw a quick sketch before setting up each integral.
Part A: core total-area practice
- Find the area enclosed by \(y=x^2+1\), the x-axis, \(x=0\), and \(x=2\).
- Find the area enclosed by \(y=-2x\), the x-axis, \(x=0\), and \(x=3\).
- Find the total area between \(y=x^2-1\) and the x-axis from \(x=-2\) to \(x=2\).
- Find the total area between \(y=6-3x\) and the x-axis from \(x=0\) to \(x=3\).
- 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
- 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]\).
- 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\).
- 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
- Find the total area between \(y=x^3-x\) and the x-axis from \(x=-2\) to \(x=2\).
- Find the total area between \(y=\cos x\) and the x-axis from \(x=0\) to \(x=\pi\).
- 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
- 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}.\]
- The curve is below the axis on \([0,3]\), so use \(-(-2x)=2x\): \[A=\int_0^3 2x\,dx=[x^2]_0^3=9.\]
- 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.\]
- 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}.\]
- \(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
- 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.\]
- 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\).
- If \(f(x)\le0\) on \([1,4]\), then \[A=-\int_1^4 f(x)\,dx=\int_1^4 |f(x)|\,dx.\]
Part C
- 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.\]
- \(\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.\]
- \(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.\]