<s>[INST] Remainder when dividing power series I know how long division of polynomials works. For example I can use it to divide $x^2+1$ into $x$ to get
$$x=(x^2+1)\frac{1}{x}-\frac{1}{x}$$
with remainder $R=-1/x$, so that
$$\frac{x}{x^2+1}=\frac{1}{x}-\frac{1/x}{x^2+1}.$$
My question is, suppose $f$ and $g$ have infinite power series. I have seen people perform long division to compute $f/g$ up to the term, say, $x^4$, and what they say is that, up to that term, $\frac{f}{g}$ is whatever the quotient is up to that order. But what about the remainder? Is that zero?
 [/INST] No, the remainder is not $0$, but another power series. For example,
$$
\begin{align}
\frac{\sin(x)}{\cos(x)}
&=\frac{x-\frac{x^3}{3!}+\frac{x^5}{5!}-\frac{x^7}{7!}+O\!\left(x^9\right)}{1-\frac{x^2}{2!}+\frac{x^4}{4!}-\frac{x^6}{6!}+O\!\left(x^8\right)}\\[6pt]
&=x+\frac{x^3}{3}+\frac{2x^5}{15}+\frac{17x^7}{315}+O\!\left(x^9\right)
\end{align}
$$
where the latter $O\!\left(x^9\right)$ is the series for
$$
\tan(x)-\left(x+\frac{x^3}{3}+\frac{2x^5}{15}+\frac{17x^7}{315}\right)
$$
However, in the terminology for long division, the remainder would be
$$
\sin(x)-\cos(x)\left(x+\frac{x^3}{3}+\frac{2x^5}{15}+\frac{17x^7}{315}\right)
$$
which is another power series.
However, when dealing with power series, it is often useful, and usually simpler, to use Landau "big-O" notation.
</s>