The absolute value ∣x−3∣ represents the distance between x and 3. To integrate, the absolute value must be removed:
- When x≥3: ∣x−3∣=x−3
- When x<3: ∣x−3∣=−(x−3)=3−x
Since the integration is from 2 to 5 and the expression changes at x=3, split the integral at x=3:
∫25∣x−3∣dx=∫23∣x−3∣dx+∫35∣x−3∣dx
For x∈[2,3]: ∣x−3∣=3−x
For x∈[3,5]: ∣x−3∣=x−3
∫25∣x−3∣dx=∫23(3−x)dx+∫35(x−3)dx
∫23(3−x)dx=[3x−2x2]23
At x=3: 3(3)−232=9−29=29
At x=2: 3(2)−222=6−2=4
∫23(3−x)dx=29−4=21
∫35(x−3)dx=[2x2−3x]35
At x=5: 252−3(5)=225−15=−25
At x=3: 232−3(3)=29−9=−29
∫35(x−3)dx=−25−(−29)=2
∫25∣x−3∣dx=21+2
=21+24
=25