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

Example 28: ∫−12∣x3−x∣dx\int_{-1}^{2}\left|x^3-x\right|dx

ExamplesProperties of definite integrals · Section 7.10
The question

Evaluate ∫−12∣x3−x∣dx\displaystyle\int_{-1}^{2} \left|x^3 - x\right| dx⁠.

Exam answer

Let I=∫−12∣x3−x∣dxI = \displaystyle\int_{-1}^{2}\left|x^3 - x\right|dx⁠.

Here x3−x=x(x−1)(x+1)x^3 - x = x(x - 1)(x + 1)⁠. So x3−x≥0x^3 - x \ge 0 on [−1,0][-1, 0]⁠, x3−x≤0x^3 - x \le 0 on [0,1][0, 1] and x3−x≥0x^3 - x \ge 0 on [1,2][1, 2]⁠.

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⁠,

I=∫−10(x3−x) dx+∫01(x−x3) dx+∫12(x3−x) dx=[x44−x22]−10+[x22−x44]01+[x44−x22]12=−(14−12)+(12−14)+(4−2)−(14−12)=14+14+94\begin{aligned} I &= \int_{-1}^{0}(x^3 - x)\,dx \\ &\quad + \int_0^1(x - x^3)\,dx \\ &\quad + \int_1^2(x^3 - x)\,dx \\ &= \left[\frac{x^4}{4} - \frac{x^2}{2}\right]_{-1}^{0} \\ &\quad + \left[\frac{x^2}{2} - \frac{x^4}{4}\right]_0^1 \\ &\quad + \left[\frac{x^4}{4} - \frac{x^2}{2}\right]_1^2 \\ &= -\left(\frac14 - \frac12\right) + \left(\frac12 - \frac14\right) \\ &\quad + (4 - 2) - \left(\frac14 - \frac12\right) \\ &= \frac14 + \frac14 + \frac94 \end{aligned}

∴ I=114\therefore\ I = \dfrac{11}{4}⁠.

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

The one idea this problem is built on

An absolute value has no single formula: ∣u∣=u|u| = u where u≥0u \ge 0 and ∣u∣=−u|u| = -u where u≤0u \le 0⁠. So we find where x3−xx^3 - x changes sign (at x=0x = 0 and x=1x = 1 inside [−1,2][-1, 2]⁠), cut the interval there using property P2, and on each piece replace ∣x3−x∣|x^3 - x| by x3−xx^3 - x or by −(x3−x)-(x^3 - x)⁠. Each piece is then an ordinary polynomial integral.

Given, to find, and the plan
Given
f(x)=∣x3−x∣f(x) = |x^3 - x| on [−1,2][-1, 2]⁠.
To find
∫−12f(x) dx\int_{-1}^{2} f(x)\,dx⁠.
Plan
Factor x3−xx^3 - x and make a sign table; split at the sign changes by P2; integrate each piece with the antiderivative G(x)=x44−x22G(x) = \frac{x^4}{4} - \frac{x^2}{2}⁠; add.

Basics you need

1Absolute value

∣u∣=u|u| = u if u≥0u \ge 0⁠, and ∣u∣=−u|u| = -u if u<0u < 0⁠. So ∣u∣|u| is never negative, and it equals ±u\pm u depending on the sign of uu⁠.

2Property P2

∫abf dx=∫acf dx+∫cbf dx\int_a^b f\,dx = \int_a^c f\,dx + \int_c^b f\,dx⁠: an integral can be cut at any point cc (Section 7.10). Applying it twice cuts at two points. Lesson: properties of definite integrals

3Sign of a product

A product of factors is positive when an even number of them are negative, and negative when an odd number are.

4Power rule and Theorem 2

∫(x3−x) dx=x44−x22+C\int(x^3 - x)\,dx = \frac{x^4}{4} - \frac{x^2}{2} + C⁠, and ∫abf=F(b)−F(a)\int_a^b f = F(b) - F(a)⁠. Basics: the power rule

