2

If I have a differential equations of the form $$\frac {d^2y}{dt^2}=\alpha^2y$$

Assuming the roots of the characteristic equation is complex the solution to the differential equation is: $$y=C_1e^{j\alpha t}+ C_2e^{-j\alpha t}$$ and after that we take only the real part of the solution. Why do we take only the real part of the solution?

I'm solving the wave equation and this confusion stems from the solution of the Helmholtz wave equation.

Qmechanic
  • 220,844
Orpheus
  • 335

2 Answers2

7

This is a common question in classical physics.

The idea is that we are really treating a problem where everything is real number-valued, but complex numbers offer convenient mathematical short-cuts.

In the present example you have a differential equation $$ \frac{d^2y}{dt^2} = \alpha y $$ and let's agree at the outset that all of $y$, $t$ and $\alpha$ are real. The idea is that we can introduce a complex variable, let's call it $z$, which also satisfies the differential equation we are interested in: $$ \frac{d^2z}{dt^2} = \alpha z . $$ Now bring in the fact that $z$ can always be written $$ z = f + j g $$ where $f$ and $g$ are real. Then we have $$ \frac{d^2}{dt^2}( f + j g) = \alpha (f + j g) . $$ This gives $$ \left(\frac{d^2 f}{dt^2} - \alpha f\right) + j \left( \frac{d^2 g}{dt^2} - \alpha g\right) = 0 $$ where everything in the equation is real apart from $j$. But the only way a complex number can be zero is if both its real and imaginary parts are zero, so we have $$ \frac{d^2 f}{dt^2} = \alpha f $$ and $$ \frac{d^2 g}{dt^2} = \alpha g . $$ The lesson is if a complex function satisfies a linear differential equation, then its real and imaginary parts also satisfy that same differential equation. That is the thought which you need to ponder, and which lies at the heart of a lot of applications of complex analysis to physics and engineering.

The general idea is that we find a complex solution, because that is convenient to do, and then take the real part at the end, since we know that it too will be a solution. We can set this up at the start by announcing "the actual physical thing I want to find out about ($y(t)$ in your example) is the real part of this complex thing which I am introducing". We get so used to doing this that often we just carry on using the same symbol (such as $y$) rather than going via another name (such as $z$). People then begin to get into a muddle between what is the function they are really finding out (i.e. the real function) and what is the mathematical tool they have introduced (the complex function).

Andrew Steane
  • 65,285
3

There's two ways to look at it. The first one is as you said: we take the real part of the general solution. We can verify that if $\alpha^2$ is real, the real and imaginary parts of the general solution also happen to solve the differential equation on their own. So the real part is a solution to the differential equation.

Personally, I dislike this way of looking at it. It feels unmotivated, and it leaves open the question of wether we actually found the most general real solution. That's why I like to look at it a different way: Instead of taking the real part of the general complex solution, we take all the real solutions among the general complex solution. Since every real solution is also a complex solution, this guarantees that we actually get the general real solution. This leads us to the question:

For which $C_1, C_2$ is $y(t)=C_1\mathrm e^{\mathrm i\alpha t}+C_2\mathrm e^{-\mathrm i\alpha t}$ real?

To answer the question, we first write our coefficients in polar coordinates to get $C_1=R_1\mathrm e^{\mathrm i\varphi_1}$ and $C_2=R_2\mathrm e^{\mathrm i\varphi_2}$. This gives us

$$\begin{align}y(t)&=R_1\mathrm e^{\mathrm i(\alpha t+\varphi_1)}+R_2\mathrm e^{\mathrm i(\alpha t+\varphi_2)}\\ &=R_1[\cos(\alpha t+\varphi_1)+\mathrm i\sin(\alpha t+\varphi_1)]+R_2[\cos(\alpha t+\varphi_2)+\mathrm i\sin(\alpha t+\varphi_2)]\\ &=R_1\cos(\alpha t+\varphi_1)+R_2\cos(\alpha t+\varphi_2)~ +~ \mathrm i[R_1\sin(\alpha t+\varphi_1)+R_2\sin(\alpha t+\varphi_2)]. \end{align}$$

This is real if and only if

$$R_1\sin(\alpha t+\varphi_1)+R_2\sin(\alpha t+\varphi_2)=0,$$

which is the case if and only if $\varphi_2=-\varphi_1$ and $R_1=R_2$. In other words, $C_2=\overline C_1$. But then we have

$$\begin{align}y(t)&=C_1\mathrm e^{\mathrm i\alpha t}+C_2\mathrm e^{-\mathrm i\alpha t}\\ &=\frac{1}{2}\left(C_1\mathrm e^{\mathrm i\alpha t}+C_2\mathrm e^{-\mathrm i\alpha t}\right)~+~\frac{1}{2}\left(C_1\mathrm e^{\mathrm i\alpha t}+C_2\mathrm e^{-\mathrm i\alpha t}\right)\\ &=\frac{1}{2}\left(C_1\mathrm e^{\mathrm i\alpha t}+\overline C_1\mathrm e^{-\mathrm i\alpha t}\right)~+~\frac{1}{2}\left(\overline C_2\mathrm e^{\mathrm i\alpha t}+C_2\mathrm e^{-\mathrm i\alpha t}\right)\\ &=\frac{1}{2}\left(C_1\mathrm e^{\mathrm i\alpha t}+\overline{C_1\mathrm e^{\mathrm i\alpha t}}\right)~+~\frac{1}{2}\left(\overline{C_2\mathrm e^{-\mathrm i\alpha t}}+C_2\mathrm e^{-\mathrm i\alpha t}\right)\\ &=\frac{1}{2}\cdot 2\operatorname{Re}(C_1\mathrm e^{\mathrm i\alpha t})~+~\frac{1}{2}\cdot 2\operatorname{Re}(C_2\mathrm e^{-\mathrm i\alpha t})\\ &=\operatorname{Re}(C_1\mathrm e^{\mathrm i\alpha t})+\operatorname{Re}(C_2\mathrm e^{-\mathrm i\alpha t})\\ &=\operatorname{Re}(C_1\mathrm e^{\mathrm i\alpha t}+C_2\mathrm e^{-\mathrm i\alpha t}) \end{align}$$

So we can find the general real solution by taking the real part (or twice the real part, but the factor of 2 doesn't matter) of the complex solution.

Vercassivelaunos
  • 2,918
  • 8
  • 21