What is the differential equation, given a certain solution?

I am a little stuck on this problem. The question asks, Write a first order autonomous differential equation such that $y(t)=\cos(t)$ is a solution.

I understand that first order means that it contains only the first derivative of the dependent variable and autonomous means it only depends on $y$.

So $dy/dt=y(t)$ and since $\cos(t)$ is a solution $dy(t)/dt= -\sin(t)$. So the right hand side of the equation must must equal $-\sin(t)$ when $\cos(t)$ is plugged in.

• Perhaps $y^2+y'^2=1$? – Ian Jun 24 '15 at 0:17
• Since a solution of a first-order autonomous d.e. can't have derivative $0$ without being constant, this can't work on an interval that contains any odd multiple of $\pi/2$. – Robert Israel Jun 24 '15 at 0:20
• @RobertIsrael Are you sure that works when the right hand side isn't Lipschitz? For instance it seems that you can make this work with something like $y'=\sqrt{1-y^2}$ with oscillatory sign. – Ian Jun 24 '15 at 0:27
• @RobertIsrael There is also the classic $\frac{dy}{dt}=3y^{2/3}$, which can "switch on" from zero after however long you want. – Ian Jun 24 '15 at 0:47
• @ian looks like y′=sqrt(1-y^2) is the right answer – Sanat Shah Jun 24 '15 at 0:47