This page demonstrates the steps in finding the step response of an underdamped second order system. The overdamped response, where the auxiliary equation has two real roots, is adapted to use complex roots.
As is shown on my overdamped page, with zero initial conditions, for roots $r_{1}$ and $r_{2}$, the step response is
$O = 1 + \frac{r_{2}}{r_{1}-r_{2}}e^{r_{1}t} + \frac{r_{1}}{r_{2}-r_{1}}e^{r_{2}t}$.
Now assume the roots are $r_{1} = a + ib$, $r_{2} = a - ib$ and so $r_{2}-r_{1} = 2ib$.
We can use the same formula, and the relations
The last two come from Euler's Identity
This is shown on my $e^{\ i\theta}$ web page.
For how this result is adapted for critically damped systems, or oscillators, please see my 'other' damped page
Here we assume the roots are $r_{1} = a + ib$ and $r_{2} = a - ib$, so : \begin{align} O = 1 + \frac{r_{2}}{r_{1}-r_{2}}e^{r_{1}t} + \frac{r_{1}}{r_{2}-r_{1}}e^{r_{2}t} \\ \cssId{Step1}{{}O = 1 + \frac{a-ib}{-2ib}e^{(a+ib)t} + \frac{a+ib}{2ib}e^{(a-ib)t} } \\[3px] \cssId{Step2}{{}O = 1 + e^{at} (\frac{a-ib}{-2ib}e^{ibt} - \frac{a+ib}{2ib}e^{-ibt}) } \\[3px] \cssId{Step3}{{}O = 1 + e^{at} (- \frac{ib}{2ib}(e^{ibt} + e^{-ibt}) + \frac{a}{-2ib}(e^{ibt} - e^{-ibt}) )} \\[3px] \cssId{Step4}{{}O = 1 + e^{at} (-\frac{1}{2} 2 cos(bt) + \frac{a}{2ib}2 i sin(bt) )} \\[3px] \cssId{Step5}{{}O = 1 - e^{at} (cos(bt) - \frac{a}{b} sin(bt)) } \end{align}