Solution:
Since x−1≤0 on [0,1] and x−1≥0 on [1,4],
∣x−1∣={1−x,x−1,0≤x≤11≤x≤4
Using property P2,
∫04∣x−1∣dx=∫01(1−x)dx+∫14(x−1)dx
Integrating,
=[x−2x2]01+[2x2−x]14
Substituting the limits,
=21+[(8−4)−(21−1)]=21+29
Therefore,
∫04∣x−1∣dx=5
Hence, the value of the integral is 5.