Class 12 Maths, Worked in Full Past papersGet updates
Chapter 8 · Application of Integrals

Miscellaneous · Q2: Graph of y=∣x+3∣y = |x + 3| and ∫−60∣x+3∣ dx\int_{-6}^{0}|x + 3|\,dx

Miscellaneous ExerciseA modulus inside the integral: split at the corner · Miscellaneous Exercise
The question

2. Sketch the graph of y=∣x+3∣y = |x + 3| and evaluate ∫−60∣x+3∣ dx\displaystyle\int_{-6}^{0}|x + 3|\,dx⁠.

Exam answer

(figure) The graph of y=∣x+3∣y = |x + 3| is a V with vertex (−3,0)(-3, 0)⁠, through (−6,3)(-6, 3) and (0,3)(0, 3)⁠.

Here ∣x+3∣=x+3|x + 3| = x + 3 for x≥−3x \ge -3⁠, and ∣x+3∣=−(x+3)|x + 3| = -(x + 3) for x<−3x < -3⁠.

Let I=∫−60∣x+3∣ dxI = \displaystyle\int_{-6}^{0}|x + 3|\,dx⁠. 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=−3c = -3⁠,

I=−∫−6−3(x+3) dx+∫−30(x+3) dx=−[(x+3)22]−6−3+[(x+3)22]−30=−(0−92)+(92−0)=92+92\begin{aligned} I &= -\int_{-6}^{-3}(x + 3)\,dx \\ &\quad + \int_{-3}^{0}(x + 3)\,dx \\ &= -\left[\frac{(x + 3)^2}{2}\right]_{-6}^{-3} \\ &\quad + \left[\frac{(x + 3)^2}{2}\right]_{-3}^{0} \\ &= -\left(0 - \frac{9}{2}\right) + \left(\frac{9}{2} - 0\right) \\ &= \frac{9}{2} + \frac{9}{2} \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

The bars change their formula where the inside is zero: x+3=0x + 3 = 0 at x=−3x = -3⁠. On the left of −3-3⁠, ∣x+3∣=−(x+3)|x + 3| = -(x + 3)⁠; on the right, ∣x+3∣=x+3|x + 3| = x + 3⁠. So the graph is a V with its corner at (−3,0)(-3, 0)⁠, and the integral is split at x=−3x = -3 into two plain integrals, each worth 92\frac92⁠. Since ∣x+3∣≥0|x + 3| \ge 0⁠, the value 9 is the area of the region between the V and the xx-axis from x=−6x = -6 to x=0x = 0⁠: two triangles.

Given, to find, and the plan
Given
The function y=∣x+3∣y = |x + 3| and the integral I=∫−60∣x+3∣ dxI = \int_{-6}^{0}|x + 3|\,dx⁠.
To find
A sketch of the graph, and the exact value of II⁠.
Plan
(1) Write ∣x+3∣|x + 3| without bars on each side of x=−3x = -3⁠. (2) Plot a few points and sketch the V. (3) Split the integral at −3-3⁠. (4) Integrate each piece. (5) Add, and check with the areas of the two triangles.

Basics you need

1Absolute value

∣u∣=u|u| = u when u≥0u \ge 0⁠, and ∣u∣=−u|u| = -u when u<0u < 0⁠. So ∣u∣|u| is never negative. Test: ∣−2∣=−(−2)=2\lvert -2\rvert = -(-2) = 2⁠.

2Splitting an integral at a point

∫abf(x) dx=∫acf(x) dx+∫cbf(x) dx\int_a^b f(x)\,dx = \int_a^c f(x)\,dx + \int_c^b f(x)\,dx for any cc (property P2, Chapter 7, Section 7.10). Choosing cc at the corner gives one formula on each piece. Lesson: splitting an integral

3A definite integral is a number

∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a) where F′=fF' = f⁠. Basics: the definite integral

4Integral of a non-negative function as an area

If y≥0y \ge 0 on [a,b][a, b]⁠, then ∫aby dx\int_a^b y\,dx is the area between the graph and the xx-axis there. Basics: a strip has area y dx

