"Complex Variables Method" in Diff. Eq. - Justification and physical meaning?

A common method of simplifying calculations that involve differential equations - particularly involving oscillation - is to replace $\cos(\theta)$ with $e^{i \omega t}$, evaluate, and then take the real part at the end. (Or, symmetrically, replacing $\sin(\theta)$ and taking the imaginary part.)

1. My question is - why does this work? I can easily imagine an operation that gives different values depending on when you take the real part: $3\times5=15$, but $\text{Re}\left((3+i)(5+i)\right)=14$.

2. What does a complex amplitude physically mean?

(Title taken from Wikipedia, where it is used in their derivation of the steady-state solution of a SHO.)

• This probably should be on math.stackexhange. Also, are you aware of the Euler's formula that relates $\cos$ and $\sin$ with $\exp$? Sep 13, 2013 at 2:06
• Yes, I am. It is true that $cos \theta = \text{Re}\left(e^{i\theta}\right)$, but it is also true that $3 = \text{Re}(3+i)$, and that doesn't stop the latter example from giving false results. Sep 13, 2013 at 2:09
• It's also true that $\cos 2n\pi=\cos0$ and $e^{i\cdot2n\pi}=e^{i\cdot0}$. Sep 13, 2013 at 2:11

When one uses complex variables in this way one never multiplies two variables because the whole system is linear: if $z$ is the oscillating variable and you choose to represent it by a complex number, then things like $z\times z$ don't arise in a linear equation, so you don't get the kind of contradiction you astutely and clearly pointed out above. If the variable $z = r \exp(-i\,\omega\,t + i\,\phi)$ is multiplied by a complex coefficient $\alpha = a e^{i\,\theta}$ then this is done to impart (1) a scaling of amplitude by the real proportionality constant $a$ and (2) a phase shift of $\theta$ radians, i.e. a delay given by a fraction $\theta / (2\pi)$ of the oscillation period: there is no physical meaning to taking the real part before the scaling and delaying operation is imparted and the two complex numbers $\alpha$ and $z$ have been fully multiplied. So the procedure in this technique is that complex quantities are transformed to the corresponding real ones by taking the real part at the very end of the calculation, never before.
What does all this work? It's simply linearity: any multiple of the solution is also a solution and any sum of two solutions is also a solution. The general steady-state solution to a constant coefficient linear equation with forcing term ("input") $\cos(\omega\,t)$ is always a function of the form $a\cos(\omega\,t + \phi) = a \cos\phi \cos(\omega\,t) - a \sin\phi \sin(\omega\,t)$, so we can see that our "solution space" is a vector space spanned by the two functions $\cos(\omega\,t)$ and $\sin(\omega t)$. One is just simply changing basis and using the functions $\exp(i\,\omega\,t) = \cos(\omega\,t) + i\,\sin(\omega t)$ and $\exp(-i\,\omega\,t) = \cos(\omega\,t) - i\,\sin(\omega t)$ instead: by linearity is a perfectly valid. Moreover, if the linear system has real coefficients, then the solution corresponding to an input of the "negative frequency" wave $\exp(i\,\omega\,t)$ is simply the complex conjugate of the solution corresponding to the input of the "positive frequency" wave $\exp(-i\,\omega\,t)$. So we can deduce the system's behaviour in response to any forcing term of the form $a\,\cos(\omega\,t) + b\, \sin(\omega t)$ by simply deducing the behaviour in response to the prototypical $\exp(-i\,\omega\,t)$. We take the real part at the end of a calculation what we are doing in detail is this: we're averaging our solution with its complex conjugate, i.e. in one step we are inferring the system's behaviour for an input of the form $\exp(+i\,\omega\,t)$ and averaging with our solution, so we never really see the $\exp(+i\,\omega\,t)$ terms.