Solveeit Logo

Question

Question: Evaluate the following integral: \(\int_{1}^{4}{\left\\{ \left| x-1 \right|+\left| x-2 \right|+\left...

Evaluate the following integral: \int_{1}^{4}{\left\\{ \left| x-1 \right|+\left| x-2 \right|+\left| x-4 \right| \right\\}dx}.

Explanation

Solution

Hint: We will evaluate 14x1dx\int_{1}^{4}{\left| x-1 \right|dx} then 14x2dx\int_{1}^{4}{\left| x-2 \right|dx} and then 14x4dx\int_{1}^{4}{\left| x-4 \right|dx} individually and finally we will add all three results to get the final value. Please note that whenever we open any modulus function ab\left| a-b \right|, then we get two results, one is positive and one is negative. When we open ab\left| a-b \right|, we get two values (a – b) for a1a\ge 1 and we get – (a – b) for a < 1.

Complete step-by-step answer:
It is given in the question that we have to evaluate this definite integral \int_{1}^{4}{\left\\{ \left| x-1 \right|+\left| x-2 \right|+\left| x-4 \right| \right\\}dx}. Now, we will divide the given definite integral into three parts. Let 14x1dx\int_{1}^{4}{\left| x-1 \right|dx} be the 1st definite integral. Let 14x2dx\int_{1}^{4}{\left| x-2 \right|dx} be the 2nd definite integral and let 14x4dx\int_{1}^{4}{\left| x-4 \right|dx} be the 3rd definite integral.

Now, we are evaluating the 1st definite integral.
I1=14x1dx{{I}_{1}}=\int_{1}^{4}{\left| x-1 \right|dx}

We know that whenever we open any modulus ab\left| a-b \right| then we get two results one is positive and other is negative. So, from this when we open x1\left| x-1 \right|, we will get two values, one is (x1)\left( x-1 \right) when x1x\ge 1and another is (x1)-\left( x-1 \right) when x<1x<1.
\Rightarrow \left| x-1 \right|=\left\\{ \begin{matrix} \left( x-1 \right)\ for\ x\ge 1 \\\ -\left( x-1 \right)\ for\ x<1 \\\ \end{matrix} \right.

So, we can write the integral 14x1dx\int_{1}^{4}{\left| x-1 \right|dx} as,
I1=14x1dx I1=11(x1)dx+14(x1)dx \begin{aligned} & {{I}_{1}}=\int_{1}^{4}{\left| x-1 \right|dx} \\\ & {{I}_{1}}=\int_{1}^{1}{-\left( x-1 \right)dx}+\int_{1}^{4}{\left( x-1 \right)dx} \\\ \end{aligned}

Here, 11(x1)dx\int_{1}^{1}{-\left( x-1 \right)dx} and 14(x1)dx\int_{1}^{4}{\left( x-1 \right)dx} can be written as 14(x1)dx\int_{1}^{4}{\left( x-1 \right)dx} as 11(x1)dx\int_{1}^{1}{-\left( x-1 \right)dx} is equal to 0.
I1=14(x1)dx\Rightarrow {{I}_{1}}=\int_{1}^{4}{\left( x-1 \right)dx}
I1=14(x1)dx{{I}_{1}}=\int_{1}^{4}{\left( x-1 \right)dx} can be also written as,
I1=14(x)dx141dx{{I}_{1}}=\int_{1}^{4}{\left( x \right)dx}-\int_{1}^{4}{1dx}

We know that integration of is.

When we integrate I1{{I}_{1}} we get,
I1=[x22]14[x]14{{I}_{1}}=\left[ \dfrac{{{x}^{2}}}{2} \right]_{1}^{4}-\left[ x \right]_{1}^{4}

Putting 4 as upper limit and 1 as lower limit in I1{{I}_{1}} we get,
I1=[(4)22(1)22][(41)] I1=[1612]3 I1=1523 I1=1562 I1=92 \begin{aligned} & {{I}_{1}}=\left[ \dfrac{{{\left( 4 \right)}^{2}}}{2}-\dfrac{{{\left( 1 \right)}^{2}}}{2} \right]-\left[ \left( 4-1 \right) \right] \\\ & {{I}_{1}}=\left[ \dfrac{16-1}{2} \right]-3 \\\ & {{I}_{1}}=\dfrac{15}{2}-3 \\\ & {{I}_{1}}=\dfrac{15-6}{2} \\\ & {{I}_{1}}=\dfrac{9}{2} \\\ \end{aligned}

Similarly, when we evaluate I2=14x2dx{{I}_{2}}=\int_{1}^{4}{\left| x-2 \right|dx} we get,
\left| x-2 \right|=\left\\{ \begin{matrix} \left( x-2 \right)\ for\ x\ge 2 \\\ -\left( x-2 \right)\ for\ x<2 \\\ \end{matrix} \right.
We can write I2=14x2dx{{I}_{2}}=\int_{1}^{4}{\left| x-2 \right|dx} as,

& {{I}_{2}}=\int_{1}^{2}{-\left( x-2 \right)dx+\int_{2}^{4}{\left( x-2 \right)}}dx \\\ & {{I}_{2}}=\int_{1}^{2}{+xdx\int_{1}^{2}{2dx}+\int_{2}^{4}{xdx-}}\int_{2}^{4}{2dx} \\\ \end{aligned}$$ On integrating ${{I}_{2}}$ further we get, ${{I}_{2}}=-\left[ \dfrac{{{x}^{2}}}{2} \right]_{1}^{2}+2\left[ x \right]_{1}^{2}+\left[ \dfrac{{{x}^{2}}}{2} \right]_{2}^{4}\pm 2\left[ x \right]_{2}^{4}$ On putting the limits in ${{I}_{2}}$ we get, $\begin{aligned} & {{I}_{2}}=-\left[ \dfrac{4-1}{2} \right]+2\left[ 2-1 \right]+\left[ \dfrac{16-4}{2} \right]-2\left[ 4-2 \right] \\\ & {{I}_{2}}=-\dfrac{3}{2}+2\left[ 1 \right]+\dfrac{12}{2}-2\left[ 2 \right] \\\ & {{I}_{2}}=-\dfrac{3}{2}+2+6-4 \\\ & {{I}_{2}}=-\dfrac{3}{2}+8-4 \\\ & {{I}_{2}}=-\dfrac{3}{2}+4 \\\ & {{I}_{2}}=\dfrac{-3+8}{2} \\\ & {{I}_{2}}=\dfrac{5}{2} \\\ \end{aligned}$ Similarly when we evaluate $\int_{1}^{4}{\left| x-4 \right|dx}$we get, $\left| x-4 \right|dx=\left\\{ \begin{matrix} \left( x-4 \right)\ for\ x\ge 4 \\\ -\left( x-4 \right)\ for\ x<4 \\\ \end{matrix} \right.$ We will consider only $-\left( x-4 \right)$ in our integration because $x<4$. $\begin{aligned} & -\int_{1}^{4}{\left( x-4 \right)dx} \\\ & \Rightarrow -\int_{1}^{4}{\left( x \right)dx}+\int_{1}^{4}{\left( 4 \right)dx} \\\ & \Rightarrow -\left[ \dfrac{{{x}^{2}}}{2} \right]_{1}^{4}+\left[ 4x \right]_{1}^{4} \\\ & \Rightarrow -\left[ \dfrac{{{\left( 4 \right)}^{2}}}{2}-\dfrac{{{\left( 1 \right)}^{2}}}{2} \right]+\left[ 4\times 4-4\times 1 \right] \\\ & \Rightarrow -\left[ \dfrac{16}{2}-\dfrac{1}{2} \right]+\left[ 16-4 \right] \\\ & \Rightarrow -\left[ \dfrac{15}{2} \right]+\left[ 12 \right] \\\ & \Rightarrow \dfrac{-15}{2}+12 \\\ & \Rightarrow \dfrac{-15+24}{2} \\\ & \Rightarrow \dfrac{9}{2} \\\ \end{aligned}$ Now, we have all three results of ${{I}_{1}},\ {{I}_{2}}\ and\ {{I}_{3}}$. So, we are ready to evaluate $\int_{1}^{4}{\left| x-1 \right|+\left| x-2 \right|+\left| x-4 \right|dx}$. On adding the values of ${{I}_{1}}=\dfrac{9}{2}+{{I}_{2}}=\dfrac{5}{2}+{{I}_{3}}=\dfrac{9}{2}$, we get, $\begin{aligned} & {{I}_{1}}+\ {{I}_{2}}+{{I}_{3}} \\\ & \Rightarrow \dfrac{9}{2}+\dfrac{5}{2}+\dfrac{9}{2} \\\ & \Rightarrow \dfrac{9+5+9}{2} \\\ & \Rightarrow \dfrac{23}{2} \\\ \end{aligned}$ Thus, $\int_{1}^{4}{\left| x-1 \right|+\left| x-2 \right|+\left| x-4 \right|dx}=\dfrac{23}{2}$. Note: We cannot open the modulus directly, we always get two results whenever we open it. One is positive and the other is negative. The concept is that modulus only gives the positive value. So, in order to make it positive we have to put a minus sign in one part of it. For example, in our question we have $${{I}_{2}}=\int_{1}^{4}{\left| x-2 \right|dx}$$. When we open this modulus we get, $\left| x-2 \right|=\left\\{ \begin{matrix} \left( x-2 \right)\ for\ x\ge 2 \\\ -\left( x-2 \right)\ for\ x<2 \\\ \end{matrix} \right.$ When $x\ge 2$ then automatically, we get a positive value but when the value of $x<2$ then we get a negative value and we know that modulus only gives the value. So, in order to make it positive we put minus signs before it.