Answer
$4$
Work Step by Step
To solve the integral:
\[
\int_{0}^{4} |x^2 - 4x + 3| \, dx,
\]
we first need to find where the expression \(x^2 - 4x + 3\) changes sign so we can break the integral into regions where the expression is either positive or negative.
Step 1: Find the roots of the quadratic function \(x^2 - 4x + 3\).
Solve the equation:
\[
x^2 - 4x + 3 = 0.
\]
Factoring gives:
\[
(x - 1)(x - 3) = 0.
\]
So, the roots are \(x = 1\) and \(x = 3\).
Step 2: Determine the sign of the quadratic in the intervals \([0, 1]\), \([1, 3]\), and \([3, 4]\).
Interval \([0, 1]\): To determine the sign of the expression in this interval, we test a value within it, such as \(x = 0.5\). Substituting into the expression gives:
\[
0.5^2 - 4 \cdot 0.5 + 3 = 0.25 - 2 + 3 = 1.25 > 0.
\]
Since the result is positive, the expression \(x^2 - 4x + 3\) is positive throughout the interval \([0, 1]\).
Interval \([1, 3]\): To determine the sign of the expression in this interval, we test a value within it, such as \(x = 2\). Substituting into the expression gives:
\[
2^2 - 4 \cdot 2 + 3 = 4 - 8 + 3 = -1 < 0.
\]
Since the result is negative, the expression \(x^2 - 4x + 3\) is negative throughout the interval \([1, 3]\).
Interval \([3, 4]\): To determine the sign of the expression in this interval, we test a value within it, such as \(x = 3.5\). Substituting into the expression gives:
\[
3.5^2 - 4 \cdot 3.5 + 3 = 12.25 - 14 + 3 = 1.25 > 0.
\]
Since the result is positive, the expression \(x^2 - 4x + 3\) is positive throughout the interval \([3, 4]\).
Step 3: Set up the integral with absolute values.
Split the integral as follows:
\[
\int_{0}^{4} |x^2 - 4x + 3| \, dx = \int_{0}^{1} (x^2 - 4x + 3) \, dx - \int_{1}^{3} (x^2 - 4x + 3) \, dx + \int_{3}^{4} (x^2 - 4x + 3) \, dx.
\]
Step 4: Solve each integral.
1. For \(\int_{0}^{1} (x^2 - 4x + 3) \, dx\):
\[
\int_{0}^{1} (x^2 - 4x + 3) \, dx = \left[ \frac{x^3}{3} - 2x^2 + 3x \right]_{0}^{1} = \left( \frac{1}{3} - 2 + 3 \right) - (0) = \frac{4}{3}.
\]
2. For \(\int_{1}^{3} -(x^2 - 4x + 3) \, dx\):
\[
\int_{1}^{3} -(x^2 - 4x + 3) \, dx = - \left[ \frac{x^3}{3} - 2x^2 + 3x \right]_{1}^{3} = - \left( \left[ \frac{27}{3} - 18 + 9 \right] - \left[ \frac{1}{3} - 2 + 3 \right] \right).
\]
Simplify the evaluation:
\[
- \left( (9 - 18 + 9) - \left( \frac{1}{3} - 2 + 3 \right) \right) = - \left( 0 - \frac{4}{3} \right) = \frac{4}{3}.
\]
3. For \(\int_{3}^{4} (x^2 - 4x + 3) \, dx\):
\[
\int_{3}^{4} (x^2 - 4x + 3) \, dx = \left[ \frac{x^3}{3} - 2x^2 + 3x \right]_{3}^{4} = \left( \left[ \frac{64}{3} - 32 + 12 \right] - \left[ \frac{27}{3} - 18 + 9 \right] \right).
\]
Simplify the evaluation:
\[
\left( \frac{64}{3} - 20 \right) - (9 - 9) = \frac{64}{3} - 20 = \frac{64}{3} - \frac{60}{3} = \frac{4}{3}.
\]
Step 5: Add the results.
\[
\frac{4}{3} + \frac{4}{3} + \frac{4}{3} = 4.
\]
Final Answer:
\[
\int_{0}^{4} |x^2 - 4x + 3| \, dx = 4.
\]