Tutorials › Calculus I › Absolute Differences for Geometric Area

Area Between Curves · Tutorial 1206 of 1495

Absolute Differences for Geometric Area

Express total area between curves using an absolute difference, then locate its zeros to evaluate the area correctly.

Intermediate 10 min read

What You'll Learn

  • Write the height of a vertical slice as the absolute difference of the two curve values.
  • State when the absolute-difference integral gives the area on a fixed interval.
  • Distinguish geometric area from the signed integral of the difference.
  • Use zeros of the difference to partition an interval into sign-constant pieces.
  • Evaluate and check areas for curves that cross one or more times.

From signed difference to geometric area

On a fixed interval, the vertical distance between two curves changes according to which curve is higher. The geometric area does not change sign when the curves exchange positions: every thin vertical slice contributes a nonnegative amount.

This distinction matters because a definite integral of the difference \(f(x)-g(x)\) is a signed accumulation. Where \(f\) lies above \(g\), the integrand is positive; where \(f\) lies below \(g\), it is negative. Contributions from different parts of the interval can therefore cancel. To measure total geometric area, the height of each slice must be nonnegative.

Key formula: If \(f\) and \(g\) are continuous on the fixed interval \([a,b]\), the total area between their graphs over that interval is $$ A=\int_a^b |f(x)-g(x)|\,dx. $$

The absolute value makes the integrand the vertical distance between the curves, regardless of which curve is on top. This formula works whether the curves meet zero, one, or several times on the interval.

Why the absolute difference gives area

At a particular \(x\), the two curve values are \(f(x)\) and \(g(x)\). The vertical distance between them is the nonnegative number \(|f(x)-g(x)|\). A thin vertical strip with width \(\Delta x\) therefore has approximate area \(|f(x)-g(x)|\Delta x\). Adding such strip areas across the interval leads to the integral of that height.

1
Find the slice height.
At each \(x\), the vertical distance between the curves is \(|f(x)-g(x)|\).
2
Multiply by a small width.
A strip of width \(\Delta x\) has approximate area \(|f(x)-g(x)|\Delta x\).
3
Accumulate the strip areas.
The limit of these sums is the definite integral of the continuous height function.

Here is the justification in terms of the definition of area by vertical slices. Divide \([a,b]\) into subintervals and choose a sample point \(x_i^*\) in each subinterval. The corresponding sum of approximate strip areas is

$$ \sum_{i=1}^{n}|f(x_i^*)-g(x_i^*)|\Delta x_i. $$

Since \(f\) and \(g\) are continuous, their difference and its absolute value are continuous. Thus the sums converge to the definite integral of the slice height as the subinterval widths tend to zero. This gives

$$ A=\int_a^b |f(x)-g(x)|\,dx. $$

The continuity condition ensures the height is integrable on this closed, bounded interval, so the area is well-defined and finite. If the curves are given by other expressions but still define continuous functions on \([a,b]\), the same reasoning applies.

Finding where the absolute value changes form

To evaluate the formula using antiderivatives, identify where the difference is zero. Set \(h(x)=f(x)-g(x)\). At a zero of \(h\), the graphs meet. Between consecutive zeros, \(h\) cannot change sign: if it did, continuity and the Intermediate Value Theorem would force another zero between those points.

Consequently, on each interval between consecutive zeros, either \(h(x)\ge 0\) throughout or \(h(x)\le 0\) throughout. The absolute value can then be removed with the appropriate sign:

$$ |h(x)|= \begin{cases} h(x),&h(x)\ge 0,\\ -h(x),&h(x)\le 0. \end{cases} $$

If the zeros in \([a,b]\) are the finite list \(r_1<r_2<\cdots<r_k\), include them as partition points together with the endpoints. On each resulting subinterval, determine the sign of \(h\) and integrate either \(h\) or \(-h\). A zero at an endpoint is simply an endpoint of the partition.

Procedure: Find the zeros of \(f-g\) in the fixed interval, partition at those zeros, determine the sign on each open piece, and add the integrals of the nonnegative height \(|f-g|\).

The absolute-difference formula itself does not require a finite number of zeros. But when there are finitely many zeros, splitting the integral gives a direct way to evaluate it using antiderivatives. If the curves never meet inside the interval, their order remains fixed and one ordinary integral suffices.

Worked area with two crossings

Worked Example: A Parabola and a Horizontal Line

Find the area between \(f(x)=x^2\) and \(g(x)=1\) on \([-2,2]\).

First form their difference:

$$ h(x)=f(x)-g(x)=x^2-1=(x-1)(x+1). $$

The zeros are \(x=-1\) and \(x=1\). The difference is positive on \([-2,-1]\) and \([1,2]\), and negative on \([-1,1]\). Therefore,

$$ A=\int_{-2}^{-1}(x^2-1)\,dx +\int_{-1}^{1}(1-x^2)\,dx +\int_{1}^{2}(x^2-1)\,dx. $$

