How can I find the coefficient of $x^6$ in $(1+x+\frac{x^2}{2})^{10}$ efficiently with combinatorics? To find the coefficient of $x^6$ in $(1+x+\frac{x^2}{2})^{10}$, 
I used factorization on $(1+x+\frac{x^2}{2})$ to obtain $\frac{((x+(1+i))(x+(1-i)))}{2}$, then simplified the question to finding the coefficient of $x^6$ in $(x+(1+i))^{10}(x+(1-i))^{10}$, then dividing by $2^{10}$.
Then, we find that the coefficient of $x^6$ would be:

$$\sum_{i=0}^{6} \binom{10}{6-i} \binom{10}{i} (1-i)^{10-(6-i)} (1+i)^{10-i}$$

with the knowledge that $(1-i)(1+i)=2$, I simplified to

$$\binom{10}{6}\binom{10}{0}2^4((1-i)^6+(1+i)^6)+\binom{10}{5}\binom{10}{1}2^5((1-i)^4+(1+i)^4)+\binom{10}{4}\binom{10}{2}2^6((1-i)^2+(1+i)^2)+\binom{10}{3}\binom{10}{3}2^7$$

Note: the formula $(1+i)^x+(1-i)^x$ gives:
$ 2(2^{\frac{x}{2}}) \cos(\frac{x\pi}{4})$
After simplifying and reapplying the division by $2^{10}$, I get $(\frac{0}{1024}) + (-8)(2520)(\frac{32}{1024}) + (\frac{0}{1024}) + (120)(120)(2^7)$, which gives $0-630+0+1800,$ which is 1170, and I checked this over with an expression expansion calculator.
If the original equation was $(1+x+x^2)^{10}$, I would have used binomials to find the answer, however, the $x^2$ was replaced by $\frac{x^2}{2}$. 
My question is whether anyone has a combinatorics solution to this question, rather than just algebra. It would be nice if the solution did not require complex numbers.
 A: You are looking for weak compositions of $6$ with $10$ parts of at most $2$.  The nonzero entries can be $(2,2,2), (2,2,1,1), (2,1,1,1,1)$ or $(1,1,1,1,1,1)$  You can fill those out to $10$ with zeros.  Now sum up multinomial coefficients and you are there.
A: The number of ways to partition 6 with just 2, 1, and 0 are
\begin{align*}
6 &= (3, 0, 7)\cdot(2, 1, 0)\\
&= (2, 2, 6)\cdot(2, 1, 0)\\
&= (1, 4, 5)\cdot(2, 1, 0)\\
&= (0, 6, 4)\cdot(2, 1, 0)
\end{align*}
where $\cdot$ indicates the dot product. These partitions represent the choices of $x^2, x^1, x^0$ in the expansion of $(1 + x + x^2)^{10}$ to obtain $x^6$. However, we must account for the $x^2/2$, and so the sums are weighted by $(1/2)^n$, where $n$ is the number of times $x^2$ is chosen. Therefore, we have
\begin{align*}
\left(\frac{1}{2}\right)^3\binom{10}{3, 0, 7} + \left(\frac{1}{2}\right)^2\binom{10}{2, 2, 6} + \left(\frac{1}{2}\right)^1\binom{10}{1, 4, 5} + \left(\frac{1}{2}\right)^0\binom{10}{0, 6, 4} = 1170
\end{align*}
A: Write the expression as $\frac{1}{2^{10}}\left((x+1)^2+1\right)^{10}$. 
Hint if you would like to do it using combinatorial arguments : Coefficient of $x^6$ in $(1+x^2)^{n}$ would give you the number of tuples such that $a_1 + a_2 + \cdots a_{n} = 6$ such that $a_i\in \{0,2\}$. This should be easy- just note that any three of the $a_i$s should be $2$ which gives $n\choose 2$ as the answer to the example here.
To add to the hint, note that if you write $x+1=t$, then you need to calculate the coefficients of $x^6$ which you get directly from the coeff of $t^6$ and another from the coeff of $t^4$ because $t^4 = (1+x)^4.
