<s>[INST] What is the expansion of $\sqrt{1+ux+vx^2}$ in powers of $x$? What is the expansion of $\sqrt{1+ux+vx^2}$ in powers of $x$?
This came up
in my answer here:
How to solve this recurrence$f(n)=A\cdot f(n-1)+B\sum{f(i)f(n-i)},\;1\leq i\leq n-1,$ and $f(1)=K$?
I just did a
straightforward expansion
and wondered if
there is a better way to do it.
Here is my work:
Since
$\sqrt{1+y}
=\sum_{k=0}^{\infty} \dfrac{(-1)^{k+1}}{4^k(2k-1)}\binom{2k}{k}y^k
$,
Then
$\begin{array}\\
\sqrt{1+ux+vx^2}
&=\sum_{k=0}^{\infty} \dfrac{(-1)^{k+1}}{4^k(2k-1)}\binom{2k}{k}(ux+vx^2)^k\\
&=\sum_{k=0}^{\infty} \dfrac{(-1)^{k+1}}{4^k(2k-1)}\binom{2k}{k}x^k(u+vx)^k\\
&=\sum_{k=0}^{\infty} \dfrac{(-1)^{k+1}}{4^k(2k-1)}\binom{2k}{k}x^k\sum_{j=0}^k \binom{k}{j}v^jx^ju^{k-j}\\
&=\sum_{k=0}^{\infty} \sum_{j=0}^k\dfrac{(-1)^{k+1}}{4^k(2k-1)}\binom{2k}{k}x^{k+j} \binom{k}{j}v^ju^{k-j}\\
&=\sum_{n=0}^{\infty} x^n\sum_{j=0}^n\dfrac{(-1)^{n-j+1}}{4^{n-j}(2(n-j)-1)}\binom{2(n-j)}{n-j} \binom{n-j}{j}v^ju^{n-2j}
\qquad(k = n-j)\\
\end{array}
$
We can play with
$\binom{2(n-j)}{n-j} \binom{n-j}{j}
=\dfrac{(2n-2j)!(n-j)!}{(n-j)!^2j!(n-2j)!}
=\dfrac{(2n-2j)!}{(n-j)!j!(n-2j)!}
$
but I don't see
anything beyond this.
Also,
any corrections appreciated.
 [/INST] 
We obtain a slightly simplified representation by using the binomial series expansion
  \begin{align*}
\sqrt{1+ux+vx^2}&=\sum_{k=0}^\infty \binom{\frac{1}{2}}{k}(ux+vx^2)^k\\
&=\sum_{k=0}^\infty \binom{\frac{1}{2}}{k}(ux)^k\left(1+\frac{v}{u}x\right)^k
\end{align*}
and the coefficient $[x^n]$ of the series expansion is
  \begin{align*}
\color{blue}{[x^n]\sqrt{1+ux+vx^2}}&=\sum_{k=0}^n\binom{\frac{1}{2}}{k}u^k[x^{n-k}]\sum_{j=0}^k\binom{k}{j}\left(\frac{v}{u}x\right)^j\\
&=\sum_{k=0}^n\binom{\frac{1}{2}}{k}u^k\binom{k}{n-k}\left(\frac{v}{u}\right)^{n-k}\\
&\,\,\color{blue}{=\sum_{k=0}^n\binom{\frac{1}{2}}{k}\binom{k}{n-k}u^{2k-n}v^{n-k}}
\end{align*}

</s>