# Integration

• Aug 3rd 2013, 03:03 AM
srirahulan
Integration
$\int_{-2}^{2}|x+1|d(x)$In this case can I break the mod value and write like this $\int_{-2}^{2}xd(x)+\int_{-2}^{2}1d(x)$
• Aug 3rd 2013, 03:23 AM
Deveno
Re: Integration
No. On the interval [-2,1) |x+1| = -x-1, while on the interval [-1,2], |x+1| = x+1. So what you WANT is:

$-\int_{-2}^{-1}x\ dx - \int_{-2}^{-1}1\ dx + \int_{-1}^2 x\ dx + \int_{-1}^2 1\ dx$
• Aug 3rd 2013, 05:36 AM
HallsofIvy
Re: Integration
Quote:

Originally Posted by Deveno
No. On the interval [-2,1) |x+1| = -x-1,

TYPO! Deveno meant "On the interval [-2, -1].

Quote:

while on the interval [-1,2], |x+1| = x+1. So what you WANT is:

$-\int_{-2}^{-1}x\ dx - \int_{-2}^{-1}1\ dx + \int_{-1}^2 x\ dx + \int_{-1}^2 1\ dx$
• Aug 3rd 2013, 06:12 AM
Soroban
Re: Integration
Hello, srirahulan!

Quote:

$\displaystyle\int_{\text{-}2}^{2}|x+1|\,dx$

$\text{Graph the function: }\,y \:=\:|x+1|\,\text{ on }[\text{-}2,2]$

Code:

                  |                   |          .*                   |        .*.:                   |      .*...:                   |    .*.....:                   |  .*.......:                   |.*.........:       *.        .*...........:       :.*.    .*.|...........:       :...*. .*...|...........:   ---+-----*-----+-----+-----+---     -2    -1    |    1    2                   |
$\displaystyle\text{We want: }\:\int^{\text{-}1}_{\text{-}2}(\text{-}x-1)\,dx\:+\:\int^2_{\text{-}1}(x+1)\,dx$
• Aug 3rd 2013, 06:37 AM
HallsofIvy
Re: Integration
Notice that, per Soroban's graph, this can be done with any "integration". The answer is the sum of the areas of two triangles.
• Aug 3rd 2013, 07:31 AM
Deveno
Re: Integration
Indeed...using just "plain geometry" (ok, a lame pun), it is apparent that the integral:

$\int_{-2}^2 x+1\ dx = 4$, while:

$\int_{-2}^2 |x+1|\ dx = 5$.

The reason being, the triangle with base extending from (-2,0) to (-1,0) in the former integral has a "peak" at (-2,-1) and lies BELOW the x-axis (so has "negative area", that is the integral is negative in this region), while in the latter integral lies above the x-axis (with "peak" at (-2,1)). This triangular area has a base of 1, and a height of 1, and so has area 1/2, making a "swing" of a difference of 1 between the two integrals.

And yes, Halls, that WAS a typo. :P