Maths WorkshopMaths problems with full solutions
Exercise 200Calculus › Single-variable calculus › Integration › Riemann integralHigh schoolAdded 2 Nov 2026

An area with an absolute value

#definite integrals#absolute value#sign of a function

Statement

Compute ∫02∣x2−3x+2∣ dx\displaystyle\int_0^2\left|x^2-3x+2\right|\,dx.

Hint

Factor x2−3x+2=(x−1)(x−2)x^2-3x+2=(x-1)(x-2) and find where it is positive and negative.

Show solutionHide solution

Solution

Idea. There is no antiderivative of ∣u∣|u| that works in one piece. We split the interval where the sign changes.

Sign. (x−1)(x−2)≥0(x-1)(x-2)\ge0 on [0,1][0,1] and ≤0\le0 on [1,2][1,2]. Hence
∫02∣x2−3x+2∣ dx=∫01(x2−3x+2) dx−∫12(x2−3x+2) dx.\int_0^2|x^2-3x+2|\,dx=\int_0^1(x^2-3x+2)\,dx-\int_1^2(x^2-3x+2)\,dx.

Computation. With F(x)=x33−3x22+2xF(x)=\frac{x^3}3-\frac{3x^2}2+2x:
F(1)−F(0)=13−32+2=56,F(2)−F(1)=(83−6+4)−56=−16.F(1)-F(0)=\frac13-\frac32+2=\frac56,\qquad F(2)-F(1)=\left(\frac83-6+4\right)-\frac56=-\frac16.
So the integral equals 56+16=1\frac56+\frac16=1.

Remark. Without the absolute value, the integral would be 56−16=23\frac56-\frac16=\frac23: the signed areas partially cancel. The absolute value counts the total area between the curve and the axis.