To solve the problem, we need to analyze the function \( g(x) = f(f(x)) \) where the function \( f(x) \) is defined piecewise:
\[
f(x) =
\begin{cases}
1 + x & \text{if } 0 \leq x \leq 2 \\
3 - x & \text{if } 2 < x \leq 3
\end{cases}
\]
### Step 1: Determine the values of \( f(x) \)
1. For \( 0 \leq x \leq 2 \):
- \( f(x) = 1 + x \)
- The range of \( f(x) \) when \( x \) varies from 0 to 2 is:
- \( f(0) = 1 + 0 = 1 \)
- \( f(2) = 1 + 2 = 3 \)
- Therefore, \( f(x) \) maps \( [0, 2] \) to \( [1, 3] \).
2. For \( 2 < x \leq 3 \):
- \( f(x) = 3 - x \)
- The range of \( f(x) \) when \( x \) varies from 2 to 3 is:
- \( f(2) = 3 - 2 = 1 \)
- \( f(3) = 3 - 3 = 0 \)
- Therefore, \( f(x) \) maps \( (2, 3] \) to \( (0, 1] \).
### Step 2: Determine the composition \( g(x) = f(f(x)) \)
We need to evaluate \( g(x) \) for different intervals based on the piecewise definition of \( f(x) \).
1. **For \( 0 \leq x \leq 1 \)**:
- \( f(x) = 1 + x \) which ranges from 1 to 2.
- Therefore, \( g(x) = f(f(x)) = f(1 + x) \).
- Since \( 1 + x \) is in the range \( [1, 2] \), we use the first case of \( f \):
\[
g(x) = f(1 + x) = 1 + (1 + x) = 2 + x
\]
2. **For \( 1 < x \leq 2 \)**:
- \( f(x) = 1 + x \) which ranges from 2 to 3.
- Therefore, \( g(x) = f(f(x)) = f(1 + x) \).
- Since \( 1 + x \) is in the range \( [2, 3] \), we use the second case of \( f \):
\[
g(x) = f(1 + x) = 3 - (1 + x) = 2 - x
\]
3. **For \( 2 < x \leq 3 \)**:
- \( f(x) = 3 - x \) which ranges from 1 to 0.
- Therefore, \( g(x) = f(f(x)) = f(3 - x) \).
- Since \( 3 - x \) is in the range \( [0, 1] \), we use the first case of \( f \):
\[
g(x) = f(3 - x) = 1 + (3 - x) = 4 - x
\]
### Step 3: Compile the piecewise definition of \( g(x) \)
Thus, we have:
\[
g(x) =
\begin{cases}
2 + x & \text{if } 0 \leq x \leq 1 \\
2 - x & \text{if } 1 < x \leq 2 \\
4 - x & \text{if } 2 < x \leq 3
\end{cases}
\]
### Step 4: Check for points of discontinuity
1. **At \( x = 1 \)**:
- \( g(1) = 2 + 1 = 3 \)
- Left-hand limit as \( x \to 1^- \): \( g(1^-) = 2 + 1 = 3 \)
- Right-hand limit as \( x \to 1^+ \): \( g(1^+) = 2 - 1 = 1 \)
- Since \( g(1^-) \neq g(1^+) \), \( g(x) \) is discontinuous at \( x = 1 \).
2. **At \( x = 2 \)**:
- \( g(2) = 2 - 2 = 0 \)
- Left-hand limit as \( x \to 2^- \): \( g(2^-) = 2 - 2 = 0 \)
- Right-hand limit as \( x \to 2^+ \): \( g(2^+) = 4 - 2 = 2 \)
- Since \( g(2^-) \neq g(2^+) \), \( g(x) \) is discontinuous at \( x = 2 \).
### Conclusion
The points of discontinuity of \( g(x) \) in the interval \([0, 3]\) are at \( x = 1 \) and \( x = 2 \). Therefore, the number of points of discontinuity is **2**.