I know how to find the integral of just one absolute value, but this problem presents the integral of the sum of two absolute values. Help!
I want to evaluate:
$$\int_a^b(|x-1|+|x+1|)~dx$$
I know how to find the integral of just one absolute value, but this problem presents the integral of the sum of two absolute values. Help!
I want to evaluate:
$$\int_a^b(|x-1|+|x+1|)~dx$$
On
Absolute value represents a piecewise function.
$$ |x| = \left\{ \begin{array}{lcr} x & : & x \geq 0 \\ -x & : & x < 0\end{array}\right. $$
As with integrating any piecewise function, break the interval of integration up into the separate regions for which you have something easier to handle and integrate each part separately.
In this case, suppose $a = -3$ and $b = 4$. Then
$$ \int_{-3}^{4} |x-1| + |x+1| dx = \int_{-3}^{-1} -(x-1) -(x+1) dx + \int_{-1}^{1} -(x-1) + (x+1) dx + \int_{1}^{4} (x-1) + (x+1) dx $$
On
Note that $f(x) = |x-1| + |x+1|$ can be broken down into multiple cases:
$$f(x) = \begin{cases}(x-1)+(x+1)& \text{if }x\ge1 \\ -(x-1)+(x+1) & \text{if } -1\le x\le1 \\ -(x-1)+-(x+1) & \text{if } x\le-1 \end{cases}$$
Simplifying: $$f(x) = \begin{cases} 2x& \text{if }x\ge1 \\ 2 & \text{if } -1\le x\le1 \\ -2x & \text{if } x\le-1 \end{cases}$$
This is easily visualized with a graph (see Wolfram|Alpha).
So, to integrate, break up the interval $[a, b]$ with $-1$ and $1$.
An example will probably help: $$\begin{align} \int_{-3}^3|x-1|+|x+1|\;dx &= \int_{-3}^{-1}-2x\;dx+\int_{-1}^{1}2\;dx+\int_1^32x\;dx\\ &=-x^2\bigg|^{-1}_{-3} + 2x\bigg|_{-1}^1+x^2\bigg|_1^3\\ &=8+4+8\\ &=20 \end{align} $$
This area can be seen shaded in this Wolfram|Alpha link.
You need to separate the integral into cases like $x\in[a, -1], x\in(-1,1), x\in[1,b]$, assuming $a<-1<1<b$. Then, for each case, you can get rid of the absolute value and calculate the integral as usual.
It will be clear if you try to draw the graph of the function.