I am finding the error bound for the interpolation of the function $f(x) = cos(\pi x) + sin (\pi x) $ on the interval $[-1, 1]$. To do this I need the maximum of the absolute value of the fourth derivative. The fourth derivative is $f^4 = \pi^4cos(\pi x) + \pi^4 sin(\pi x)$.
My first thought is that the absolute value of the maximum of this function is $\pi^4$ which occurs when $x =1$. However this is not correct. Why isn't it? How do you find the correct maximum?
To find the maximum value of $|f^{(4)}(x)|$, we simply need to check the endpoints and the critical points. Since you have already established that $|f^{(4)}(1)|=|f^{(4)}(-1)|=\pi^4$ is not maximal, then it suffices to test $x_0$ where $f^{(5)}(x_0)=0 \Longleftrightarrow \sin(\pi x_0) = \cos (\pi x_0)$. And of course, $\sin(\pi x_0) = \cos (\pi x_0) = \frac{\sqrt{2}}{2}$ at $x_0 = \frac{1}{4}$. This gives $\left|f^{(4)}\left(\frac{1}{4}\right)\right|=\pi^4\left(\frac{\sqrt{2}}{2} + \frac{\sqrt{2}}{2}\right)=\pi^4 \cdot \sqrt{2}$ .