If $(1+ax+bx^{2})^{10} = 1-30x+410x^{2}+...$ find the value of a and b then find the coefficient of $x^{19}$ in this expansion. If: $$(1+ax+bx^{2})^{10} = 1-30x+410x^{2}+...$$ find the value of a and b then find the coefficient of $x^{19}$ in this expansion.
I found $a=-3$ and $b=\frac{1}{2}$ by writing the trinomial as a binomial as follows: $$((1)+(ax+bx^{2}))^{10} = 1-30x+410x^{2}+...$$
But I have no idea how to find the coefficient of a specific power aside from expanding fully which would be an epic job in this case.
The answer in the book is $\frac{-15}{256}$.
How is this done?
 A: You can use for the coefficients the triangle of Pascal which gives
$$1,10,45,120,210,252,210,120,45,10,1$$
Then$$[(ax+bx^2)+1]^{10}=(ax+bx^2)^{10}+10(ax+bx^2)^9+.....+252(ax+bx^2)^5+...+1$$
From this you get
$$10a=-30\Rightarrow a=-3\\45a^2+10b=410\Rightarrow b=\frac 12$$
For the coefficient of $x^{19}$you can developpe $(ax+bx^2)^{10}$ (using the same coefficients above) which gives $10ab^9$ as coefficient of $x^{19}$. Do you have to find if $(ax+bx^2)^9$ and the others powers have a power $x^{19}$ to finish? 
A: Here is a slighty different variation of the theme. It is convenient to use the coefficient of operator $[x^n]$ to denote the coefficient of $x^n$ of a polynomial.

We consider the polynomial
  \begin{align*}
(1+ax+bx^2)^{10}=1-30x+410x^2+\cdots\tag{1}
\end{align*}

$$ $$

Coefficient $[x^1]$:
We obtain
  \begin{align*}
[x^1](1+ax+bx^2)^{10}&=[x^1]\sum_{k=0}^{10}\binom{10}{k}(ax+bx^2)^k\\
&=[x^1]\binom{10}{1}(ax+bx^2)\\
&=10a
\end{align*}
  Since we are looking for $[x^1]$ only $k=1$ provides a contribution, resulting finally in $10a$. 
Comparison with (1) gives 
  \begin{align*}
10a&=-30\\
a&=-3\\
\end{align*}

$$ $$

Coefficient $[x^2]$:
We obtain
  \begin{align*}
[x^2](1+ax+bx^2)^{10}&=[x^2]\sum_{k=0}^{10}\binom{10}{k}(ax+bx^2)^k\\
&=[x^2]\binom{10}{1}(ax+bx^2)+[x^2]\binom{10}{2}(ax+bx^2)^2+\\
&=10b+45a^2
\end{align*}
  Since we are looking for $[x^2]$ only $k=1$ and $k=2$ provide a contribution, resulting finally in $10b+45a^2$. 
Comparison with (1) gives 
  \begin{align*}
10b+45a^2&=410\\
10b+405&=410\\
b&=\frac{1}{2}
\end{align*}

We conclude the polynomial under consideration is
\begin{align*}
(1-3x+\frac{1}{2}x^2)^{10}
\end{align*}

Coefficient $[x^{19}]$:
We obtain
  \begin{align*}
[x^{19}](1-3x+\frac{1}{2}x^2)^{10}&=[x^{19}]\sum_{k=0}^{10}\binom{10}{k}(-3x+\frac{1}{2}x^2)^k\\
&=[x^{19}]\binom{10}{10}(-3x+\frac{1}{2}x^2)^{10}\\
&=[x^{19}]x^{10}(-3+\frac{1}{2}x)^{10}\\
&=[x^{9}](-3+\frac{1}{2}x)^{10}\tag{1}\\
&=[x^{9}]\sum_{j=0}^{10}\binom{10}{j}\left(\frac{1}{2}x\right)^j(-3)^{10-j}\tag{2}\\
&=\binom{10}{9}\left(\frac{1}{2}\right)^9(-3)^1\\
&=-\frac{15}{256}
\end{align*}

Since we are looking for $[x^{19}]$ only $k=10$ provides a contribution.
In (1) we use the rule $[x^{n-k}]p(x)=[x^n]x^{k}p(x)$.
In (2) we observe that only $j=9$ provides a contribution.
