I want to ask how to prove a little property about limits. In calculus course such property is frequently used: If $\lim_{x\to 1}\frac{P(x)}{(x-1)^2}$ exists, where $P(x)$ is a polynomial, then $(x-1)^2\mid P(x)$. How to rigorously show that?
PS: Notice the inference direction. It is clear that if $(x-1)^2\mid P(x)$, then $\lim_{x\to 1}\frac{P(x)}{(x-1)^2}$ exists. But how to prove the converse?
You can write $P(x)$ as $(x-1)^2Q(x)+ax+b$, with $Q(x)\in\mathbb R[x]$ and $a,b\in\mathbb R$. So,$$\lim_{x\to1}\frac{P(x)}{(x-1)^2}=\lim_{x\to1}\left(Q(x)+\frac{ax+b}{(x-1)^2}\right).\tag1$$Since $\lim_{x\to1}Q(x)=Q(1)$, the limit $(1)$ exists if and only if the limit$$\lim_{x\to1}\frac{ax+b}{(x-1)^2}\tag2$$exists. But if the limit $(2)$ exists, then $a\times1+b=0(\iff a+b=0)$, in which case$$\lim_{x\to1}\frac{ax+b}{(x-1)^2}=\lim_{x\to1}\frac{ax-a}{(x-1)^2}=\lim_{x\to1}\frac a{x-1},$$and this limit exists if and only if $a=0$. So, $a=b=0$, and therefore $P(x)=Q(x)(x-1)^2$.