If \( a < b \), then \( \int_a^b (|x-a| + |x-b|) dx \) is equal to
Show Hint
When integrating absolute value functions, always break down the interval based on where the expression inside the absolute value becomes zero. In this case, for the entire interval of integration \( [a, b] \), we have \( x-a \ge 0 \) and \( x-b \le 0 \), which simplifies the integrand to a constant.
We need to evaluate the integral \( I = \int_a^b (|x-a| + |x-b|) dx \).
The limits of integration are from \( a \) to \( b \), so for any \( x \) in this interval, we have \( a \leq x \leq b \).
Let's analyze the absolute value terms within this interval:
\[\begin{array}{rl} \bullet & \text{For \( x \geq a \), \( |x-a| = x-a \).} \\ \bullet & \text{For \( x \leq b \), \( |x-b| = -(x-b) = b-x \).} \\ \end{array}\]
So, within the interval \( [a, b] \), the integrand simplifies to:
\[ |x-a| + |x-b| = (x-a) + (b-x) = b-a \]
Now we can evaluate the integral:
\[ I = \int_a^b (b-a) dx \]
Since \( (b-a) \) is a constant, we can take it out of the integral.
\[ I = (b-a) \int_a^b 1 \, dx \]
\[ I = (b-a) [x]_a^b \]
\[ I = (b-a) (b-a) = (b-a)^2 \]