# Step-by-step guide to finding the phase constant in simple harmonic motion

Working on some simple harmonic motion problems involving an oscillating spring/mass system ... the usual. I never really understood exactly how to find the phase constant for the $$x(t)=A\cos(\omega t+\text{phase constant}).$$ Is there a way to go about doing this that is systematic and step-by-step way, one that I can use for any problem involving simple harmonic motion?

• I see that both answers presume that you start from $A cos + B sin$. Is that true? Or are you asking for something simpler? You should tell us what you know (What level is this?). Can you give us an example of a problem you don't understand? – FGSUZ Dec 6 '18 at 0:30
• Sure! To clarify, I'm taking a course called "Optics, Waves, and Modern physics" at the second CEGEP level... so I guess that would be something you'd do in grade 12 in the States? An example of a typical problem would be, you're given some initial conditions (say: period and amplitude of the oscillator) and asked to find the equation x(t)= Acos(ωt+φ) using what you already know. For the most part it's okay, just using formulas, but when it comes to solving for φ I just can't do it! Also, we usually use only cos, there is no sin formula as far as I know. – Emiloooo Dec 6 '18 at 4:27
• Well, I see you've already chosen best answer. Anyway, amplitude and period means giving $A$ and $\omega$. That's usually enough because $\phi$ is usually irrelevant. But if you want $\phi$, you need extra data. For example "at $t=0$, the value is $x=0$. Then you'd replace $0=A\cdot\cos (\omega \cdot 0 + \phi)\ \Rightarrow \ \ 0=\cos (\phi)$. – FGSUZ Dec 6 '18 at 12:26
• Does it? Okay, I'll add it as an answer. – FGSUZ Dec 6 '18 at 21:13

Well, it depends on what information you already have. Let's start with the desired goal. You want a function for position over time in the form

$$x(t)=C\cos{(\omega t-\phi)}$$

$$x(t)=A\cos{(\omega t)}+B\sin{(\omega t)}$$

Well, we can use our trig. knowledge to rewrite our first form and set it equal to the second realizing that cosine and sine are independent functions so their coefficients must be equivalent.

$$x(t)=C\cos{(\omega t-\phi)}$$

$$\implies x(t)=C\cos{(\omega t)}\cos{(\phi)}+C\sin{(\omega t)}\sin{(\phi)}$$

$$\implies C=\frac{A}{\cos{(\phi)}}=\frac{B}{\sin{(\phi)}}$$

$$\implies \tan{(\phi)}=\frac{B}{A}$$

$$\implies \phi=\tan^{-1}(\frac{B}{A})$$

1. Say you have some initial condition $$x_0$$ and $$v_0$$ for position and velocity at time $$t=0$$. Well, we know $$A=x_0$$ and $$B=\frac{v_0}{\omega}$$ from a fairly basic deduction if we are working with the form in (1). Then, applying the above result,

$$\phi=\tan^{-1}(\frac{v_0}{\omega x_0})$$

Hope that helped!

The Simple Harmonic Oscillator ODE reads as following- $$\ddot{x}(t)=-\omega^2x(t)$$ Solution can be found by substitution- $$x(t) = e^{\lambda t}$$ yielding $$\lambda_{1,2} = \pm i\omega$$ The general solution is superposition of the two results, with coefficients that depend on initial conditions - $$x(t)=a e^{i\omega t}+b e^{-i\omega t}$$ which by Euler identity ($$e^{ix}=\cos(x)+i\sin(x)$$) also can be represented as $$x(t) = A \cos(\omega t) + B \sin(\omega t)$$ and by using trigonometric identities (mainly $$\cos(x+ y)=\cos(x)\cos(y)-\sin(x)\sin(y)$$) can be shown equivalent to $$x(t) = \alpha \cos(\omega t+\beta)$$ By applying initial conditions $$x(0) = x_0$$ and $$x'(0) = v_0$$ we get - $$x_0 = a+b=A=\alpha \cos(\beta)$$ $$v_0 = i\omega (a-b)= \omega B = -\omega \alpha\sin(\beta)$$ Solving the system of equations, for whatever representation yields -

