Given:
$P_n(x)$ is the Taylor polynomial for $f(x)$ at $x=a$.
$Q_n(x)$ is a polynomial of degree at most $n$. Where $f(x)=Q_n(x)+O(x-a)^{n+1}$ as $x \to a$
Now my calculus-book states:
$R_n(x)=Q_n(x)-P_n(x)=O((x-a)^{n+1})$ as $x\to a$
By replacing $x$ with $a+(x-a)$ and expanding powers we can write $R_n(x)$ in the form $R_n(x)=c_0+c_1(x-a)+c_2(x-a)^2+...+c_n(x-a)^n$.
QUESTION:
- Is it correct to say that the order of both $Q_n(x)$ and $P_n(x)$ equals $O((x-a)^n)$ as $x \to a$?
- Then why is the order of $R_n(x)=Q_n(x)-P_n(x)=O((x-a)^{n+1})$ as $x\to a$?
- Doesn't the last statement in my calculusbook imply that $R_n(x)=O((x-a)^n)$ as $x \to a$?
EDIT
After some thought I think my confusion came from the fact that $O$ is different when $x \to a$ as opposed to $x \to \infty$.

No, the order of both equals $O(1)$ as $x\to a$ since near $a$ that is the dominant degree.
Because if you substract these two equations: $$f(x)=P_n(x)+O((x-a)^{n+1})$$ $$f(x)=Q_n(x)+O((x-a)^{n+1})$$ You'll get: $$0=P_n(x)-Q_n(x)+O((x-a)^{n+1})$$ $$Q_n(x)-P_n(x)=O((x-a)^{n+1})$$
No, the order of $R_n(x)=c_0+c_1(x-a)+c_2(x-a)^2+...+c_n(x-a)^n$ equals $O(1)$ as $x\to a$