[Math] A simple question about the solution to $mx”=-kx$, mass on a spring

calculusintegrationordinary differential equations

We did this in class, and we found the solution to $m\ddot x=-kx$. I am fine with the whole solution, i.e.:

-let $\omega ^2= k/m$ to turn the problem into $\ddot x+\omega ^2x=0$ …(1);

-Guess that the solution is of the form $x(t)=Ae^{\lambda t}$ where $A$ and $\lambda$ are constants

-calculate $x$ and $\ddot x$ and plug that into (1) and find the zeros of the auxiliary polynomial to get $\lambda = ^{+}_{-}i\omega t$

So now we have two linearly independent solutions: $x_{1}(t)=A_{1}e^{i\omega t}$ and $x_{2}(t)=A_{2}e^{-i\omega t}$ so the general solution is $x(t)=A_{1}e^{i\omega t}+A_{2}e^{-i\omega t}$

From here, the professor explained that since $e^{i\omega t}=\cos(\omega t)+i\sin(\omega t)$ and $e^{-i\omega t}=\cos(\omega t)-i\sin(\omega t)$, the general solution then becomes $x(t)=B_1\cos(\omega t)+B_2\sin(\omega t)$

Here is my question: when I tried doing this at home, I couldn't understand how the $i$ disappeared from the $\sin(\omega t)$ term. Any explanations?

What I did that led me to this problem was: By the given equations for $e$, I got:

$x(t)=A_1\cos(\omega t)+A_1i\sin(\omega t)+A_2\cos(\omega t)-A_2i\sin(\omega t)=(A_1+A_2)\cos(\omega t)+(A_1-A_2)i\sin(\omega t)=B_1\cos(\omega t)+B_2i\sin(\omega t)$

where $B_!=A_1+A_2$ and $B_2=A_1-A_2$

Best Answer

For the initial general solution $A_1$ and $A_2$ will be complex and each others conjugate, assuming that the solutions are restricted to the reals.

This might give you some insight into what $B_1$ and $B_2$ will be, namely your formulas for them are correct. If you write $A_1$ and $A_2$ as

$$ A_1 = A_r + i A_i, $$

$$ A_2 = A_r - i A_i, $$

where $A_r$ and $A_i$ are real.

By using this then $B_1$ and $B_2$ become

$$ B_1 = 2 A_r, $$

$$ B_2 = 2i A_i. $$

So in your last general solution the $i$ next to the $B_2$ cancels with the $i$ in $B_2$ itself.

Related Question