Solution:
Key idea: To integrate ∣g(x)∣, split the interval at the point where g(x) changes sign, using ∫abf(x)dx=∫acf(x)dx+∫cbf(x)dx. On each piece, ∣g(x)∣ is either g(x) (where g≥0) or −g(x) (where g<0).
Step 1 — Part (i): find where x−2 changes sign.
The expression x−2 is negative for x<2 and not negative for x≥2. So ∣x−2∣ is 2−x on [0,2] and x−2 on [2,4].
∫04∣x−2∣dx=∫02(2−x)dx+∫24(x−2)dx
Step 2 — Part (i): the left piece.
An antiderivative of 2−x is 2x−2x2, and it vanishes at x=0.
∫02(2−x)dx=[2x−2x2]02=4−2=2
Step 3 — Part (i): the right piece.
An antiderivative of x−2 is 2x2−2x. Its value at x=4 is 0, and at x=2 it is −2.
∫24(x−2)dx=[2x2−2x]24=0−(−2)=2
Step 4 — Part (i): add the pieces.
The two triangles under the graph of ∣x−2∣ each have area 2.
∫04∣x−2∣dx=2+2=4
Note: The book prints the value 25 against part (i). With the printed limits 0 to 4 the value is 4; the value 25 belongs to the limits 1 to 4 (the left piece is then only 21).
Step 5 — Part (ii): use ∣2−x∣=∣x−2∣.
The numbers 2−x and x−2 are negatives of each other, so they have the same modulus. Part (ii) is therefore the same integral as part (i).
∫04∣2−x∣dx=∫02(2−x)dx+∫24(x−2)dx
From Steps 2 and 3, the two pieces are each 2, so the value is 4.
Step 6 — Part (iii): check the sign of 2x+1.
For 0≤x≤1 we have 2x+1≥1>0, so ∣2x+1∣ is just 2x+1 on the whole interval and no split is needed.
∫01(2x+1)dx=[x2+x]01=1+1=2
Step 7 — Part (iv): find where x+3 changes sign.
The expression x+3 is negative for x<−3 and not negative for x≥−3. So we split at x=−3.
∫−63∣x+3∣dx=∫−6−3−(x+3)dx+∫−33(x+3)dx
Step 8 — Part (iv): the left piece.
An antiderivative of −(x+3) is −2x2−3x. At x=−3 its value is 29, and at x=−6 it is 0.
∫−6−3−(x+3)dx=[−2x2−3x]−6−3=(−29+9)−(−18+18)=29
Step 9 — Part (iv): the right piece.
An antiderivative of x+3 is 2x2+3x.
∫−33(x+3)dx=[2x2+3x]−33=(29+9)−(29−9)=18
Step 10 — Part (iv): add the pieces.
We add the two results.
∫−63∣x+3∣dx=29+18=245
As a check, the graph forms two triangles with areas 21⋅3⋅3 and 21⋅6⋅6, whose sum is also 245.
Therefore, (i) 4; (ii) 4; (iii) 2; (iv) 245.