TITLE: Symmetry between function and its derivatives
QUESTION [5 upvotes]: $f(x)=\sin x$ is a well known function which satisfies the differential equation
$$\frac{df}{dx}=f(\pi/2-x)$$ with the initial condition $f(0)=0$; I am just curious to know are these all? If not,what kind of properties functions should satisfy?
My attempt:
Putting $y=\pi/2-x$ does not seem useful to me.

REPLY [2 votes]: Since $\dfrac{df}{dx}=f(\pi/2-x)$, we have $\dfrac{d^2f}{dx^2}=-f(x)$. 
$$2\dfrac{d^2f}{dx^2}\dfrac{df}{dx}+2\dfrac{df}{dx}f=0$$
We deduce that $$(\dfrac{df}{dx})^2+f^2=C^2$$
Suppose that $C$ is a real number, then we have $$\dfrac{df}{\sqrt{C^2-f^2}}=dx$$ 
After integrating both sides, we deduced that $$f(x)=C\sin (x+\phi)$$