A cubic would be a bad approximation if the function is too bumpy. Suppose we try to approximate $f(x) = \sin 10x$ by a cubic $g(x) = a + bx + cx^2 + dx^3$ on the interval $x \in [0, 2\pi]$. Then we have a calculus problem:
$$ \min_{a,b,c,d \in \mathbb{R}}\max_{x \in [0,2\pi]} \left|\, \sin 10x - \big(a + bx + cx^2 + dx^3\big)\,\right| $$
I'm pretty sure the best cubic you could find would be pretty lousy (I'm looking for a bound). Instead we could take a smaller interval:
$$ \min_{a,b,c,d \in \mathbb{R}}\max_{x \in [0,2\pi]} \left|\, \sin x - \big(a + bx + cx^2 + dx^3\big)\,\right| $$
The first step would be to take the derivative and set it to zero (to find the extrema):
$$ \cos x = b + 2cx + 3dx^2 $$
Or even a guess-and-check method might work... how about $g(x) = x(x-\pi)(x-2\pi)$ ? Can you find a better choice of $(a,b,c,d)$ ?
I found these numbers with a computer:
- $f(x) = \sin 2\pi x$
- $g(x) = 20\,x\,(x - \frac{1}{2})\,(x - 1)$
Which is which?
