What is the coefficient of $x^3$ in expansion of $(x^2 - x + 2)^{10}$ 
What is the coefficient of $x^3$ in expansion of $(x^2 - x + 2)^{10}$.

I have tried:  
$$\frac{10!}{(3!\times7!)} \times (-x + 2)^7 \times (x^2)^3  $$
But got an incorrect answer $-15360$.
 A: You just missed one term. Note that by using the binomial theorem we get 
$$(x^2-x+2)^{10}=(x(x-1)+2)^{10}=\sum_{k=0}^{10}\binom{10}{k}2^{10-k}x^k(x-1)^k$$
Hence, since $[x^3](x^k(x-1)^k)=0$ for $k\not\in \{2,3\}$, we have that
$$\begin{align}[x^3](x^2-x+2)^{10}&=[x^3]\sum_{k=2}^{3}\binom{10}{k}2^{10-k}x^k(x-1)^k\\&=\binom{10}{2}2^8(-2)+\binom{10}{3}2^7(-1)\\
&=-23040-15360=-38400.\end{align}$$
A: You can get $x^3$ only by multiplying $x^2$ with $-x$, or by multiplying three $(-x)$'s together where the rest of the terms you are multiplying with should be $2$'s.
We can multiply $x^2$ with $(-x)$ in $2\cdot \binom{10}{2}$ ways (We multiply by $2$ to take into account the order of $x^2$ and $(-x)$). And we can multiply three $(-x)$'s together in $\binom{10}{3}$ ways. Since both these yield a $(-1)$ coefficient, and taking into account that the rest of the terms are $2$'s, we get
$$-2^8\cdot 2\binom{10}{2}-2^7\cdot\binom{10}{3} = -38400$$
A: The terms in the development are of the form  $x^{2a}(-x)^b2^c\propto x^3$, and the exponents must satisfy
$$\begin{cases}a+b+c=10,\\2a+b=3.\end{cases}$$
The solutions are $0,3,7$ and $1,1,8$.
Hence by the multinomial formula
$$\frac{10!}{0!3!7!}1^0(-1)^32^7+\frac{10!}{1!1!8!}1^1(-1)^12^8=-120\cdot128-90\cdot256=-38400.$$

By Barry's method, condensed,
$$(p^{10})'=10p^9p',\\(p^{10})''=90p^8p'^2+10p^9p'',\\(p^{10})'''=720p^7p'^3+270p^8p'p''$$
(there is no $p'''$), gives, evaluating at $0$,
$$\frac{720\cdot2^7\cdot(-1)^3+270\cdot2^8\cdot(-1)\cdot2}6=-38400.$$
A: For a problem of this size, I would just ploddingly take a few derivatives:
$$\begin{align}
f(x)=(x^2-x+2)^{10}
&\implies f'(x)=10(x^2-x+2)^9(2x-1)\\
&\implies f''(x)=90(x^2-x+2)^8(2x-1)^2+20(x^2-x+2)^9\\
&\implies f'''(x)=720(x^2-x+2)^7(2x-1)^3+360(x^2-x+2)^8(2x-1)+180(x^2-x+2)^8(2x-1)\\
&\implies f'''(0)=-720\cdot2^7-360\cdot2^8-180\cdot2^8=-(720+1080)2^7=-1800\cdot128\\
\end{align}$$
The coefficient of $x^3$ is $f'''(0)/6=-300\cdot128=-38400$.
A: By the multinomial formula,
$$(x^2-x+2)^{10}=\sum_{a+b+c=10}\begin{pmatrix}10!\\\!a!\,b!\;c!\!\end{pmatrix}x^{2a}(-1)^bx^b 2^c,$$
and obtaining $x^3$ means $2a+b=3$, whence $c-a=7$, so the possibilities aren't so many:


*

*either $a=0$, so $b=3$, $c=7$;

*or $a=1$, so $b=1$, $c=8$.


Therefore,  the  coefficient will be
$$ -2^7\biggl(\frac{10!}{3!\,7!}+2\frac{10!}{8!}\biggr)=-38\mkern 2mu400.$$ 
