So I know that the differential equation of a simple harmonic oscillator is
$\dfrac{d^2x}{dt^2}=-\omega^2x$
and it's solution is $y = A\sin(\omega t+\phi)$.
Now I learned for a solution with $n$ independent constants, the differential equation will be of order $n$.
In this case, there are 3 independent constants, $A, \omega, \phi$, so shouldn't the differential equation be of order three? How is it two?
Edit:
Also when I start with the solution itself
$y=A\sin(\omega t + \phi)$
$y'=A\omega\cos(\omega t + \phi)$
$\dfrac{\omega^2y^2}{A^2\omega^2}+\dfrac{y'^2}{A^2w^2} = 1$
$\omega^2\cdot2yy'+2y'y''=0$
$\omega^2=-\dfrac{y''}{y}$
$0=\dfrac{yy'''-y''y'}{y^2}$
$yy'''=y''y'$
Note that $A$ and $\phi$ are constants depending upon the initial conditions, which is consistent with the equation of order $2$, while $\omega$ depends solely upon the system that is the given equation $\ddot x=-\omega x$.