# Taylor series expansions and L’Hospital’s rule

A brief diversion on to Taylor series expansions – partly based on the Wikipedia article on Taylor’s theorem. I have been working on this for a few days now (Fields medal always going to elude me, I’m afraid!) – and still not fully worked it all out, but it is close enough for me to post it here and hope that someone might explain the bits I have missed…

We have a function $F(x)$ which we want to approximate at a point $x_i$ by a Taylor expansion:

$F(x) = F(a) + \frac{F^{\prime}(a)}{1!}(x - a) + \frac{F^{\prime\prime}(a)}{2!}(x - a)^2 + \cdots + \frac{F^{k\prime}(a)}{k!}(x - a)^k + \cdots$

Simplifying this to the first few terms:

$F(x) = F(a) + F^{\prime}(a)(x- a) + \theta(x)(x - a)$ with < $\lim_{a \to x} \theta(x) = 0$ > should be $\lim _{x \to a} \theta(x) = 0$

It is fairly obvious. I hope, why the zeroth term is $F(a)$ and the first term is $F^\prime(a)(x - a)$: just the starting point and the distance along the tangent $F^\prime$. Then $\theta(x)$ becomes the correction for the ‘error’ this crude approximation will have. (The first term here is the linear approximation.)

Essentially, we can generate a Taylor expansion (or in my case something that starts to look very similar) with repeated application of L’Hospital’s rule. Here goes…

$F(x) = F(a) +F^\prime(a)(x - a) +\theta(x)(x-a)$

$P(x) = F(a) + F^\prime(a)(x -a)$

$F(x) = P(x) + \theta(x)(x-a)$

$\theta(x) =\frac{F(x) - P(x)}{x -a}$

Applying L’Hospital’s rule $\theta(x) = F^\prime(x) - P^\prime(x)$

$F(x) = P(x) + (F^\prime(x) - P^\prime(x))(x - a)$

$P^\prime(x) = F^\prime(a)$

$F^\prime(x) = P^\prime(x) + \theta^\prime(x)(x - a) + \theta(x)$

$F(x) = P(x) + (\theta(x) + \theta^\prime(x)(x - a))(x-a)$

$F(x) = P(x) + \theta(x)(x -a) + \theta^\prime(x)(x - a)^2$

Starting to look like a Taylor expansion now…

Update: Professor Rubin comments (I have moved this up here both because he knows what he is talking about and because I can get the LaTeX to work):

In the second formula, I’m pretty sure you want $x \rightarrow a$ rather than $a \rightarrow x$. Unfortunately, I think you went off the rails around “Applying L’Hospital’s rule”: F’(x) – P’(x) would be the $\lim_{x \rightarrow a} \theta(x)$, which (assuming continuity of $\theta$) would be $\theta(a)$, not $\theta(x)$. If you go back to the first line after “Here goes…” and differentiate (we’ll assume $\theta$ is arbitrarily smooth), you get $F^\prime(x) - P^\prime(x) = \theta(x) + \theta^\prime(x)(x-a)$.

1. In the second formula, I’m pretty sure you want $$x \rightarrow a$$ rather than $$a \rightarrow x$$. Unfortunately, I think you went off the rails around “Applying L’Hospital’s rule”: F'(x) – P'(x) would be the $$\lim_{x \rightarrow a} \theta(x)$$, which (assuming continuity of $$\theta$$) would be $$\theta(a)$$, not $$\theta(x)$$. If you go back to the first line after “Here goes…” and differentiate (we’ll assume $$\theta$$ is arbitrarily smooth), you get $$F'(x) – P'(x) = \theta(x) + \theta'(x)(x-a)$$.
1. Isn’t that what I have anyway? I know that means $\theta(x) = \theta(x) + \theta^\prime(x)(x-a)$ also, which appears wrong!!