L'Hôpital's rule to approximate a function I came across a simple problem:
Show $\sqrt{1+x}\approx 1 + \frac{x}{2}$ holds near $0$.
Interesting to me was the way the author solved this using l'Hôpital's rule:
Since $\lim_{x\rightarrow 0}\frac{\sqrt{1+x}-(1+\frac{x}{2})}{x^2}$ exists and is constant ( by l'Hôpital's rule), we can conclude $\sqrt{1+x}=1+\frac{x}{2}+\mathcal{O}(x^2)$.
This seems intuitive. My question is, how to formally come up with the limit expression? Does this technique generalize?

Well, the idea is to expand the LHS into Taylor series around the point in question. Here, expanding $f(x) = (1+x)^{1/2}$ to Taylor series, first term is $f(0) = 1$, then
$$
f'(x) = \frac{1}{2} (1+x)^{-1/2},
$$
so $f'(0) = 1/2$. Along the same lines,
$$
f''(x) = \frac{-1}{4} (1+x)^{-3/2},
$$
and $f''(0) = -1/4$. Thus, for a 2 term expansion, you get
$$
f(x) \approx f(0) + xf'(0) = 1+x/2 + O(x^2),
$$
or for a 3-term expansion,
$$
f(x) \approx f(0) + xf'(0) + \frac{x^2}{2!} f''(0) = 1+x/2 - \frac{x^2}{8} + O(x^3).
$$

The reason why this works, is if $f(x) = \sum_{k=0}^N a_k x^k + O(x^{N+1})$ (where $a_k$ you get from Taylor series), then
$$
\frac{f(x) - \sum_{k=0}^{N-1} a_k x^k}{x^N} = \frac{a_N x^N + O(x^{N+1})}{x^N} = a_N + O(x) \to a_N,
$$
as $x \to 0$.
