For sure this kind of stuff has a name, but I can't remember.

So as to better understand what I mean, let's get concrete:

Consider the linear ODE: $$y''+4\,y = 0$$

the characteristic polynomial has complex solutions: $$\lambda^2+4 = 0 \quad \Rightarrow\quad\lambda_{1/2} = \pm 2\,i$$

Now I just took it for granted that u can express such solutions as $$y = \mathrm{C_1}\,\cos(2\,x)+\mathrm{C_2}\,\sin(2\,x)$$

But if I were to plug the complex into the usual combination of exponentials: $$\mathrm{C_1}\,e^{+2\,i}+\mathrm{C_2}\,e^{-2\,i} = \\\\ \mathrm{C_1}\,\cos(2\,x)+\mathrm{C_2}\,\cos(-2\,x)+\mathrm{C_1}\,i\,\sin(2\,x)+\mathrm{C_2}\,i\,\sin(-2\,x)$$

that doesn't look to me as close as the solution.

Furthermore to add even more confusion solving the ODE with MATLAB yields: $$y = \mathrm{C_1}+\mathrm{C_2}\,e^{-4\,x}$$ Apologies: this is the solution of $y''+4\,y'= 0$

As I mentioned I didn't really keep myself busy with the complex part of differential equation. I hope u might explain to me how all these solutions come together.

  • 3
    $\begingroup$ Did you mean $y''-4y=0$ or $y''+4y=0$? $\endgroup$ May 20, 2021 at 19:20
  • 4
    $\begingroup$ The characteristic polynomial for $y''+4y=0$ is $\lambda^2+4=0$. The solution to $y''+4y'=0$ is $c_1+c_2e^{-4t}$; probably you entered the wrong equation into MATLAB. $\endgroup$ May 20, 2021 at 19:22
  • 1
    $\begingroup$ Oh: to see why this is the same as that first note that $\cos(-2t)=\cos(2t)$ and $\sin(-2t)=-\sin(2t)$; then collect terms as below... $\endgroup$ May 20, 2021 at 19:32
  • 1
    $\begingroup$ One way to look at it is that $C_1e^{at}+C_2e^{bt}$ where a and b are complex conjugates is real for every real $t$ with the necessary and sufficient condition (-I think-) that $C_1$ and $C_2$ are also complex conjugates of each other. You might visualize this on an argand diagram with 2 vectors rotating at opposite frequencies and exponentially growing at the same time whose sum must have a y component (i.e. imaginary component) of zero. $\endgroup$ May 20, 2021 at 19:42

2 Answers 2


There are various typos in your question and in what you entered into MATLAB. IF we're talking about $y''+4y=0$:

Yes, the general solution is $c_1e^{2it}+c_2e^{-2it}$. Do what you did and then also collect common terms: $$c_1e^{2it}+c_2e^{-2it}=(c_1+c_2)\cos(2t)+(ic_1-ic_2)\sin(2t)=d_1\cos(2t)+d_2\sin(2t).$$

  • 2
    $\begingroup$ Notably this means that if the solution is real then $c_1$ and $c_2$ will be conjugates of one another and typically will have both a nonzero real part and a nonzero imaginary part. This sometimes confuses students who expect $c_1$ and $c_2$ to be real when the solution is real. $\endgroup$
    – Ian
    May 20, 2021 at 19:28
  • 1
    $\begingroup$ I don't know what's "typical", but yes if the solution's real then $c_2=\overline{c_1}$, not just typically. $\endgroup$ May 20, 2021 at 19:31
  • 1
    $\begingroup$ Sorry, I started with "typically" in the sentence and then was more explicit with "if the solution is real" and forgot to remove the word "typically". $\endgroup$
    – Ian
    May 20, 2021 at 19:31
  • 1
    $\begingroup$ confusion over what's real is why I didn't allow them to give the apparently-complex form of the answer when I used to teach this stuff $\endgroup$ May 20, 2021 at 19:34
  • $\begingroup$ First of I'm sorry for the typos, I didn't know where my head was at. Second, thank you for clarify my uncertainty despite of my mistakes. The core of my problem was that I didn't see a way of how the complex number $i$ vanishes. But since it's gathered with the constants it's clear now. Thank you! $\endgroup$
    – Leon
    May 20, 2021 at 20:19

If you look at the ODE as a question in real numbers, then any solution, if any at all, will have to be, by definition, a real function. The general ODE theory or more specifically the theory of linear DE and first-order systems of linear DE, tells that such real solutions exist and form a 2-dimensional vector sub-space in the space of real twice differentiable functions. This all to tell that there is nothing suspicious in getting real solutions out of this equation.

All of the above remains true if you change the field of scalars to the complex numbers, getting a 2-dimensional subspace in the complex vector space of complex valued $C^2$ functions. This is the frame for the trial exponentials with complex roots of the characteristic equation as exponential factors. Then you can argue in several ways how to get to the subset of real solutions. For instance, as the equation is real, to any complex solution also its complex conjugate function is a solution. In consequence of the linearity, real and imaginary parts are also solutions, and are real functions.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .