Browse Questions

# Evaluate:$\int \limits_1^4 [\; \left |x-1 \right|+\left |x-2 \right |+\left| x-3\right |\;]\;dx$

Toolbox:
• $\int \limits _a^b f(x)dx=F(b)-F(a)$
• $\int \limits _a^b |x-c| dx$ Here we need to break the interval into two subintervals.
• If $(x-c) \geq 0 \;(ie)\; x \geq c,$ then the interval is from a to c
• If $(x-c) \leq 0\; (ie)\; x \leq 0 \;(ie)\; x < c$ then the interval is from c to b
Given $I=\int \limits_{-1}^2 f(x)dx$ where $f(x)=|x-1|+|x|+|x-1|$
First of all let us equate the expressions in mod to 0
Hence (x+1) gives x=-1
(x) gives x=0
(x-1) gives x=1
Therefore x=-1,x=0 and x=1.which is in acsending order
Now let us break the given interval [-1,2] into three subintervals [-1,0] [0,1] and [1,2]
case (i) on subinterval [-1,0] where $(x+1) \geq x \leq 0\;and\;(x-1) \leq 0$
Hence $f(x)=|x+1|+|x|+|x-1|$
$=(x+1)+(-x)+(-)(x-1)$
$=2-x$
case(ii) Let us consider the subinterval [0,1], where $(x+1) \geq 0,x \geq 0$ and |x-1|=-(x-1)
Hence $f(x)=|x+1|+|x|+|x-1|$
$=(x+1)+x+(-)(x-1)$
$=x+2$
case(iii) Let us consider the subinterval [1,2] where $(x+1) > 0,|x| \leq 0$ and $(x-1) \geq 0$
Hence $f(x)=|x+1|+|x|+|x-1|$
$=(x+1)+x+x-1$
$=3x$
Therefore $\int \limits_{-1}^2 f(x)dx=\int \limits_{-1}^0 f(x)dx+\int \limits_0^1 f(x)dx+\int \limits_{1}^2 f(x)dx$
$=\int \limits_{-1}^0 (2-x)dx+\int \limits_0^1 (x+2)dx+\int \limits_1^2 3x dx$
On integrating we get
$\bigg[2x-\large\frac{x^2}{2}\bigg]_{-1}^0+\bigg[\frac{x^2}{2}+2x\bigg]_0^1+\bigg[\frac{3x^2}{2}\bigg]_1^2$
on applying the limits we get,
$[0]-(2-\large\frac{1}{2})+(\frac{1}{2}+2)-0+3(\frac{4}{2}-\frac{1}{2})$
$=\large\frac{5}{2}+\frac{5}{2}+\frac{9}{2}=\frac{19}{2}$
Hence $\int \limits_{-1}^2 f(x)dx=\large\frac{19}{2}$