An antiderivative of \(x^2-1\) is \(F(x)=\frac{x^3}{3}-x\), since \(F'(x)=x^2-1\). The left piece is

$$ F(-1)-F(-2) =\left(-\frac13+1\right)-\left(-\frac83+2\right) =\frac23-\left(-\frac23\right) =\frac43. $$

For the middle piece, an antiderivative of \(1-x^2\) is \(G(x)=x-\frac{x^3}{3}\), since \(G'(x)=1-x^2\). Thus

$$ G(1)-G(-1) =\left(1-\frac13\right)-\left(-1+\frac13\right) =\frac23-\left(-\frac23\right) =\frac43. $$

The right piece is

$$ F(2)-F(1) =\left(\frac83-2\right)-\left(\frac13-1\right) =\frac23-\left(-\frac23\right) =\frac43. $$

Adding the three nonnegative contributions gives \(A=\frac43+\frac43+\frac43=4\). As a check, differentiating \(F\) and \(G\) recovers the respective integrands, and each piece is positive. The signed integral of \(f-g\), however, is not this total area:

$$ \int_{-2}^{2}(x^2-1)\,dx =F(2)-F(-2) =\frac23-\left(-\frac23\right) =\frac43. $$

The outer pieces contribute \(\frac83\) in total, while the signed contribution from the middle is \(-\frac43\). Their signed sum is \(\frac83-\frac43=\frac43\); their geometric areas add to \(\frac83+\frac43=4\).

Worked area with three crossings

Worked Example: A Cubic Difference

Find the area between \(f(x)=x^3\) and \(g(x)=x\) on \([-2,2]\).

The difference factors as

$$ h(x)=x^3-x=x(x-1)(x+1). $$

The zeros are \(-1,0,1\). Testing one point in each interval gives the signs: \(h(-2)=-6\), \(h(-\frac12)=\frac38\), \(h(\frac12)=-\frac38\), and \(h(2)=6\). Thus the absolute difference is \(-h\), \(h\), \(-h\), and \(h\), respectively, on the four pieces.

An antiderivative of \(h(x)=x^3-x\) is \(H(x)=\frac{x^4}{4}-\frac{x^2}{2}\), because \(H'(x)=x^3-x\). The two pieces on the positive side are

$$ \int_0^1 |h(x)|\,dx =-\bigl(H(1)-H(0)\bigr) =-\left(-\frac14-0\right) =\frac14, $$ $$ \int_1^2 |h(x)|\,dx =H(2)-H(1) =2-\left(-\frac14\right) =\frac94. $$

Since \(h\) is odd, \(|h|\) is even, so the areas on the negative side equal those on the positive side. Hence

$$ A=2\left(\frac14+\frac94\right)=5. $$

For a direct check, the corresponding negative-side pieces have areas \(\frac94\) on \([-2,-1]\) and \(\frac14\) on \([-1,0]\), as follows by evaluating \(H\) at their endpoints and reversing the sign where \(h<0\). The total is therefore \(\frac94+\frac14+\frac14+\frac94=5\). Also, \(H'(x)=h(x)\), as required.

Worked area with two simple roots

Worked Example: A Quadratic Difference on a Larger Interval

Find the area between \(f(x)=x^2-2x+1\) and \(g(x)=0\) on \([0,4]\).

Here the difference is

$$ h(x)=f(x)-g(x)=x^2-2x+1=(x-1)^2. $$

This expression is nonnegative throughout \([0,4]\), with a zero at \(x=1\). It does not change sign there, so the absolute difference equals \(h\) throughout. An antiderivative is \(H(x)=\frac{x^3}{3}-x^2+x\), and \(H'(x)=x^2-2x+1\). Therefore,

$$ A=\int_0^4(x^2-2x+1)\,dx =H(4)-H(0) =\left(\frac{64}{3}-16+4\right)-0 =\frac{64}{3}-12 =\frac{28}{3}. $$

The result is positive, as an area must be. Differentiating the antiderivative gives \((x-1)^2\), confirming the integrand and the evaluation. This example also shows that a zero of the difference need not create a switch in which curve is higher: here the difference touches zero and remains nonnegative.

A common mistake: using signed area as total area

A frequent error is to integrate \(f-g\) across the entire interval and call the result the geometric area, even when the difference changes sign. For the first example, this incorrect approach would report

$$ \int_{-2}^{2}(x^2-1)\,dx=\frac43 $$

as the area. That value is the signed integral, not the total area: negative contributions between the crossings cancel part of the positive contributions outside them. The correction is to integrate the absolute difference, or equivalently split at the zeros and reverse the sign on pieces where \(f-g<0\). In that example the geometric area is \(\frac43+\frac43+\frac43=4\).

A related error is to split at every zero but forget to check the sign on each resulting piece. A zero identifies where the curves meet; it does not by itself tell you which curve is higher on either side. Test a point in each open piece or otherwise establish the sign before removing the absolute value.

Why this formulation is useful

Writing area as an integral of an absolute difference gives one compact description that remains valid even when the upper and lower curves exchange roles. It also separates the geometric question from the calculation: first identify the nonnegative slice height, then choose a convenient way to evaluate its integral.

When there are finitely many crossings, the zeros of \(f-g\) tell you exactly where the integrand may change form. On each resulting interval, ordinary antiderivative methods apply to either \(f-g\) or \(g-f\). Always retain the fixed interval endpoints, include every zero inside the interval, and check that the final sum is nonnegative.

Check Your Understanding

For each question, identify the role of the absolute difference and the zeros of the difference.

  1. State the formula for total area between two continuous functions on a fixed interval \([a,b]\).
  2. Why can \(\int_a^b(f(x)-g(x))\,dx\) differ from the geometric area?
  3. For \(f(x)=x^2\) and \(g(x)=4\) on \([0,3]\), find the zeros of \(f-g\) in the interval and state which pieces must be considered.
  4. If \(f-g\) is continuous and has no zeros in \((a,b)\), what can be said about its sign there?
  5. Can a zero of \(f-g\) occur without the curves switching which one is higher? Explain briefly.

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon