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

Exercise 7.10 · Q18: ∫04∣x−1∣ dx\int_0^4|x-1|\,dx

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

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

18. ∫04∣x−1∣ dx\displaystyle\int_0^{4}|x - 1|\,dx

Exam answer

Let I=∫04∣x−1∣ dxI = \displaystyle\int_0^{4}|x - 1|\,dx⁠.

Here ∣x−1∣=1−x|x - 1| = 1 - x for 0≤x≤10 \le x \le 1⁠, and ∣x−1∣=x−1|x - 1| = x - 1 for 1≤x≤41 \le x \le 4⁠.

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

I=∫01(1−x) dx+∫14(x−1) dx=[x−x22]01+[x22−x]14=(1−12)−0+(8−4)−(12−1)=12+92\begin{aligned} I &= \int_0^{1}(1 - x)\,dx + \int_1^{4}(x - 1)\,dx \\ &= \left[x - \frac{x^2}{2}\right]_0^1 + \left[\frac{x^2}{2} - x\right]_1^4 \\ &= \left(1 - \frac12\right) - 0 \\ &\quad + (8 - 4) - \left(\frac12 - 1\right) \\ &= \frac12 + \frac92 \end{aligned}

∴ I=5\therefore\ I = 5⁠.

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

The one idea this problem is built on

The modulus ∣x−1∣|x - 1| is given by two different formulas: 1−x1 - x to the left of x=1x = 1 and x−1x - 1 to the right. So we split the interval at its turning point x=1x = 1 using P2, and integrate each piece with its own formula.

Given, to find, and the plan
Given
f(x)=∣x−1∣f(x) = |x - 1| on [0,4][0, 4]⁠.
To find
I=∫04∣x−1∣ dxI = \displaystyle\int_0^{4}|x - 1|\,dx⁠.
Plan
(1) Write ∣x−1∣|x - 1| without the modulus on each side of x=1x = 1⁠. (2) Split with P2 at c=1c = 1⁠. (3) and (4) Integrate each piece. (5) Add, and check with triangle areas.

Basics you need

1Modulus

∣u∣=u|u| = u if u≥0u \ge 0 and ∣u∣=−u|u| = -u if u<0u < 0⁠. Basics: symmetry and mirror images

2Property P2 (Section 7.10)

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

3Power rule and Theorem 2

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

4Area of a triangle

12×base×height\frac12 \times \text{base} \times \text{height} (used in the check). Basics: area as a sum of thin strips

Solution

  1. Remove the modulus on each side of x=1x = 1

    The expression inside, x−1x - 1⁠, changes sign at x=1x = 1⁠:

    ∣x−1∣={1−x,0≤x≤1,x−1,1≤x≤4.|x - 1| = \begin{cases} 1 - x, & 0 \le x \le 1,\\ x - 1, & 1 \le x \le 4. \end{cases}

    At x=1x = 1 both formulas give 0, so they agree there. The function is continuous on [0,4][0, 4]⁠, with a corner at x=1x = 1⁠.

    No formula in the book's list integrates ∣x−1∣|x - 1| directly, but on each side of x=1x = 1 it is a polynomial, which we can integrate. The turning point x=1x = 1 lies inside [0,4][0, 4]⁠, so both formulas are needed.
    For x<1x < 1⁠, x−1<0x - 1 < 0⁠, so ∣x−1∣=−(x−1)=1−x|x - 1| = -(x - 1) = 1 - x⁠.
  2. Split the interval with P2 at c=1c = 1

    I=∫01(1−x) dx+∫14(x−1) dx.I = \int_0^{1}(1 - x)\,dx + \int_1^{4}(x - 1)\,dx .
    P2 holds for any cc (and any continuous ff⁠); we choose c=1c = 1 because that is where the formula changes. On each piece the integrand is a polynomial, continuous on the closed sub-interval, so Theorem 2 applies to each.
    P2, Section 7.10. Lesson: properties
  3. The left piece, [0,1][0, 1]

    ∫01(1−x) dx=[x−x22]01=(1−12)−0=12.\begin{aligned}\int_0^{1}(1 - x)\,dx &= \left[x - \frac{x^2}{2}\right]_0^1 \\ &= \left(1 - \frac12\right) - 0 = \frac12 .\end{aligned}
    An antiderivative of 1−x1 - x is x−x22x - \frac{x^2}{2} (check: its derivative is 1−x1 - x⁠). Then Theorem 2: value at the upper limit minus value at the lower limit.
    Power rule: ∫xn dx=xn+1n+1+C\int x^n\,dx = \frac{x^{n+1}}{n+1} + C⁠. Basics: powers of x
  4. The right piece, [1,4][1, 4]

    ∫14(x−1) dx=[x22−x]14=(8−4)−(12−1)=4+12=92.\begin{aligned}\int_1^{4}(x - 1)\,dx &= \left[\frac{x^2}{2} - x\right]_1^4 \\ &= (8 - 4) - \left(\frac12 - 1\right) \\ &= 4 + \frac12 = \frac92 .\end{aligned}
    An antiderivative of x−1x - 1 is x22−x\frac{x^2}{2} - x (its derivative is x−1x - 1⁠). At x=4x = 4⁠: 162−4=4\frac{16}{2} - 4 = 4⁠. At x=1x = 1⁠: 12−1=−12\frac12 - 1 = -\frac12⁠. Subtracting a negative number adds it.
    Theorem 2, Section 7.8.3. Lesson: definite integrals
  5. Add, and check with triangles

    I=12+92=5.I = \frac12 + \frac92 = 5 .

    Geometrically, the region under y=∣x−1∣y = |x - 1| is two right triangles: on [0,1][0, 1]⁠, base 1 and height ∣0−1∣=1|0 - 1| = 1⁠, area 12\frac12⁠; on [1,4][1, 4]⁠, base 3 and height ∣4−1∣=3|4 - 1| = 3⁠, area 92\frac92⁠. Total 5.

    x y O 1 2 3 4 1 2 3 1/2 9/2 blue: y = |x − 1|, with its corner at (1, 0) left triangle: base 1, height 1, area 1/2 right triangle: base 3, height 3, area 9/2; total 5
    y=∣x−1∣y = |x - 1| on [0,4][0, 4]⁠: a V with its corner at (1,0)(1, 0)⁠. The region under it consists of two triangles of areas 12\frac12 and 92\frac92⁠.
    Since ∣x−1∣≥0|x - 1| \ge 0⁠, the integral is a genuine area, and the triangle areas confirm the answer without any antiderivative.
    Area of a triangle =12×base×height= \frac12\times\text{base}\times\text{height}⁠. Basics: area as a sum of thin strips
Result

∫04∣x−1∣ dx=5\int_0^{4}|x - 1|\,dx = 5 (Textbook answer: 5.)

Check it with numbers

Numerical integration over [0,1][0, 1] and [1,4][1, 4] gives 0.5000000000000.500000000000 and 4.5000000000004.500000000000⁠, and over [0,4][0, 4] it gives 5.0000000000005.000000000000⁠.

A wrong route for comparison: ∫04(x−1) dx=8−4=4\int_0^4 (x - 1)\,dx = 8 - 4 = 4⁠, not 5. Dropping the modulus counts the left triangle as −12-\frac12 instead of +12+\frac12⁠, and 5−2×12=45 - 2 \times \frac12 = 4⁠.

Common mistakes
  1. Ignoring the modulus and integrating x−1x - 1 over [0,4][0, 4]⁠, which gives 4.
  2. Splitting at the wrong point, such as the midpoint 2. The split must be where x−1x - 1 changes sign.
  3. Sign slip at the lower limit in Step 4: −(12−1)=+12-\left(\frac12 - 1\right) = +\frac12⁠.
What to take away
  1. For ∫∣g(x)∣ dx\int |g(x)|\,dx⁠: find where gg changes sign inside the interval, split there with P2, and use gg or −g-g on each piece.
  2. Compare Q5, Q6 and Example 28, which split at the zeros of the expression inside the modulus in the same way.

Every fact used, and where it comes from

FactUsed inSource
Definition of ∣u∣|u|Step 1Class XI, modulus function
P2: splitting the interval at ccStep 2Section 7.10, property P2 (Lesson: properties)
Power ruleSteps 3, 4Section 7.2, list of standard integrals
Theorem 2 (second fundamental theorem)Steps 3, 4Section 7.8.3
Area of a triangleStep 5Elementary geometry
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 →