Complex roots of second order ODE comprehension I am learning the second-order differential equation come across the general solution of complex roots. 
If the $\lambda$ are of $a+ib$ and $\overline{\lambda}=a-ib$, the corresponding solutions are $z(t)=e^{(a+ib)t}$ and $\overline{z(t)}=e^{(a+ib)t}$
By Euler's formula can expand
$$
z(t)=e^{at}[\cos(bt)+i \sin(bt)]
\\
\overline{z(t)}=e^{at}[\cos(bt)-i \sin(bt)]
$$
The general solution is of the form $y(t)=C_1 z(t)+C_2 \overline{z(t)}$
then $z(t)=y_1(t)+i y_2(t) $
$\overline{z(t)}=y_1(t)-i y_2(t)$ and $y_1(t)=e^{at} \cos(bt)$ and $y_2(t)=e^{at} \sin(bt)$
Then $y_1(t)=\frac{1}{2}(z(t)+\overline{z(t)}$ and $y_2(t)=\frac{1}{2i}(z(t)-\overline{z(t)})$
Then the general solution is $$y(t)=A_1 y_1(t)+A_2 y_2(t)=A_1 e^{at} cos(bt)+ A_2 e^{at} sin(bt)$$

I understand the Euler's formula, but I don't follow why they claim $z(t)=y_1(t)+i y_2(t) $,
  $\overline{z(t)}=y_1(t)-i y_2(t)$ and $y_1(t)=e^{at} \cos(bt)$ and $y_2(t)=e^{at} \sin(bt)$
And also I don't follow why $y_1(t)=\frac{1}{2}(z(t)+\overline{z(t)})$ and $y_2(t)=\frac{1}{2i}(z(t)-\overline{z(t)})$.
"Then the general solution is $y(t)=A_1 y_1(t)+A_2 y_2(t)=A_1 e^{at} \cos(bt)+ A_2 e^{at} \sin(bt)$"

In the end, how does it get rid of imaginary $i$? 
 A: Since $$z(t) = e^{at}cos(bt) + ie^{at}sin(bt)$$ we can let $$y_{1} = e^{at}cos(bt)$$ and let $$y_{2} = e^{at}sin(bt)$$
Then I hope you can see that $z(t) = y_1(t) + iy_2(t)$ and similarly that $\overline{z(t)} = y_1(t) - iy_2(t)$.
We now use that fact that for any complex number $w$,
$$Re(w) = \frac{1}{2}(w+\overline{w})$$ $$Im(w) = \frac{1}{2i}(w-\overline{w})$$
This also applies to complex functions which gives us the result that $$y_1(t)=\frac{1}{2}(z(t)+\overline{z(t)})$$ 
and $$y_2(t)=\frac{1}{2i}(z(t)-\overline{z(t)})$$
Then you have to make an argument for why $y_1(t)$ and $y_2(t)$ are linearly independent, but once you have established that they are, the general solution will take the form $$y(t)=A_1 y_1(t)+A_2 y_2(t)=A_1 e^{at} cos(bt)+ A_2 e^{at} sin(bt)$$
Note how $Re(z(t))$ and $Im(z(t))$ are both real functions (you can see this either from their construction or from their explicit definition) so there will be no $i$'s hanging around at the end.
Hope this helps :)
P.S. This is my first answer on here so apologies for any bad formatting
