Polynomial Long Division Confusion (simplifying $\frac{x^{5}}{x^{2}+1}$) I need to simplify \begin{equation}
\frac{x^{5}}{x^{2}+1}
\end{equation}
by long division in order to solve an integral. 
However, I keep getting an infinite series:
\begin{equation}
x^{3}+x+\frac{1}{x}-\frac{1}{x^{3}}+...
\end{equation}
 A: When dividing one polynomial by another, you expect a polynomial quotient. For example, when you divide $x^3+x+1$ by $x+1$, 


*

*First multiply $x+1$ by $x^2$ and subtract the result, $x^3+x^2$, from $x^3+x+1$, giving the remainder $-x^2+x+1$;

*Now, multiply $x+1$ by $-x$ and subtract the result, $-x^2-x$, from $-x^2+x+1$, giving the remainder $2x+1$;

*As a final step, multiply $x+1$ by $2$ and subtract the result, $2x+2$, from $2x+1$, giving you the remainder $-1$. Thus,$$x^3+x+1=(x+1)(x^2-x+2)-1$$ 
Note that you don't go beyond the last step, because the degree of the remainder, $2,(0)$ is smaller than the degree of the divisor, $x+1, (1)$. To go any further, you will have to multiply $x+1$ by terms containing negative powers of $x$, which would mean the quotient will no longer be a polynomial in $x$. Moreover, there is no guarantee that this procedure will terminate, as you have seen.
The essence of performing long-division to solve the integral $$\int\frac{x^5}{x^2+1}dx$$ is to express $x^5=(x^2+1)Q(x)+R(x)$, where $Q(x),R(x)$ are polynomials in $x$ with degree of $R(x)<2$, which is the degree of the divisor, $x^2+1$. 
This gives $$\frac{x^5}{x^2+1}=Q(x)+\frac{R(x)}{x^2+1}$$where $Q(x)$ can be easily integrated because it is a polynomial, and $\displaystyle\frac{R(x)}{x^2+1}$ can be integrated using partial fractions or similar techniques.
As other answers have pointed out, $$\int\frac{x^5}{x^2+1}dx=\int x^3-x+\frac x{x^2+1}dx=\frac{x^4}4-\frac{x^2}2+\frac12\ln(x^2+1)+C$$
A: The idea of polynomial division is like integer division. With integer division of $\frac nd$, we want integer $q,r$ so that $n=qd+r$ and $r\lt d$. With polynomial division of $\frac nd$, we want polynomial $q,r$ so that $n=qd+r$ and $\deg(r)\lt \deg(d)$.
$$
\require{enclose}
\begin{array}{rl}
&\phantom{)\,}\color{#C00}{x^3}\color{#090}{-x}\\[-4pt]
x^2+1\!\!\!\!\!&\enclose{longdiv}{x^5\qquad}\\[-4pt]
&\phantom{)\,}\underline{\color{#C00}{x^5+x^3}}\\[-2pt]
&\phantom{)\,x^5}{}-x^3\\[-4pt]
&\phantom{)\,x^5}\underline{\color{#090}{{}-x^3-x}}\\[-4pt]
&\phantom{)\,x^5{}-x^3-{}}x\\[-4pt]
\end{array}
$$
So we get a quotient of $x^3-x$ and a remainder of $x$, which allows us to write both
$$
\overbrace{\quad\,x^5\quad\,}^n=\overbrace{\left(x^3-x\right)}^q\overbrace{\left(x^2+1\right)}^d+\overbrace{\vphantom{x^5}\quad\;x\quad\;}^r
$$
and
$$
\frac{x^5}{x^2+1}=x^3-x+\frac{x}{x^2+1}
$$
A: Why wouldn't you get an infinite series?  
If $x^2 + 1$ doesn't divide evenly into $x^5$ (which it doesn't) you will get a remainder.  Just like with numbers with remainders if you try to continue you will get a decimal.  Here if try to divide into the remainder you will get an expression with a negative power.
The thing is when you get a remainder that can be divided into any further.... you stop.  And you let it be simply a remainder.
$\frac {x^5}{x^2+ 1} = \frac {x^5 + x^3}{x^2 + 1} -\frac {x^3}{x^2 + 1}$
$= x^3 - \frac {x^3 + x}{x^2 + 1} + \frac {x}{x^2+ 1} =$
$x^3 - x + \frac {x}{x^2 + 1}$.
Now we can't divide any further as the degree of the denominator ($x^2 + 1$) is $2$ and that is larger than the degree of that numerator ($x$).  So we are done.
$\frac {x^5}{x^2 +1} = x^3 - x +\frac {x}{x^2 +1}$.
Put another way:  $x^5 = (x^3 - x)(x^2 + 1) + x$.
$x$ is .... just a remainder you cant do any thing with.
It is exactly like.
$\frac {249}{7} = \frac {210 + 39}{7} = \frac {210}7 + \frac {39}7=$
$30 + \frac {35 + 4}{7} = 30 + \frac {35}7 + \frac 47=$
$30 + 5 + \frac 47 = 35\frac 47$.  
We've divided as far as we can go. 
If you tried to go further we would get decimals:
$30 + 5 + \frac {40}{7*10} = 30 + 5 + {35 + 5}{70} = $
$30 + 5 + \frac 5{10} + \frac 5{70} =30 + 5 + \frac 5{10} + \frac {50}{700} =$
$30 + 5 + \frac 5{10} + \frac 7{100} + \frac 1{1000} + ......$.
$= 35.571428571428571428571428571429.....$
But we weren't asked to go that for and as we aren't masochists.... we stopped at $35\frac 47$.
$
A: $\frac {x^{5}} {x^{2}+1}= x^{3}-x+\frac x {x^{2}+1}$.
A: Since $x^5 = \left(x^2 + 1\right)\left(x^3 - x\right) + x$, we have that
$$\cfrac{x^5}{x^2 + 1} = x^3 - x + \cfrac{x}{x^2 + 1} \tag{1}\label{eq1} $$
To do this in general, first note that $x^2$ divides into $x^5$ a total of $x^3$ times. However, this gives $x^3\left(x^2 + 1\right) = x^5 + x^3$, so it's too big by $x^3$.  As such, you need to subtract an appropriate value, with it being $x$ here due to $x \times x^2 = x^3$.  However, $x\left(x^2 + 1\right) = x^3 + x$, so subtracting this means that you are now $x$ too small, so you need to add that $x$ back. However, as the degree of $x$ is only $1$, which is less than the degree of $2$ in $x^2 + 1$, you leave that final $x$ as the remainder.  This, in total, gives \eqref{eq1}.
A: If the integral is well defined, you can write $${x^5\over 1+x^2}dx={1\over 2}{(x^2)^2\over 1+x^2}dx^2={1\over 2}{u^2\over 1+u}du$$
