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}.
Solution
Hint: We will evaluate ∫14∣x−1∣dx then ∫14∣x−2∣dx and then ∫14∣x−4∣dx individually and finally we will add all three results to get the final value. Please note that whenever we open any modulus function ∣a−b∣, then we get two results, one is positive and one is negative. When we open ∣a−b∣, we get two values (a – b) for a≥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 ∫14∣x−1∣dx be the 1st definite integral. Let ∫14∣x−2∣dx be the 2nd definite integral and let ∫14∣x−4∣dx be the 3rd definite integral.
Now, we are evaluating the 1st definite integral.
I1=∫14∣x−1∣dx
We know that whenever we open any modulus ∣a−b∣ then we get two results one is positive and other is negative. So, from this when we open ∣x−1∣, we will get two values, one is (x−1) when x≥1and another is −(x−1) when x<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 ∫14∣x−1∣dx as,
I1=∫14∣x−1∣dxI1=∫11−(x−1)dx+∫14(x−1)dx
Here, ∫11−(x−1)dx and ∫14(x−1)dx can be written as ∫14(x−1)dx as ∫11−(x−1)dx is equal to 0.
⇒I1=∫14(x−1)dx
I1=∫14(x−1)dx can be also written as,
I1=∫14(x)dx−∫141dx
We know that integration of is.
When we integrate I1 we get,
I1=[2x2]14−[x]14
Putting 4 as upper limit and 1 as lower limit in I1 we get,
I1=[2(4)2−2(1)2]−[(4−1)]I1=[216−1]−3I1=215−3I1=215−6I1=29
Similarly, when we evaluate I2=∫14∣x−2∣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=∫14∣x−2∣dx as,