We know from Itos formula, if $X$ is a continuous local martingale and $f$ has two continuous derivatives, we can write $f(X_t)$ as
$$ f(X_t) = \int_0^t f'(X_s) dX_s + \frac{1}{2} \int_0^t f''(X_s) d\langle X \rangle_s + f(X_0) $$
Now my stochastic calculus book says:
"$f(X_t)$ is always a semimartingale but it is not a local martingale unless $f''(x) = 0 $ for all $x$"
For me its clear that $f(X_t)$ is a semimartingale, since the first integral is a continuous local martingale and the second integral is of bounded variation. But my question is, why can $f(X_t)$ only be a local martingale if $f''(x)$ is equal to zero. Why can the second integral not be a continuous local martingale?
This follows from the following theorem:
(For a proof see e.g. René Schilling/Lothar Partzsch: Brownian motion - An Introduction to Stochastic Processes.)
Since $$M_t := \int_0^t f''(X_s) \, d\langle X \rangle_s$$ has continuous sample paths and is of bounded variation, this means that $M_t$ cannot be a (locale) martingale (unless it is constant).