Using long division to divide one polynomial by another of a higher degree My friend and I were finding the series expansion of the function $\frac{2x}{x^2+1}$. I naturally went for the Maclaurin expansion method, using the differentials to find the series expansion.
The answer I got (which is correct) is $$\sum_{n=0}^\infty (-1)^n 2x^{(2n+1)} $$
The problem is, this took me a while to differentiate enough to see the pattern. My friend, however did something much faster - he used long division!
$$
\require{enclose}
\begin{array}{r}
                \end{array}
{x^2+1} \enclose{longdiv}{2x} $$
Apparently, instead of using the $x^2$ (the highest power of x) as the subject for his division, he used 1 (the lowest power of $x$), and he got the answer almost immediately. Example: 1 goes into $2x$ $2x$ times, and $(2x)({x^2+1}) = ({2x^3+2x})$. Subtract this from $2x$ and continue.
I couldn't find any evidence of this type of long division anywhere, and I'm having trouble understanding the logic behind it. How can he start subtracting something larger than $2x$ from $2x$? What sort of long division is this?
Could someone please help me understand?
 A: By long division we obtain
$$\frac{1}{x^2+1}=\frac{x^2+1-x^2}{x^2+1}=1-\frac{x^2}{x^2+1}=1-\frac{x^4+x^2-x^4}{x^2+1}=1-x^2+\frac{x^4}{x^2+1}=$$
and so on.
As an alternative note that
$$\frac{2x}{x^2+1}=2x(1+x^2)^{-1}$$
then use binomial expansion for $(1+x^2)^{-1}$.
A: This kind of long division is used all over places. 
For example $$\frac {1}{1-x}=1+x+x^2+x^3+....$$
$$\frac{1}{1+x}=1-x+x^2-x^3+....$$
$$\frac{1}{1+x^2}=1-x^2+x^4-x^6+....$$
It is much easier to get your series this way than going through lots of differentiation.
A: If $f,g$ are two polynomials such that $\deg f\geq\deg g$, then long division of $f$ by $g$ always terminates with a unique quotient polynomial and a constant remainder (this is the division algorithm).
If, however $\deg f\lt\deg g$, then the algorithm never terminates and the infinite series you generate as the quotient becomes the power series of $f/g$. Of course, convergence of this power series must be verified with $f/g$ to ensure that the power series obtained is the correct one.
Think of it analogously as dividing $1$ by $3$ using long division to obtain the decimal representation of $1/3$: you always get the remainder $10$ which is $\gt 3$ and the division algorithm never terminates.
A: The reason we usually go with the leading term in polynomial division is because this will make it so that we cancel out the leading term in the numerator. This makes the total degree of what we're working with go down and we stop when we can't go any further.
But, this only works if the leading term of the denominator is smaller than the leading term of the numerator. So we shouldn't be able to apply it to something like $\frac{2x}{x^2+1}$.
But, note that the final term in the denominator has smaller degree than the final term in the numerator. This means that we can always make the final terms equal. Doing it like this will make the total degree of the output larger, hence we get the series expansion for the rational function.
So, in your example, $2x=2x(x^2+1)-2x^3$. Here we're just making the $+1$ part of $x^2+1$ equal to $2x$ and then subtracting out whatever is leftover (some may say the remainder). With this, you can write
$$
\frac{2x}{x^2+1} = 2x - \frac{2x^3}{x^2+1}
$$
Note that the power in the numerator increased, so we can do this again, but with $-\frac{2x^3}{x^2+1}$. In this case, $-2x^3=-2x^3(x^2+1) + 2x^5$, and so overall we have
$$
\frac{2x}{x^2+1} = 2x - 2x^3 + \frac{2x^5}{x^2+1}
$$
And, again, the power in the numerator increased. Since we can increase this without bound, we can continue on to obtain the power series expansion.
A: So you basically want to understand just the long division.
How many times does $x^2$ go into $2x$?
Let $k=\text{amount of times }x^2 \text{ goes into }2x$
$$kx^2=2x$$
$$k=\dfrac{2x}{x^2}$$
Therefore, $x^2$ goes into $2x$ $\dfrac {2x}{x^2}$ times.
Your friend would have continued by doing $1\times \dfrac{2x}{x^2}=\dfrac{2x}{x^2}$, to get a quotient of $\dfrac{2x}{x^2}+\dfrac{-\frac{2x}{x^2}}{2x}$, which he would have simplified.
