If we keep differentiating $\sin x$ we eventually arrive back at $\sin x$:
$$ \begin{align} y &= \sin x \\ \frac{dy}{dx} &= \cos x \\ \frac{d^2y}{dx^2} &= -\sin x \\ \frac{d^3y}{dx^3} &= -\cos x \\ \frac{d^4y}{dx^4} &= \sin x \end{align} $$
It has to be differentiated 4 times before it gets back to itself
I was wondering, what function has the longest chain of derivatives before it gets back to itself?