The integrand involves absolute values. To solve, we analyze the behavior of \(|x - 1|\), \(|x - 2|\), and \(|x - 3|\) over the given interval \([1, 3]\).
Step 1: Break the interval \([1, 3]\) at the critical points \(x = 1\), \(x = 2\), and \(x = 3\).
The intervals are:
\[
[1, 2], \quad [2, 3].
\]
Step 2: Evaluate the expressions for each interval.
- For \(x \in [1, 2]\):
\[
|x - 1| = x - 1, \quad |x - 2| = 2 - x, \quad |x - 3| = 3 - x.
\]
Thus, the integrand becomes:
\[
|x - 1| + |x - 2| + |x - 3| = (x - 1) + (2 - x) + (3 - x) = 4 - x.
\]
- For \(x \in [2, 3]\):
\[
|x - 1| = x - 1, \quad |x - 2| = x - 2, \quad |x - 3| = 3 - x.
\]
Thus, the integrand becomes:
\[
|x - 1| + |x - 2| + |x - 3| = (x - 1) + (x - 2) + (3 - x) = x.
\]
Step 3: Compute the integral over each sub-interval.
1. For \(x \in [1, 2]\):
\[
\int_{1}^{2} (4 - x) \, dx = \left[4x - \frac{x^2}{2}\right]_{1}^{2}.
\]
Evaluate:
\[
\left[4(2) - \frac{(2)^2}{2}\right] - \left[4(1) - \frac{(1)^2}{2}\right] = \left(8 - 2\right) - \left(4 - 0.5\right) = 6 - 3.5 = 2.5.
\]
2. For \(x \in [2, 3]\):
\[
\int_{2}^{3} x \, dx = \left[\frac{x^2}{2}\right]_{2}^{3}.
\]
Evaluate:
\[
\left[\frac{(3)^2}{2}\right] - \left[\frac{(2)^2}{2}\right] = \frac{9}{2} - \frac{4}{2} = \frac{5}{2}.
\]
Step 4: Add the results.
\[
\int_{1}^{3} \left(|x - 1| + |x - 2| + |x - 3|\right) \, dx = 2.5 + 2.5 = 5.
\]
Final Answer:
\[
\int_{1}^{3} \left(|x - 1| + |x - 2| + |x - 3|\right) \, dx = 5.
\]