Solution

  1. Write ∣x+3∣|x + 3| without the bars

    The inside, x+3x + 3⁠, is ≥0\ge 0 exactly when x≥−3x \ge -3⁠. So

    ∣x+3∣={−(x+3),x<−3,x+3,x≥−3.|x + 3| = \begin{cases} -(x + 3), & x < -3,\\ x + 3, & x \ge -3.\end{cases}

    Both formulas give 0 at x=−3x = -3⁠, so the two pieces join there.

    On each side of x=−3x = -3 the function is a plain straight line, which is easy to draw and to integrate. The point where the inside is zero is the only place where the formula changes.
    Test on each side: at x=−5x = -5⁠, ∣−5+3∣=∣−2∣=2\lvert -5 + 3\rvert =\lvert -2\rvert = 2 and −(−5+3)=2-(-5 + 3) = 2 ✓; at x=0x = 0⁠, ∣3∣=3=0+3|3| = 3 = 0 + 3 ✓.
  2. Plot points and sketch the graph

    A few values (each from the formula for its side):

    xx−7-7−6-6−5-5−4-4−3-3−2-2−1-101
    yy432101234

    To the left of −3-3 the graph is the line y=−x−3y = -x - 3 (slope −1-1⁠); to the right it is y=x+3y = x + 3 (slope 1). Together they form a V with its corner (vertex) at (−3,0)(-3, 0)⁠. It meets the yy-axis at (0,3)(0, 3)⁠, and above x=−6x = -6 it is at height 3.

    x y −6 (−3, 0) O (−6, 3) (0, 3) 9/2 9/2 y = |x + 3| x = −6
    The graph of y=∣x+3∣y = |x + 3|⁠, drawn with equal scales. Between x=−6x = -6 and x=0x = 0 the region under the V is two triangles: on [−6,−3][-6, -3] (gold) and on [−3,0][-3, 0] (blue). Each has base 3 and height 3. No part is below the xx-axis.
    The question asks for the sketch, and the sketch also shows what the integral means: since ∣x+3∣≥0|x + 3| \ge 0⁠, the integral from −6-6 to 0 is the area of the shaded region. The two triangles are mirror images in the line x=−3x = -3⁠, which already suggests two equal pieces.
  3. Split the integral at x=−3x = -3

    I=∫−6−3∣x+3∣ dx+∫−30∣x+3∣ dx=∫−6−3−(x+3) dx+∫−30(x+3) dx.\begin{aligned} I &= \int_{-6}^{-3}|x + 3|\,dx + \int_{-3}^{0}|x + 3|\,dx \\ &= \int_{-6}^{-3}-(x + 3)\,dx + \int_{-3}^{0}(x + 3)\,dx . \end{aligned}
    Property P2 lets us cut [−6,0][-6, 0] at c=−3c = -3⁠, which lies inside it. On [−6,−3][-6, -3] we use the formula for x<−3x < -3⁠; at the single point x=−3x = -3 both formulas agree (value 0), so it does not matter which piece includes it.
    P2, Chapter 7, Section 7.10. Lesson: splitting an integral
  4. The left piece, on [−6,−3][-6, -3]

    ∫−6−3−(x+3) dx=−[(x+3)22]−6−3=−(022−(−3)22)=−(0−92)=92.\begin{aligned} \int_{-6}^{-3}-(x + 3)\,dx &= -\left[\frac{(x + 3)^2}{2}\right]_{-6}^{-3} \\ &= -\left(\frac{0^2}{2} - \frac{(-3)^2}{2}\right) \\ &= -\left(0 - \frac92\right) = \frac92 . \end{aligned}
    An antiderivative of x+3x + 3 is (x+3)22\frac{(x + 3)^2}{2}⁠: by the chain rule its derivative is 2(x+3)2=x+3\frac{2(x + 3)}{2} = x + 3⁠. At x=−3x = -3 the bracket is 022=0\frac{0^2}{2} = 0⁠; at x=−6x = -6 it is (−3)22=92\frac{(-3)^2}{2} = \frac92⁠. The minus sign in front turns the negative difference into a positive one, as it must for a region above the axis. (With the antiderivative x22+3x\frac{x^2}{2} + 3x instead: −[(92−9)−(18−18)]=92-\big[(\frac92 - 9) - (18 - 18)\big] = \frac92⁠, the same.)
  5. The right piece, on [−3,0][-3, 0]

    ∫−30(x+3) dx=[(x+3)22]−30=322−022=92.\begin{aligned} \int_{-3}^{0}(x + 3)\,dx &= \left[\frac{(x + 3)^2}{2}\right]_{-3}^{0} \\ &= \frac{3^2}{2} - \frac{0^2}{2} = \frac92 . \end{aligned}
    Same antiderivative; at x=0x = 0 the bracket is 92\frac{9}{2}⁠, at x=−3x = -3 it is 0.
  6. Add the pieces, and check with the triangles

    I=92+92=9.I = \frac92 + \frac92 = 9 .

    Check by geometry: each triangle in the figure has base 3 and height 3, so area 12⋅3⋅3=92\frac12 \cdot 3 \cdot 3 = \frac92⁠. Two of them make 9 ✓.

    Because ∣x+3∣|x + 3| is never negative, the integral is exactly the shaded area, and for straight-line pieces the triangle formula gives it directly. The two pieces are equal because the V is symmetric about x=−3x = -3⁠, the midpoint of [−6,0][-6, 0]⁠.
    Area of a triangle =12×base×height= \frac12 \times \text{base} \times \text{height}⁠. Basics: area as a sum of strips
Result

The graph of y=∣x+3∣y = |x + 3| is a V with its vertex at (−3,0)(-3, 0)⁠, through (−6,3)(-6, 3) and (0,3)(0, 3)⁠, and

∫−60∣x+3∣ dx=9.\int_{-6}^{0}|x + 3|\,dx = 9 .

This is the area between the graph and the xx-axis from x=−6x = -6 to x=0x = 0⁠. (Textbook answer: 9.)

Check it with numbers

A computer's numerical integration of ∣x+3∣|x + 3| over [−6,0][-6, 0]⁠, with a break at −3-3⁠, gives 9.0000000000; over [−6,−3][-6, -3] and over [−3,0][-3, 0] it gives 4.5000000000 each, which is 92\frac92 ✓.

A rough check with six strips of width 1, using the heights at the middles −5.5,−4.5,…,−0.5-5.5, -4.5, \ldots, -0.5⁠: 2.5+1.5+0.5+0.5+1.5+2.5=92.5 + 1.5 + 0.5 + 0.5 + 1.5 + 2.5 = 9 ✓ (exact here, because each piece is a straight line and no strip crosses the corner).

Common mistakes
  1. Dropping the bars: ∫−60(x+3) dx=92−92=0\int_{-6}^{0}(x + 3)\,dx = \frac92 - \frac92 = 0⁠. Without the bars the left triangle counts as negative and cancels the right one.
  2. Using x+3x + 3 on [−6,−3][-6, -3]: there x+3<0x + 3 < 0⁠, so ∣x+3∣=−(x+3)|x + 3| = -(x + 3)⁠.
  3. Putting the corner at x=3x = 3: the inside x+3x + 3 is zero at x=−3x = -3⁠, so the V sits to the left of the yy-axis.
  4. Losing the minus sign in front of the left bracket, which gives −92+92=0-\frac92 + \frac92 = 0 again.
What to take away
  1. For ∫∣g(x)∣ dx\int|g(x)|\,dx⁠, find where g(x)=0g(x) = 0⁠, split there, and use gg or −g-g on each piece.
  2. The graph of y=∣x−h∣y = |x - h| or ∣x+k∣|x + k| is a V with its corner on the xx-axis where the inside is zero.
  3. An integral of a function that is never negative is an area; for straight-line graphs, triangles give a quick check. The same split appears in Miscellaneous Q5 for y=x∣x∣y = x|x|⁠.

Every fact used, and where it comes from

FactUsed inSource
∣u∣=u|u| = u for u≥0u \ge 0⁠, −u-u for u<0u < 0Step 1Definition of absolute value
P2: ∫abf=∫acf+∫cbf\int_a^b f = \int_a^c f + \int_c^b fStep 3Chapter 7, Section 7.10 (Lesson)
ddx(x+3)22=x+3\frac{d}{dx}\frac{(x + 3)^2}{2} = x + 3Steps 4 and 5Chain rule (Chapter 5)
∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a)Steps 4 and 5Chapter 7, Theorem 2, Section 7.8.3 (Basics)
Integral of y≥0y \ge 0 is the area under the graphSteps 2 and 6Section 8.2 (Basics)
Area of a triangle =12bh= \frac12 bhStep 6Mensuration
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 →