To find the coefficient of \( x^6 \) in the expansion of \( (1 + x + x^2)^6 \), we can use the multinomial expansion.
### Step 1: Understand the expression
The expression \( (1 + x + x^2)^6 \) can be expanded using the multinomial theorem, which states that:
\[
(a_1 + a_2 + \ldots + a_m)^n = \sum \frac{n!}{k_1! k_2! \ldots k_m!} a_1^{k_1} a_2^{k_2} \ldots a_m^{k_m}
\]
where \( k_1 + k_2 + \ldots + k_m = n \).
### Step 2: Identify the terms
In our case, \( a_1 = 1 \), \( a_2 = x \), and \( a_3 = x^2 \) with \( n = 6 \). We need to find combinations of \( k_1, k_2, k_3 \) such that:
\[
k_1 + k_2 + k_3 = 6
\]
and the total degree of \( x \) is 6:
\[
k_2 + 2k_3 = 6
\]
### Step 3: Solve the equations
From the equations, we have:
1. \( k_1 + k_2 + k_3 = 6 \)
2. \( k_2 + 2k_3 = 6 \)
We can express \( k_1 \) in terms of \( k_2 \) and \( k_3 \):
\[
k_1 = 6 - k_2 - k_3
\]
Substituting \( k_1 \) into the second equation:
\[
k_2 + 2k_3 = 6
\]
Now, we can express \( k_2 \) in terms of \( k_3 \):
\[
k_2 = 6 - 2k_3
\]
### Step 4: Find non-negative integer solutions
Substituting \( k_2 \) back into the equation for \( k_1 \):
\[
k_1 = 6 - (6 - 2k_3) - k_3 = 2k_3
\]
Now we have:
- \( k_1 = 2k_3 \)
- \( k_2 = 6 - 2k_3 \)
- \( k_3 = k_3 \)
Since \( k_1, k_2, k_3 \) must be non-negative integers, we have:
1. \( k_3 \geq 0 \)
2. \( 6 - 2k_3 \geq 0 \) implies \( k_3 \leq 3 \)
Thus, \( k_3 \) can take values \( 0, 1, 2, \) or \( 3 \).
### Step 5: Calculate coefficients for each case
1. **If \( k_3 = 0 \)**:
- \( k_1 = 0, k_2 = 6 \)
- Coefficient: \( \frac{6!}{0!6!0!} = 1 \)
2. **If \( k_3 = 1 \)**:
- \( k_1 = 2, k_2 = 4 \)
- Coefficient: \( \frac{6!}{2!4!1!} = \frac{720}{2 \cdot 24 \cdot 1} = 15 \)
3. **If \( k_3 = 2 \)**:
- \( k_1 = 4, k_2 = 2 \)
- Coefficient: \( \frac{6!}{4!2!2!} = \frac{720}{24 \cdot 2 \cdot 2} = 15 \)
4. **If \( k_3 = 3 \)**:
- \( k_1 = 6, k_2 = 0 \)
- Coefficient: \( \frac{6!}{6!0!3!} = 1 \)
### Step 6: Sum the coefficients
Now we sum the coefficients:
\[
1 + 15 + 15 + 1 = 32
\]
### Final Answer
The coefficient of \( x^6 \) in the expansion of \( (1 + x + x^2)^6 \) is **32**.