Solveeit Logo

Question

Question: Evaluate the given integral: \(\int\limits_{0}^{4}{\left( |x|+|x-2|+|x-4| \right)}dx\)...

Evaluate the given integral:
04(x+x2+x4)dx\int\limits_{0}^{4}{\left( |x|+|x-2|+|x-4| \right)}dx

Explanation

Solution

In the given integral there are three terms in which mod function is present and to solve this we need to break the integral wherever the function inside integral changes. The mod terms we have are x,x2,x4|x|,\,|x-2|,\,|x-4| and we have to integrate from 0 to 4, now x|x| will not change it’s value from 0 to 4 as xx will be positive for that interval and x4|x-4| can be written as (x4)-\left( x-4 \right) as (x4)\left( x-4 \right) will be negative from 0 to 4. And we will break x2|x-2| in two parts first from 0 to 2 where x2=(x2)|x-2|=-\left( x-2 \right) and second from 2 to 4 where x2=x2|x-2|=x-2. Now we will solve the obtained integrals to get the answer.

Complete step by step answer:
We are given the integral,
04(x+x2+x4)dx\int\limits_{0}^{4}{\left( |x|+|x-2|+|x-4| \right)}dx
To solve this integral we need to break it into parts wherever the equation or mod terms inside the integral changes.
First we will consider the interval from 0 to 2, in that interval, and we get
02(x+x2+x4)dx\int\limits_{0}^{2}{\left( |x|+|x-2|+|x-4| \right)}dx
x=x, x2=(x2), x4=(x4) \begin{aligned} & |x|=x, \\\ & |x-2|=-(x-2), \\\ & |x-4|=-\left( x-4 \right) \\\ \end{aligned}
Putting the above values in the integral we get,
=02(x(x2)(x4))dx=\int\limits_{0}^{2}{\left( x-\left( x-2 \right)-\left( x-4 \right) \right)}dx
=02(6x)dx=\int\limits_{0}^{2}{\left( 6-x \right)}dx

& =\left[ 6x-\dfrac{{{x}^{2}}}{2} \right]_{0}^{2} \\\ & =\left( 12-2 \right)-\left( 0-0 \right) \\\ & =10 \\\ \end{aligned}$$ Now we will consider the interval from 2 to 4, in that interval, and we get $\int\limits_{2}^{4}{\left( |x|+|x-2|+|x-4| \right)}dx$ $\begin{aligned} & |x|=x, \\\ & |x-2|=(x-2), \\\ & |x-4|=-\left( x-4 \right) \\\ \end{aligned}$ Putting the above values in the integral we get, $\begin{aligned} & =\int\limits_{2}^{4}{\left( x+\left( x-2 \right)-\left( x-4 \right) \right)}dx \\\ & =\int\limits_{2}^{4}{\left( x+2 \right)}dx \\\ & =\left[ \dfrac{{{x}^{2}}}{2}+2x \right]_{2}^{4} \\\ & =\left( 8+8 \right)-\left( 2+4 \right) \\\ & =16-6 \\\ & =10 \\\ \end{aligned}$ Now we know that, $\begin{aligned} & \int\limits_{0}^{4}{\left( |x|+|x-2|+|x-4| \right)}dx=\int\limits_{0}^{2}{\left( |x|+|x-2|+|x-4| \right)}dx+\int\limits_{2}^{4}{\left( |x|+|x-2|+|x-4| \right)}dx \\\ & \int\limits_{0}^{4}{\left( |x|+|x-2|+|x-4| \right)}dx=10+10=20 \\\ \end{aligned}$ **Hence our value of integral $\int\limits_{0}^{4}{\left( |x|+|x-2|+|x-4| \right)}dx$ is 20.** **Note:** Whenever mod function is included inside the equation which has to be integrated then most of the times we will have to break the integral into several parts at the points where mod function changes. Many students make mistakes while doing this and integrate directly in the whole interval so be careful while solving these kinds of problems.