This lesson evaluates the definite integral
I=∫14(∣x−1∣+∣x−2∣+∣x−3∣)dx,
a common board-exam question on the modulus function and the properties of integrals.
Removing each modulus
By definition, ∣x∣=x when x≥0 and ∣x∣=−x when x<0. Applying this to each term:
∣x−1∣={x−1,−(x−1),x≥1x<1
∣x−2∣={x−2,−(x−2),x≥2x<2
∣x−3∣={x−3,−(x−3),x≥3x<3
The sign of each term changes at x=1, x=2 and x=3.
Splitting the integral
Using the additivity of the integral, the range [1,4] is split at the change points into [1,2], [2,3] and [3,4], so that every modulus has a fixed sign on each piece.
I=∫12(…)dx+∫23(…)dx+∫34(…)dx.
On [1,2]
Here x≥1, so ∣x−1∣=x−1; but x<2 and x<3, so ∣x−2∣=−(x−2) and ∣x−3∣=−(x−3). Adding:
(x−1)−(x−2)−(x−3)=−x+4.
On [2,3]
Here x≥1 and x≥2, so ∣x−1∣=x−1 and ∣x−2∣=x−2; but x<3, so ∣x−3∣=−(x−3). Adding:
(x−1)+(x−2)−(x−3)=x.
On [3,4]
Here x≥1, x≥2 and x≥3, so all three open positively:
(x−1)+(x−2)+(x−3)=3x−6.
Integrating each piece
∫12(−x+4)dx=[−2x2+4x]12=(−2+8)−(−21+4)=6−27=25.
∫23xdx=[2x2]23=29−2=25.
∫34(3x−6)dx=[23x2−6x]34=(24−24)−(227−18)=0+29=29.
Adding the pieces
I=25+25+29=219.
Key takeaways
- Rewrite each absolute value as two cases using ∣x∣=x for x≥0 and ∣x∣=−x for x<0.
- Split the integral at every point where a modulus changes sign, so each term has a fixed sign on each subinterval.
- Integrate the simplified linear expression on each piece and add the results: here I=219.