Class 12 Maths, Worked in Full Past papersGet updates
Chapter 7 · Integrals

Exercise 7.10 · Q6: ∫28∣x−5∣ dx\int_2^8|x-5|\,dx

Exercise 7.10Properties of definite integrals (P2, P3) · Section 7.10
The question

By using the properties of definite integrals, evaluate the integrals in Exercises 1 to 19.

6. ∫28∣x−5∣ dx\displaystyle\int_2^8|x - 5|\,dx

Exam answer

Let I=∫28∣x−5∣ dxI = \displaystyle\int_2^8|x - 5|\,dx⁠.

Here ∣x−5∣=5−x|x - 5| = 5 - x for 2≤x≤52 \le x \le 5⁠, and ∣x−5∣=x−5|x - 5| = x - 5 for 5≤x≤85 \le x \le 8⁠.

Using ∫abf(x) dx\displaystyle\int_a^b f(x)\,dx =∫acf(x) dx+∫cbf(x) dx\displaystyle = \int_a^c f(x)\,dx + \int_c^b f(x)\,dx with c=5c = 5⁠,

I=∫25(5−x) dx+∫58(x−5) dx=[5x−x22]25+[x22−5x]58=(25−252)−(10−2)+(32−40)−(252−25)=92+92\begin{aligned} I &= \int_2^5(5 - x)\,dx + \int_5^8(x - 5)\,dx \\ &= \left[5x - \frac{x^2}{2}\right]_2^5 + \left[\frac{x^2}{2} - 5x\right]_5^8 \\ &= \left(25 - \frac{25}{2}\right) - (10 - 2) \\ &\quad + (32 - 40) - \left(\frac{25}{2} - 25\right) \\ &= \frac92 + \frac92 \end{aligned}

∴ I=9\therefore\ I = 9⁠.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

Inside the bars, x−5x - 5 is negative to the left of x=5x = 5 and positive to the right. This turning point lies inside [2,8][2, 8]⁠, so property P2 splits the integral at x=5x = 5⁠, where each piece has a plain linear integrand. The point 5 is also the midpoint of [2,8][2, 8]⁠, and the graph is symmetric about it, so the two pieces turn out equal.

Given, to find, and the plan
Given
I=∫28∣x−5∣ dxI = \int_2^8|x - 5|\,dx⁠.
To find
The exact value of II⁠.
Plan
Remove the bars on each side of x=5x = 5⁠; split by P2 with c=5c = 5⁠; integrate each piece; add. Then explain the equal pieces with P3 and check with triangles.

Basics you need

1Absolute value

∣u∣=u|u| = u if u≥0u \ge 0⁠, and ∣u∣=−u|u| = -u if u<0u < 0⁠.

2Properties P2 and P3 (Section 7.10)

P2: ∫abf=∫acf+∫cbf\int_a^b f = \int_a^c f + \int_c^b f⁠. P3: ∫abf(x) dx=∫abf(a+b−x) dx\int_a^b f(x)\,dx = \int_a^b f(a + b - x)\,dx⁠. Lesson: properties of definite integrals

3Power rule and the fundamental theorem

∫x dx=x22+C\int x\,dx = \frac{x^2}{2} + C (Section 7.2) and ∫abf=F(b)−F(a)\int_a^b f = F(b) - F(a) (Theorem 2, Section 7.8.3). Basics: powers of x

4Mirror symmetry

A graph symmetric about a vertical line has equal areas on the two sides. Basics: symmetry and mirror images

