Step 1: Understanding the problem
We are given a piecewise function \( f(x) \) that is defined on the interval \([0,8]\). The function is continuous on this interval. We need to find the values of constants \( a \) and \( b \) that make the function continuous at the points where the function changes its form: at \( x = 2 \) and \( x = 4 \).
Step 2: Apply the continuity condition at \( x = 2 \)
At \( x = 2 \), the function changes from \( f(x) = x^2 + ax + b \) for \( 0 \leq x < 2 \) to \( f(x) = 3x + 2 \) for \( 2 \leq x \leq 4 \). For the function to be continuous at \( x = 2 \), the left-hand limit and the right-hand limit must be equal. This means:
\[
\lim_{x \to 2^-} f(x) = \lim_{x \to 2^+} f(x)
\]
Substitute \( x = 2 \) into both expressions:
- From the first piece, \( f(x) = x^2 + ax + b \), we get:
\[
f(2) = 2^2 + 2a + b = 4 + 2a + b
\]
- From the second piece, \( f(x) = 3x + 2 \), we get:
\[
f(2) = 3(2) + 2 = 6 + 2 = 8
\]
Equating the two expressions for continuity at \( x = 2 \):
\[
4 + 2a + b = 8
\]
Simplify:
\[
2a + b = 4 \quad \text{(Equation 1)}
\]
Step 3: Apply the continuity condition at \( x = 4 \)
At \( x = 4 \), the function changes from \( f(x) = 3x + 2 \) for \( 2 \leq x \leq 4 \) to \( f(x) = 2ax + 5b \) for \( 4 < x \leq 8 \). For the function to be continuous at \( x = 4 \), the left-hand limit and the right-hand limit must be equal:
\[
\lim_{x \to 4^-} f(x) = \lim_{x \to 4^+} f(x)
\]
Substitute \( x = 4 \) into both expressions:
- From the second piece, \( f(x) = 3x + 2 \), we get:
\[
f(4) = 3(4) + 2 = 12 + 2 = 14
\]
- From the third piece, \( f(x) = 2ax + 5b \), we get:
\[
f(4) = 2a(4) + 5b = 8a + 5b
\]
Equating the two expressions for continuity at \( x = 4 \):
\[
8a + 5b = 14 \quad \text{(Equation 2)}
\]
Step 4: Solve the system of equations
We now have the system of two equations:
\[
2a + b = 4 \quad \text{(Equation 1)}
\]
\[
8a + 5b = 14 \quad \text{(Equation 2)}
\]
Solve Equation 1 for \( b \):
\[
b = 4 - 2a
\]
Substitute this into Equation 2:
\[
8a + 5(4 - 2a) = 14
\]
Simplify:
\[
8a + 20 - 10a = 14
\]
\[
-2a + 20 = 14
\]
\[
-2a = -6 \quad \Rightarrow \quad a = 3
\]
Now substitute \( a = 3 \) into Equation 1 to find \( b \):
\[
2(3) + b = 4 \quad \Rightarrow \quad 6 + b = 4 \quad \Rightarrow \quad b = -2
\]
Step 5: Final Answer
The values of \( a \) and \( b \) are:
a = 3, b = −2