The problem I am working on is:
Find the solution of the given initial-value problem.
$$\frac{d^2y}{dt^2}+4\frac{dy}{dt}+20y=-3\sin2t$$
$$y(0)=y'(0)=0$$
The part I am having trouble on, is the complexification:
How do I turn $$\frac{d^2y}{dt^2}+4\frac{dy}{dt}+20y=-3\sin2t$$ into
$$\frac{d^2y}{dt^2}+4\frac{dy}{dt}+20y=e^{it}$$
I have tried looking up similar examples on Math SE and Google, but can't find anything that helps, and my textbook just shows how to turn $\sin t$ into $e^{it}$.
The equation you have is equivalent to the imaginary part of
$$ y'' + 4y' + 20y = -3e^{2it} $$
If you don't understand why, refer to Euler's formula $$ e^{ia} = \cos a + i\sin a $$
We can look for a particular solution of the form $y_p = Ae^{2it}$ where $A$ is some complex number. If you don't know why it has this form, refer to the method of undetermined coefficients.
Plugging in gives $$ -4Ae^{2it} + 8iAe^{2it} + 20Ae^{2it} = -3e^{2it} $$
Dividing through by the exponential we get \begin{align} (16+8i)A &= -3 \\ A &= -\frac{3}{8(2+i)} = -\frac{3}{40}(2-i) \end{align}
Taking the imaginary part of the solution $$ y_p(t) = \Im\left\{ -\frac{3}{40}(2-i)e^{2it} \right\} = -\frac{3}{20}\cos(2t) - \frac{3}{40}\sin(2t) $$
For the full solution, the characteristic polynomial is $$ r^2 + 4r + 20 = 0 $$ which has solutions $r = -2 \pm 4i$. Therefore $$ y(t) = e^{-2t}\big(c_1 \cos (4t) + c_2\sin (2t) \big) -\frac{3}{20}\cos(2t) - \frac{3}{40}\sin(2t) $$
You can find the constants using the given initial conditions.
A different way using complex methods is start first the the full complex function $$ y(t)_{\Bbb C} = C_1 e^{(-2+4i)t} + C_2 e^{(-2-4i)t} - \frac{3}{40}(2-i)e^{2it} $$
where $C_1$ and $C_2$ are complex, then the derivative is easier to compute \begin{align} y(0)_{\Bbb C} &= C_1 + C_2 - \frac{3}{40}(2-i) = 0 \\ y'(0)_{\Bbb C} &= (2+4i)C_1 + (-2-4i)C_2 - \frac{3}{20}i(2-i) = 0 \end{align}
Proceed as usual and take the imaginary part at the end.