How differential equations are just real? 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.
 A: 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).$$
A: 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.