Solution

  1. Factor and find the signs of x3−xx^3 - x

    x3−x=x(x2−1)=x(x−1)(x+1).x^3 - x = x\left(x^2 - 1\right) = x(x - 1)(x + 1).

    It is 0 at x=−1,0,1x = -1, 0, 1⁠. Between these zeros the sign is fixed, and we read it from the factors:

    Intervalxxx−1x - 1x+1x + 1x3−xx^3 - x
    [−1,0][-1, 0]≤0\le 0<0< 0≥0\ge 0≥0\ge 0
    [0,1][0, 1]≥0\ge 0≤0\le 0>0> 0≤0\le 0
    [1,2][1, 2]>0> 0≥0\ge 0>0> 0≥0\ge 0

    For example at x=−12x = -\frac12⁠: −18+12=38>0-\frac18 + \frac12 = \frac38 > 0⁠; at x=12x = \frac12⁠: 18−12=−38<0\frac18 - \frac12 = -\frac38 < 0⁠; at x=32x = \frac32⁠: 278−32=158>0\frac{27}{8} - \frac32 = \frac{15}{8} > 0⁠.

    The absolute value only changes its formula where x3−xx^3 - x changes sign, so we must know exactly where that happens. Factoring shows the zeros; the table shows the sign in between. These are the book's three statements "x3−x≥0x^3 - x \ge 0 on [−1,0][-1, 0]", "≤0\le 0 on [0,1][0, 1]", "≥0\ge 0 on [1,2][1, 2]".
    On [−1,0][-1, 0] there are two non-positive factors (xx and x−1x - 1⁠), so the product is ≥0\ge 0⁠.
  2. Split the integral by P2 and remove the bars

    The integrand ∣x3−x∣|x^3 - x| is continuous on [−1,2][-1, 2] (a composition of continuous functions). Cutting at 0 and at 1 (P2 used twice):

    ∫−12∣x3−x∣ dx=∫−10(x3−x) dx+∫01−(x3−x) dx+∫12(x3−x) dx.\begin{aligned}\int_{-1}^{2}|x^3 - x|\,dx = {}&\int_{-1}^{0}(x^3 - x)\,dx \\ &+ \int_0^1 -(x^3 - x)\,dx \\ &+ \int_1^2 (x^3 - x)\,dx.\end{aligned}

    The middle piece is ∫01(x−x3) dx\int_0^1 (x - x^3)\,dx⁠.

    On each piece the sign is known (Step 1), so ∣x3−x∣|x^3 - x| has a single formula there: itself where it is ≥0\ge 0⁠, its negative where it is ≤0\le 0⁠. At the cut points the two formulas agree (both give 0), so it does not matter which piece a cut point belongs to.
    Property P2, Section 7.10, with c=0c = 0 and then c=1c = 1⁠. Lesson: properties of definite integrals
  3. One antiderivative serves all three pieces

    Let G(x)=x44−x22G(x) = \frac{x^4}{4} - \frac{x^2}{2}⁠, so G′(x)=x3−xG'(x) = x^3 - x⁠. Its values at the cut points:

    G(−1)=14−12=−14,G(0)=0,G(1)=14−12=−14,G(2)=4−2=2.\begin{aligned}G(-1) &= \tfrac14 - \tfrac12 = -\tfrac14, & G(0) &= 0, \\ G(1) &= \tfrac14 - \tfrac12 = -\tfrac14, & G(2) &= 4 - 2 = 2.\end{aligned}
    Every piece is ±(x3−x)\pm(x^3 - x)⁠, so the same GG (with a minus sign for the middle piece) does all the work. Computing the four values once avoids repeated arithmetic.
    Power rule: ∫x3dx=x44\int x^3dx = \frac{x^4}{4}⁠, ∫x dx=x22\int x\,dx = \frac{x^2}{2}⁠. Basics: the power rule
  4. Evaluate each piece

    ∫−10(x3−x) dx=G(0)−G(−1)=14,∫01(x−x3) dx=−[G(1)−G(0)]=14,∫12(x3−x) dx=G(2)−G(1)=2+14=94.\begin{aligned}\int_{-1}^{0}(x^3 - x)\,dx &= G(0) - G(-1) = \tfrac14, \\ \int_0^1 (x - x^3)\,dx &= -\left[G(1) - G(0)\right] = \tfrac14, \\ \int_1^2 (x^3 - x)\,dx &= G(2) - G(1) = 2 + \tfrac14 = \tfrac94.\end{aligned}
    Each piece is positive, as it must be: the integrand ∣x3−x∣|x^3 - x| is never negative. A negative piece here would signal a sign error in removing the bars.
    Theorem 2, Section 7.8.3: F(upper) minus F(lower). Lesson: the fundamental theorem
  5. Add the pieces

    ∫−12∣x3−x∣ dx=14+14+94=114=2.75.\int_{-1}^{2}|x^3 - x|\,dx = \frac14 + \frac14 + \frac94 = \frac{11}{4} = 2.75.
    −1 1 2 2 4 6 x y y = |x³ − x| dashed: x³ − x < 0 here 1/4 1/4 9/4
    The dashed curve is y=x3−xy = x^3 - x where it is negative (on 0<x<10 < x < 1⁠); taking the absolute value flips that dip above the axis (gold). The three shaded areas are 14\frac14⁠, 14\frac14 and 94\frac94⁠, total 114\frac{11}{4}⁠.

    The book arrives at the same total by expanding all the brackets:

    −14+12+12−14+2−14+12=32−34+2=114.\begin{aligned}&-\tfrac14 + \tfrac12 + \tfrac12 - \tfrac14 + 2 - \tfrac14 + \tfrac12 \\ &= \tfrac32 - \tfrac34 + 2 = \tfrac{11}{4}.\end{aligned}
    The figure shows why the absolute value matters: without it, the gold dip would count as −14-\frac14 and cancel the first hump, giving only 94\frac94⁠.
    Area is always counted positive; a signed integral counts parts below the axis as negative. Basics: area as a sum of thin strips
