How many constants are in the equation $x=A\times\cos(nt+p)$? I was reading about ordinary differential equations. I got stuck on an example problem. The example was about forming a DE from simple harmonic motion given by $x=A\times\cos(nt+p)$.
The example stated that this equation has two arbitrary constants ($A$ and $p$). Then it went onto form a second order DE from it.
I did not understand why 'n' is not considered a constant although it is treated as a constant during differentiation.
I read that this is the equation of simple harmonic motion. This means n is supposed to be the angular frequency (which need not be an integer).
If n is indeed a constant, shouldn't we try to eliminate n as well and go to a third order DE ?
Please help.
 A: For a second order ODE like you have here, to uniquely specify a solution of the differential equation, we need to know two initial conditions. These are of the form $x(0) = x_0$, and $\dot x(0) = v_0$. For the case of the harmonic oscillator, these are manifested in the coefficients $A, B$ of the general solution
$x(t) = A\cos (n t) + B\sin(n t)$, or as an unspecified amplitude $C$ and phase angle $p$: $x(t) = C\sin(nt + p)$. These two solutions are equivalent in the sense that $A$ and $B$ are determined in the same way that $C$ and $p$ are determined with our two initial conditions.
We always know $n$. This is the frequency, or angular frequency of the oscillator.
Edit.
Assuming you have seen that $x(t) = A\cos (n t) + B\sin(n t)$ is the most general solution to the harmonic oscillator, let's see how $x(t) = C\sin(nt + p)$ is equivalent. Define $C = \sqrt{A^2 + B^2}$. Then, $x(t) = A\cos (n t) + B\sin(n t) = C\left[\frac{A}{C}\cos nt + \frac{B}{C} \sin nt\right]$. Since $|A/C|, |B/C| \leq 1$, $A/C = \sin p$ and $B/C = \cos p$ for some $p \in [0,2\pi)$. We have $C\left[\frac{A}{C}\cos nt + \frac{B}{C} \sin nt\right] = C\left[\sin p\cos nt + \cos p \sin nt\right] = C\sin(nt + p)$, where all we have done in the last equality is used the identity $\sin\alpha\cos\beta + \cos\alpha\sin\beta = \sin(\alpha + \beta)$.
So, you either specify the coefficients $A$ and $B$ or the coefficients $C$ and $p$, and each case is equivalent.
A: Don't think too much. n is also a constant if the variables are x and t.
Its the fault of the person who made that question. He must have forgotten to mention so.
