<s>[INST] 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?
 [/INST] 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.
</s>