It's been about two years since I last took Calc 2, and I'm trying to brush up on some of the old material using Khanacademy. I watched a couple intro videos on the subject and understand Taylor series at an intuitive level, without memorizing definitions.
Out of curiosity, I wanted to see what would happen if one wanted to (for some reason) approximate a function as simple as $f(x) = x^3$ using a Maclaurin series. I was wondering if I'd get something complex that roughly approximates this function and, if so, how far off I would be:
$f(x) = f'(0) + f'(0)x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 + \frac{f''''(0)}{4!}x^4 + 0 + 0 + ...$
Okay, so here are the derivatives:
$f'(x) = 3x^2; f'(0) = 0$
$f''(x) = 6x; f''(0) = 0$
$f'''(x) = 6; f'''(0) = 6$
$f''''(x) = 0; f''''(0) = 0$
So it becomes:
$f(x) = 0 + 0 + 0 + \frac{6x^3}{6} + 0 + ...$
And that's just $f(x) = x^3$, the original function.
Question: Why does this end up being an exact match and not just an inaccurate "approximation" for a simple polynomial function?
Because, as you can check, if $f(x)=a_0+a_1x+a_2x^2+\cdots+a_nx^n$, then$$f^{(k)}(0)=\begin{cases}k!a_k&\text{ if }k\leqslant n\\0&\text{ otherwise.}\end{cases}$$Therefore,$$f(x)=\sum_{k=0}^\infty\frac{f^{(k)}(0)}{k!}x^k.$$