<s>[INST] Binomial expansion of expression with numerator and denominator both linear equations of x How can we expand the following by the binomial expansion, upto the term including $x^3$? That'll be 4 terms.
This the expression to be expanded:     $\sqrt{2+x\over1-x}$
I understand how to do the numerator and denominator individually. Now this is what I'm doing - having expanded the denominator (using the standard expansion formula for $(1+x)^{-1}$), do I now simply need to multiply this expansion once with the numerator $(2+x)$? I'm not getting the correct answer, but is this the correct method?
 [/INST] We will use the expansion
$\sqrt{1+x} = 1+x/2+x^2(1/2)(-1/2)/2 + x^3(1/2)(-1/2)(-3/2)/6 + ...
= 1+x/2-x^2/8+x^3/8+...
$
where "..." means "terms of higher order than $x^3$"
both in this expansion and in the math below.
Note: I am doing the following math
off the top of my head
as I am entering it,
so the chances for error are
decidedly nonzero.
However, the form of the result should be correct.
Because we are only interested in terms up to order $x^3$,
whenever a term of higher order occurs,
it is dropped and subsumed into
the "..." part.
For those who know the "big-$O$" notation,
the "+..." could also be written as
$+O(x^4)$.
$\begin{align}
\sqrt{2+x\over1-x}
&=\sqrt{(2+x)(1+x+x^2+x^3+...)}\\
&=\sqrt{2+2x+2x^2+2x^3+...+x+x^2+x^3+...}\\
&=\sqrt{2+3x+3x^2+3x^3+...}\\
&=\sqrt{2}\sqrt{1+3x/2+3x^2/2+3x^3/2+...}\\
&=\sqrt{2}(1+(3x/2+3x^2/2+3x^3/2)/2
-(3x/2+3x^2/2)^2/8
+(3x/2)^3/8+...)\\
&=\sqrt{2}(1+3x/4+3x^2/4+3x^3/4
-(3x/2)^2(1+x)^2/8
+27x^3/64+...)\\
&=\sqrt{2}(1+3x/4+3x^2/4+3x^3/4
-(9x^2/32)(1+2x+x^2)
+27x^3/64+...)\\
&=\sqrt{2}(1+3x/4+3x^2/4+3x^3/4
-9x^2/32-9x^3/16
+27x^3/64+...)\\
&=\sqrt{2}(1+3x/4+x^2(3/4-9/32)+x^3(3/4-9/16+27/64))+...\\
&=\sqrt{2}(1+3x/4+x^2((3*8-9)/32)+x^3((3*16-9*4+27)/64))+...\\
&=\sqrt{2}(1+3x/4+15x^2/32+39x^3/64)+...\\
\end{align}
$
This is why computer algebra systems came to be.
</s>