Let f(x)=|x-2| and g(x)=f(f(x))

Question:

Let $f(x)=|x-2|$ and $g(x)=f(f(x)), x \in[0,4]$.

Then $\int_{0}^{3}(g(x)-f(x)) d x$ is equal to :

  1. (1) 1

  2. (2) 0

  3. (3) $\frac{1}{2}$

  4. (4) $\frac{3}{2}$


Correct Option: 1

Solution:

$f(x)=|x-2|= \begin{cases}2-x, & x<2 \\ x-2, & x \geq 2\end{cases}$

$g(x)=f(f(x))= \begin{cases}2-f(x), & f(x)<2 \\ f(x)-2, & f(x) \geq 2\end{cases}$

$=\left\{\begin{array}{lll}2-(2-x), & 2-x<2, & x<2 \\ (2-x)-2, & 2-x \geq 2, & x<2 \\ 2-(x-2), & x-2<2, & x \geq 2 \\ (x-2)-2, & x-2 \geq 2, & x \geq 2\end{array}\right.$

$=\left\{\begin{array}{cc}-x & 0

$\therefore \int_{0}^{3}[g(x)-f(x)] d x$

$=\int_{0}^{2} x d x+\int_{2}^{3}(4-x) d x-\int_{0}^{3}|x-2| d x=1$

Leave a comment