system
Given the following post, respond as if you're commenting on Reddit:
human
Why can we ignore the imaginary part of the simple harmonic motion displacement equation?

If you derive the displacement of a mass on a spring from the first principles F = mx''(t) = -kx(t) then you get the equation x(t) = Acos(wt) + iBsin(wt) where A and B are real constants and w is the angular frequency (sqrt(k/m)).

Why can we eliminate the second half of the equation? Is it ever used?

My working for the derivation is as follows, there may be a mistake as google is fruitless:

F = mx''(t) = -kx(t)

x''(t) + kx(t)/m = 0

let x = e^nt

n^2 e^nt + k/m e^nt = 0

n^2 + k/m = 0 as e^nt =/= 0

therefore n = +/- (-k/m)^0.5

x(t) = c1e^iwt + c2e^-iwt  (Substituting w for (k/m)^0.5

Applying Euler's identity:

e^iwt = cos(wt) + isin(wt)

x(t) = c1 + c2)cos(wt) + i(c1 - c2)sin(wt)

x(t) = Acos(wt) + iBsin(wt)
gpt
Once you get to the general solution you have to get the particular solution by applying the initial conditions. Say you know the position and velocity at t=0. This first means that A has to be equal to the initial displacement x(0). Looking at the derivative you have

X'(t=0) = iBw

So unless you have an "imaginary" initial velocity, which is an unphysical thing, B must be a function of 1/i, or in the case of 0 initial velocity, 0/i = 0.

In short, you'd need an imaginary displacement or velocity as an initial or boundary value for B to end up nonzero (or A to be imaginary).