Evaluate:
\[ I = \int_2^4 \left( |x - 2| + |x - 3| + |x - 4| \right) dx \]
We need to handle the absolute value expressions carefully. Let’s analyze where each expression inside the absolute value changes sign:
So, we split the interval \( [2, 4] \) at \( x = 3 \):
In this interval:
So the integrand becomes:
\[ (x - 2) + (3 - x) + (4 - x) = 5 - x \]
\[ \int_2^3 (5 - x) \, dx = \left[5x - \frac{x^2}{2} \right]_2^3 \] \[ = \left(15 - \frac{9}{2}\right) - \left(10 - \frac{4}{2}\right) = \left(\frac{30 - 9}{2}\right) - \left(\frac{20 - 4}{2}\right) = \frac{21}{2} - \frac{16}{2} = \frac{5}{2} \]
In this interval:
So the integrand becomes:
\[ (x - 2) + (x - 3) + (4 - x) = x - 1 \]
\[ \int_3^4 (x - 1) \, dx = \left[ \frac{x^2}{2} - x \right]_3^4 = \left( \frac{16}{2} - 4 \right) - \left( \frac{9}{2} - 3 \right) = (8 - 4) - \left( \frac{9 - 6}{2} \right) = 4 - \frac{3}{2} = \frac{5}{2} \]
\[ I = \frac{5}{2} + \frac{5}{2} = \boxed{5} \]
Find:\[ \int \frac{dx}{(x + 2)(x^2 + 1)} \]