Evaluate $\int_{-2}^1 f(x) d x$, where $f(x)= \begin{cases}1-2 x, & x \leq 0 \\ 1+2 x, & x \geq 0\end{cases}$
Evaluate $\int_{-2}^1 f(x) d x$, where
$f(x)= \begin{cases}1-2 x, & x \leq 0 \\ 1+2 x, & x \geq 0\end{cases}$
$0$
$2$
$4$
$6$
Solution
$\begin{array}{rl}\int_{-1}^1 f(x) d x=\int_{-1}^0 & f(x) d x+\int_0^1 f(x) d x \\ & =\int_{-1}^0(1-2 x) d x+\int_0^1(1+2 x) d x \\ & =\left[x-x^2\right]_{-1}^0+\left[x+x^2\right]_0^1\end{array}$
$=-(-1-1)+[1+1]=2+2=4$