Result

∫−12∣x3−x∣dx=114=2.75,\int_{-1}^{2}\left|x^3 - x\right|dx = \frac{11}{4} = 2.75, the same as the book's answer.

Check it with numbers

A numerical integration of ∣x3−x∣|x^3 - x| over [−1,2][-1, 2] gives 2.7500000. By contrast, ∫−12(x3−x) dx=G(2)−G(−1)=2.25\int_{-1}^{2}(x^3 - x)\,dx = G(2) - G(-1) = 2.25⁠: the difference 2.75−2.25=0.52.75 - 2.25 = 0.5 is exactly twice the area 14\frac14 of the dip that the absolute value flips.

Common mistakes
  1. Ignoring the bars. ∫−12(x3−x) dx=94\int_{-1}^2 (x^3 - x)\,dx = \frac94⁠, not 114\frac{11}{4}⁠.
  2. Splitting at the wrong points. The cuts go where x3−xx^3 - x changes sign, 0 and 1, not at arbitrary points. (The zero at −1-1 is the lower limit, so no cut is needed there.)
  3. Wrong sign on the middle piece. On [0,1][0, 1]⁠, ∣x3−x∣=x−x3|x^3 - x| = x - x^3⁠.
  4. A negative piece. Each piece of ∫∣f∣\int|f| must be ≥0\ge 0⁠; if one comes out negative, a sign was flipped wrongly.
What to take away
  1. To integrate ∣f(x)∣|f(x)|⁠: find the zeros of ff⁠, make a sign table, split by P2, remove the bars piece by piece.
  2. One antiderivative of ff handles all pieces; only the sign in front changes.
  3. ∫ab∣f∣\int_a^b |f| is the total area between the graph and the axis; ∫abf\int_a^b f is the signed area.

Every fact used, and where it comes from

FactUsed inSource
x3−x=x(x−1)(x+1)x^3 - x = x(x-1)(x+1) and its signsStep 1Factorisation; signs of products
∣u∣=u|u| = u for u≥0u \ge 0⁠, −u-u for u≤0u \le 0Step 2Definition of absolute value
P2: ∫ab=∫ac+∫cb\int_a^b = \int_a^c + \int_c^bStep 2Section 7.10 (Lesson)
∫(x3−x) dx=x44−x22+C\int(x^3 - x)\,dx = \frac{x^4}{4} - \frac{x^2}{2} + CStep 3Standard formula (i), Section 7.2 (Basics)
∫abf=F(b)−F(a)\int_a^b f = F(b) - F(a)Step 4Theorem 2, Section 7.8.3 (Lesson)
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 →