Solution (source code)

= Solution

A cubic version of <Taylor's theorem> requires the corresponding higher differentiability, rather than only one <derivative>. For example, if $f$ has four continuous <derivatives> on the interval between $a$ and $x$, then
$$
f(x)=f(a)+f'(a)(x-a)+\frac{f''(a)}{2!}(x-a)^2
+\frac{f^{(3)}(a)}{3!}(x-a)^3+R_3(x),
$$
where the Lagrange form of the <Taylor remainder> is
$$
\boxed{R_3(x)=\frac{f^{(4)}(\xi)}{4!}(x-a)^4}
$$
for some $\xi$ strictly between $a$ and $x$ when they differ. At $x=a$, the remainder is zero. These hypotheses apply to both functions used below.