$$a = \frac{1}{2}(x_0-i\frac{v_0}{\omega})$$ and $$b = \frac{1}{2}(x_0+i\frac{v_0}{\omega})$$

$$A = x_0$$ and $$B = \frac{v_0}{\omega}$$

$$\alpha = \frac{1}{\omega}\sqrt{v_0^2+(\omega x_0)^2}$$ and $$\beta= \arctan(-\frac{v_0}{\omega x_0})$$

You can also solve the system of equations abovefor change of representations, such as $$A(\alpha,\beta)$$, $$B(\alpha,\beta)$$ and so on.

According to the comments, in particular:

Sure! To clarify, I'm taking a course called "Optics, Waves, and Modern physics" at the second CEGEP level... so I guess that would be something you'd do in grade 12 in the States? An example of a typical problem would be, you're given some initial conditions (say: period and amplitude of the oscillator) and asked to find the equation x(t)= Acos(ωt+φ) using what you already know. For the most part it's okay, just using formulas, but when it comes to solving for φ I just can't do it! Also, we usually use only cos, there is no sin formula as far as I know.

I assume that the level is previous to University and you haven't studied differential equations.

So, altough you might have not derived the equation mathematically, you must know that the basic equation is $$x=A\cdot \cos(\omega\cdot t + \phi)$$

So you have to start the problem writing that equation.

Once you have written it, it is all about finding the values of $$A$$, $$\omega$$ and $$\phi$$. $$A$$ is probably given in the instructions. It can also be found from a graph, if the problem gives you a graph.

The second thing is the angualr frequency $$\omega$$. This is usually found by means of the period or the "true" frequency:

$$\omega=\frac{2\pi}{T} = 2\pi\nu$$

Again, it is also usual that you must read the period from a Graph.

Now, regarding the initial phase, $$\phi$$.

In real life, this parameter is sometimes irrelevant. That's because the frequency is high enough, and the system oscillates so fast that you don't care where it exactly started. After all, you're just watching oscillations, and you have to re-decide where to measure again.

Nevertheless, $$\phi$$ must be found in problems. If the instructions ask you for $$\phi$$, then you must give it as well.

And how do you do it? Well, as I said, you need extra data. You cannot know $$\phi$$ with $$A$$ and $$T$$. You need what is known as boundary condition. That is, the position for a given time. For example:

at t=2s, x=1m


Then, you go back to the equation and replace:

$$x=A\cdot \cos(\omega\cdot t + \phi)\quad \Rightarrow \quad 1m=A\cdot \cos(\omega\cdot 2s + \phi)$$

Check that both $$A$$ and $$\omega$$ are already known. That's why I started with them. You must calculate $$A$$ and $$\omega$$ first. Then you can do this replacement.

The boundary condition is especially easy if it gives you the instant $$t=0$$. This is called initial condition.

At t=0, x=0.


Then you'd substitute and find $$\phi$$:

$$0=A\cdot \cos(\omega\cdot 0 + \phi)\quad \Rightarrow \quad \phi=acos(0)=\pi/2$$

And that's how it works.

But wait, you might say: there are more solutions. And you're right. IT could also be $$acos(0)=3\pi/2$$. How can you tell?

Well, you can't tell with that data. You need one more fact. The extra fact is usually related to velocity. They might say

At t=0, x=0 and the particle is increasing its position.


Increase position is the same as saying "possitive velocity". So you also need to work with the velocity formula, which is the time derivative of the position:

$$v=\frac{d}{dt}x=A\cdot\omega\cdot\sin(\omega\cdot t+\phi)$$

So you'd have to check both solutions: $$\pi/2$$ and $$3\pi/2$$. You'll see that $$\pi/2$$ makes velocity possitive, so that one is the actual solution, and not $$3\pi/2$$.

So that's it: you must be able to find $$A$$ and $$\omega$$. Otherwise, the instructions are incomplete.

And, if they ask for $$\phi$$, you need two more data (not only one). The information you need is position and velocity for a given time.

Why is this so? If you're interested: that's because Newton's laws tell us about acceleration, and the equation $$x=A\cdot\cos(\omega\cdot t+\phi)$$ is found using Newton's laws. But they say nothing about velocity and position. We must find them separately, having just one piece of information about them. One point is enough.