# Periodicity of derivatives of function

Can we find a function $$f:\mathbb{R}\to\mathbb{R}$$ , such that it's derivatives repeat after a certain period $$T$$. For example, exponential function $$f(x)=Ae^x$$ satisfies $$f(x)=f'(x)=f''(x)=\cdots$$ and in this case we can call the period to be $$1$$.

Now, I also found a function such that $$f(x) \ne f'(x)$$ but $$f(x)=f''(x)$$ and it repeats at a period of $$2$$. The example is $$f(x)=Ae^x+Be^{-x}$$.

However, I was unable to find a function whose period is $$3$$. Although, for period $$4$$, we have trigonometric functions, but I think it would be possible to find a class of functions, in which we can find such functions according to our wish by just varying $$T$$. It seems we can manipulate exponential functions so that it is possible for any $$T$$.

Any ideas would be appreciated!

I found this too: Functions that are their Own nth Derivatives for Real $n$ but I'm not sure if this is what I am looking for, because I am looking for real valued functions, and the answer given here gives functions in terms of $$n$$th roots of unity.

This is just a basic ODE question. So we want to solve $$y'''-y=0.$$ In an ODE class you will learn that we first have to solve the characteristic polynomial $$x^3 -1 = 0.$$ I am sure you can see how it corresponds to our differential equation. A real solution would be $$1$$, and there are two complex and none-real solutions $$z_1$$ and $$z_2 = \overline{z_1}$$. Theory (which is not that hard, but not trivial either) then tells us, that all linear combinations of the functions $$f_1(t) = \exp(t), ~f_2(t) = \exp(\mathrm{Re}(z_1)t) \cos(\mathrm{Im}(z_1)t), ~f_3(t) = \exp(\mathrm{Re}(z_1)t) \sin(\mathrm{Im}(z_1)t)$$ and ONLY those solve your problem.
For any $$T$$, you can proceed the same way. You will have to solve $$x^T-1 = 0$$ in $$\mathbb{C}$$ and you will get a solution $$1$$ and $$T-1$$ others. If $$-1$$ is among the latter (i.e. iff $$T$$ is even), you add $$t \mapsto \exp(t), ~t \mapsto \exp(-t)$$ to the mix, and if not, for every complex (and non-real) pair $$z, \bar z$$ of roots you add $$t \mapsto \exp(\mathrm{Re}(z)t) \cos(\mathrm{Im}(z)t), ~t \mapsto \exp(\mathrm{Re}(z)t) \sin(\mathrm{Im}(z)t).$$ Compute for yourself that it works.
A concrete example of a real function with period 3 is the following: $$f(x) := e^x+e^{-x/2}\sin\left(\frac{\sqrt{3}}{2}x\right)+e^{-x/2}\cos\left(\frac{\sqrt{3}}{2}x\right).$$ This works because $$f$$ solves the differential equation $$y'''=y$$. However, as Meowdog points out, there is an entire class of functions that solve your problem.