# Quadratic approximation of a function

Here en.wikipedia.org/wiki/Taylor_theorem i have found that linear approximation of f at the point a is

$$P_1(x)=f(a)+f'(a)(x-a)$$

For the quadratic approximation the quadratic polynomial is

$$P_2(x)=f(a)+f'(a)(x-a)+\frac{f''(a)}{2}(x-a)^2$$

Please explain me how did we get the 1/2 multiplier near the second derivative.

-

It comes from the fact that $f''(x)$ at $a$ should come to $f''(a)$ even if we go by the expansion instead of just by the definition. If we put

$f(x) = a_0 + a_1(x-a) + a_2(x-a)^2 + a_3(x-a)^3 + ...$

then

$f''(x) = 2a_2 + 6a_3(x-a) + ...$

Evaluating at $x = a$, $f''(a) = 2a_2$. So $a_2 = f''(a)/2$. So basically the $2$ here comes from the multiplier of $2$ for $xdx$ when differentiating $x^2$.

-

We want the second derivative at x of the approximation to be the second derivate at x of f. For that, if we write: g(x) = f(x0)+a*f'(x0)(x-x0)+b)f''(x0)(x-x0)(x-x0) and we derive twice, we get g''(x) = f''(x0)*2a g''(x0)=f''(x0) 2a=1 a=1/2. in general, if we want an approximation which is a polynomial of degree N in which all the derivatives of the function and the approximation at x0 at N are these, the approximation must be this one. to prove that, just write the approximation as a polynimal of (x-x0), and see that g(x) = f(x0)+a(1)f'(x0)(x-x0)+a(2)f''(x0)(x-x0)^2+...+a(N)f(N derivatives)(x0)(x-x0)^N, and we derive N times, we get g(N derivatives)(x) = N!*a(N)*f(N derivatives)(x) thus a(N)=1/N!

-