Solution

  1. Find the turning point and remove the bars

    x−5≥0x - 5 \ge 0 exactly when x≥5x \ge 5⁠. So on [2,8][2, 8]

    ∣x−5∣={5−x,2≤x≤5,x−5,5≤x≤8.|x - 5| = \begin{cases} 5 - x, & 2 \le x \le 5,\\ x - 5, & 5 \le x \le 8.\end{cases}

    Both formulas give 0 at x=5x = 5⁠, and ∣x−5∣|x - 5| is continuous on [2,8][2, 8]⁠.

    On each side of the turning point the absolute value is a plain linear function we can integrate. The turning point is where the inside, x−5x - 5⁠, is zero; it lies inside [2,8][2, 8]⁠, so the interval must be cut there.
    For x<5x < 5⁠: ∣x−5∣=−(x−5)=5−x|x - 5| = -(x - 5) = 5 - x⁠. Test: at x=3x = 3⁠, ∣3−5∣=2=5−3|3 - 5| = 2 = 5 - 3⁠.
  2. Split with P2 at c=5c = 5

    I=∫25(5−x) dx+∫58(x−5) dx.I = \int_2^5(5 - x)\,dx + \int_5^8(x - 5)\,dx .
    P2 holds for any point cc⁠; choosing the turning point makes each integrand a single formula.
  3. The left piece, on [2,5][2, 5]

    ∫25(5−x) dx=[5x−x22]25=(25−252)−(10−2)=252−8=92.\begin{aligned}\int_2^5(5 - x)\,dx &= \left[5x - \frac{x^2}{2}\right]_2^5 \\ &= \left(25 - \tfrac{25}{2}\right) - (10 - 2) \\ &= \tfrac{25}{2} - 8 = \frac{9}{2}.\end{aligned}
    An antiderivative of 5−x5 - x is 5x−x225x - \frac{x^2}{2} (its derivative is 5−x5 - x⁠). Theorem 2 gives upper value minus lower value.
    Standard formula (i), Section 7.2, with n=0n = 0 and n=1n = 1⁠; Theorem 2, Section 7.8.3. Lesson: the fundamental theorem
  4. The right piece, on [5,8][5, 8]

    ∫58(x−5) dx=[x22−5x]58=(32−40)−(252−25)=−8+252=92.\begin{aligned}\int_5^8(x - 5)\,dx &= \left[\frac{x^2}{2} - 5x\right]_5^8 \\ &= (32 - 40) - \left(\tfrac{25}{2} - 25\right) \\ &= -8 + \tfrac{25}{2} = \frac{9}{2}.\end{aligned}
    An antiderivative of x−5x - 5 is x22−5x\frac{x^2}{2} - 5x⁠. Both values in the bracket are negative numbers, but their difference, the integral of a non-negative function, is positive.
    Theorem 2, Section 7.8.3. Lesson: the fundamental theorem
  5. Add the pieces

    I=92+92=9.I = \frac{9}{2} + \frac{9}{2} = 9 .
    x y 2 5 8 3 x = 5 (2, 3) (8, 3) 9/2 9/2 y = |x − 5|
    The graph of y=∣x−5∣y = |x - 5| on [2,8][2, 8] is a V with its corner at (5,0)(5, 0)⁠. The two triangles are mirror images in the line x=5x = 5⁠; each has base 3 and height 3, so area 12⋅3⋅3=92\frac12 \cdot 3 \cdot 3 = \frac92⁠. Total 9.
    Since ∣x−5∣≥0|x - 5| \ge 0⁠, the integral is the area under the graph: two congruent right-angled triangles, matching Steps 3 and 4.
    Area of a triangle =12×base×height= \frac12 \times \text{base} \times \text{height}⁠. Basics: area as a sum of thin strips
  6. Why the two pieces are equal: the reflection behind P3

    Take f(x)=∣x−5∣f(x) = |x - 5|⁠, a=2a = 2⁠, b=8b = 8⁠, so a+b=10a + b = 10⁠. Then

    f(10−x)=∣10−x−5∣=∣5−x∣=∣x−5∣=f(x).\begin{aligned}f(10 - x) &= |10 - x - 5| = |5 - x| \\ &= |x - 5| = f(x) .\end{aligned}

    Replacing xx by 10−x10 - x reflects the line in x=5x = 5 and swaps [2,5][2, 5] with [5,8][5, 8]⁠. Applying the same substitution t=10−xt = 10 - x to the right piece alone (dt=−dxdt = -dx⁠; x=5→t=5x = 5 \to t = 5⁠, x=8→t=2x = 8 \to t = 2⁠):

    ∫58∣x−5∣ dx=∫25∣5−t∣ dt=∫25∣x−5∣ dx.\begin{aligned}\int_5^8|x - 5|\,dx &= \int_2^5|5 - t|\,dt \\ &= \int_2^5|x - 5|\,dx .\end{aligned}

    So I=2∫25(5−x) dx=2⋅92=9I = 2\int_2^5(5 - x)\,dx = 2 \cdot \frac92 = 9⁠, the same answer.

    P3 itself holds for every continuous ff⁠; its proof is the substitution t=a+b−xt = a + b - x⁠, which reflects [a,b][a, b] in its midpoint. Here we use that same substitution on one half only. It pays off because f(a+b−x)=f(x)f(a + b - x) = f(x)⁠: the graph is symmetric about the midpoint a+b2=5\frac{a + b}{2} = 5⁠, so the two halves are equal and we only needed one of them. The middle step uses P1 to turn the limits round and absorb the minus sign from dt=−dxdt = -dx⁠, then P0 to rename tt as xx⁠.
    ∣5−x∣=∣x−5∣|5 - x| = |x - 5| because ∣−u∣=∣u∣|-u| = |u|⁠. P0, P1 and P3, Section 7.10. Basics: symmetry and mirror images
Result

∫28∣x−5∣ dx=9\int_2^8|x - 5|\,dx = 9 (Textbook answer: 9. Ours is the same.)

Check it with numbers

A numerical integration of ∣x−5∣|x - 5| over [2,8][2, 8] gives 9.0000000; over [2,5][2, 5] and over [5,8][5, 8] it gives 4.5000000 each, which is 92\frac92⁠.

Common mistakes
  1. Dropping the bars: ∫28(x−5) dx=0\int_2^8(x - 5)\,dx = 0⁠. The two triangles then cancel (−92+92-\frac92 + \frac92⁠), but area under ∣x−5∣|x - 5| never cancels.
  2. Using x−5x - 5 on [2,5][2, 5]⁠. There x−5<0x - 5 < 0⁠, so ∣x−5∣=5−x|x - 5| = 5 - x⁠.
  3. Arithmetic with negative values in the brackets. In Step 4, (252−25)=−252\left(\frac{25}{2} - 25\right) = -\frac{25}{2}⁠, and subtracting it adds 252\frac{25}{2}⁠.
What to take away
  1. Split ∫∣g∣\int|g| with P2 at the zeros of gg inside the interval.
  2. If f(a+b−x)=f(x)f(a + b - x) = f(x)⁠, the graph is symmetric about the midpoint of [a,b][a, b]⁠, and the two halves have equal integrals (the substitution t=a+b−xt = a + b - x from the proof of P3 shows it).
  3. For linear pieces, triangle areas give a fast check.

Every fact used, and where it comes from

FactUsed inSource
∣u∣=u|u| = u for u≥0u \ge 0⁠, −u-u for u<0u < 0⁠; ∣−u∣=∣u∣|-u| = |u|Steps 1 and 6Definition of absolute value
P2: ∫abf=∫acf+∫cbf\int_a^b f = \int_a^c f + \int_c^b fStep 2Section 7.10 (Lesson)
∫xn dx=xn+1n+1+C\int x^n\,dx = \frac{x^{n+1}}{n+1} + C (n=0,1n = 0, 1⁠)Steps 3 and 4Standard formula (i), Section 7.2
∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a)Steps 3 and 4Theorem 2, Section 7.8.3 (Lesson)
Area of a triangle =12bh= \frac12 bhStep 5Mensuration (Basics)
P0, P1, P3Step 6Section 7.10 (Basics)
Splitting at turning pointsSteps 1 and 2Example 28, Exercise 7.10 Q5
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →