\documentclass[english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}
\usepackage[authoryear,round]{natbib}
\usepackage{amsmath, amscd, amssymb, amsthm}
\usepackage{parskip}
\usepackage{graphicx}
\usepackage{bm}
\usepackage{color}
\usepackage{float}
\usepackage[normalem]{ulem}
\usepackage{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=3cm,rmargin=3cm}
\usepackage{framed}
\setlength{\parskip}{\medskipamount}
\linespread{1.3}
\setlength\parindent{0pt}
\makeatother \renewcommand\rmdefault{ppl}
\usepackage{titlesec}
\usepackage{hyperref}
\titleclass{\subsubsubsection}{straight}[\subsection]
\newcounter{subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}}
\titleformat{\subsubsubsection}
  {\normalfont\normalsize\bfseries}{\thesubsubsubsection}{1em}{}
\titlespacing*{\subsubsubsection}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{5}{\z@}%
  {3.25ex \@plus1ex \@minus.2ex}%
  {-1em}
  {\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{6}{\parindent}%
  {3.25ex \@plus1ex \@minus .2ex}%
  {-1em}%
  {\normalfont\normalsize\bfseries}}
\def\toclevel@subsubsubsection{4}
\def\toclevel@paragraph{5}
\def\toclevel@paragraph{6}
\def\l@subsubsubsection{\@dottedtocline{4}{7em}{4em}}
\def\l@paragraph{\@dottedtocline{5}{10em}{5em}}
\def\l@subparagraph{\@dottedtocline{6}{14em}{6em}}
\makeatother
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\newcommand{\comment}[2] {
\marginpar{{\color{red} #1}}  [\emph{#2}]}
\newcommand{\addition}[2] {
\marginpar{{\color{red} #1}} {\color{blue} #2}}
\newcommand{\remove}[2] {
\marginpar{{\color{red} #1}} {\color{red} \sout{#2}}}
\newcommand{\margincomment}[2] {
\marginpar{\footnotesize{{\color{red} #1}  [\emph{#2}]}}}

\begin{document}


\begin{center}
\textbf{Physics 120  \smallskip - \smallskip David Kleinfeld \smallskip - \smallskip Spring 2017}
\end{center}

\setcounter{section}{0}

\setcounter{equation}{0}

\section{Notes on Laplace circuit analysis}

\subsection{Background}

We previously learned that we can transform from the time domain to the frequency domain under steady-state conditions and thus solve algebraically
for the transfer function between the input and output of a circuit. This analysis allowed us to replace indictors and capacitors by their complex impedance, as
derivatives in time were replaced by $i\omega$ and integrals in time were replaced by $1/ (i\omega)$. The steady-state time dependence is then found by
transforming back to the time domain.

\medskip
The problem is that we often have a signal that turns on at a specific time, which we will take to be $t=0$ with no loss of generality. Can we calculate the transient behavior
with a transform method, as opposed to performing a convolutional integral in the time domain?
Let's recall the transform from the time domain to the frequency domain. It is given by:
\begin{equation}
\tilde{V}(\omega) =  \int \limits_{-\infty}^{\infty} dt \; v(t) \; e^{-i \omega t}.
\end{equation}

\medskip
First, what happens when $\tilde{V}(\omega)$ cannot exist because the integral does not converge at $t=\infty$ and/or $t=-\infty$? For example, suppose $f(t)$=constant or
worse yet a polynomial in time?  
One way to deal is to add an integrating factor; we chose an exponential as this will suppress any polynomial. Thus we add a factor $exp(-a|t|)$ to the integrand, we
can take $a \rightarrow 0$.

\medskip
Second, what happens when the system is causal, so that $V(t)$=0 for $t<0$?
Here we take the lower limit as $t=0$ rather than $t=-\infty$.  This is equivalent to multiplying the integrand by a step function, denoted $u(t)$, where
\begin{equation}
u(t)=\begin{cases}
1, & t>0,\\
0, & \text{otherwise},
\end{cases}
\end{equation}

\medskip
All of this leads to the Laplace transform:
\begin{eqnarray}
V(s) &=&  \int \limits_0^{\infty} dt \; v(t) \; e^{-a t}e^{-i \omega t} \\
       &=&  \int \limits_0^{\infty} dt \; v(t) \; e^{-s t} \nonumber
\end{eqnarray}
where $s=a+i\omega$ and $v(t)$ is understood as $v(t)u(t)$. Keep in mind that the units of $V(s)$ are Volts $\times$ time.
The inverse transform is a bit more involved, but we will show how this can be readily done for any of the functions that arise in linear circuit analysis.
We have
\begin{equation}
v(t)u(t) =  \frac{1}{2 \pi i} \int_C ds \; V(s) \; e^{s t},
\end{equation}
which is a contour integral in the complex $s$-plane.

All we need to know about, at least to start analyzing the kind of circuits familiar to the class, are two rules
\begin{equation}
\frac{dv(t)}{dt} \; \Rightarrow \; \int \limits_0^{\infty} dt \;\frac{dv(t)}{dt} \; e^{-s t}  \; = \; \int \limits_0^{\infty} dt \;s \; v(t) \; e^{-s t} + v(t) \; e^{-s t}|_0^{\infty}  \; = sV(s) - v(0)
\end{equation}
\begin{equation}
\int \limits_0^t dx \; v(x)\; \Rightarrow \; \int \limits_0^{\infty} dt \; \int \limits_0^t dx \; v(x) \; e^{-s t}  \; = \; \cdots = \; \frac{1}{s}V(s)
\end{equation}
and three transforms
\begin{equation}
1 \; \Rightarrow \; \int \limits_0^{\infty} dt \; e^{-s t}  \; = \; \frac{1}{s}
\end{equation}
\begin{equation}
e^{-at} \; \Rightarrow \; \int \limits_0^{\infty} dt \; e^{-at} \; e^{-s t}  \; = \; \frac{1}{s+a}
\end{equation}
\begin{equation}
sin \omega t \; \Rightarrow \; \int \limits_0^{\infty} dt \; sin \omega t  \; e^{-s t}  \; = \; \frac{\omega}{s^2+\omega^2}
\end{equation}
\begin{equation}
cos \omega t \; \Rightarrow \; \frac{1}{\omega}\frac{d \; sin(\omega t)}{dt} = \frac{s}{\omega}\frac{\omega}{s^2+\omega^2}  =  \frac{s}{s^2+\omega^2}
\end{equation}

Note that the derivative transform includes initial conditions, as shown in the table:

\includegraphics[width=11cm]{Laplace_IC.jpg}
 
\subsection{Application with step-to-constant input}

Let's apply our new knowledge to a circuit that has a switch that closes at time $t=0$. Thus the current at $t=0^+$ equals the current  at  $t=0^-$, which is $I=0$ since the current
through an inductor cannot change instantaneously. The initial voltage across the capacitor however, may not be zero. This $V_C(0^+)$ = $V_C(0^-)$ since the voltage across the capacitor
cannot change instantaneously,

\includegraphics[width=13cm]{Laplace_Circuit.jpg}

The equations are:
\begin{equation}
-v_o \; + \; L \frac{di(t)}{dt}  + R i(t) + \frac{1}{C} \int \limits_0^t dt' \; i(t') + V_C(0^{-}) = 0.
\end{equation}
Transforming, we get
\begin{equation}
\frac{-v_o}{s} \; + \; L s I(s)  + R I(s) + \frac{1}{C} \frac{1}{s} I(s) + \frac{V_C(0^{-})}{s} = 0.
\end{equation}
We multiply through by$s/L$ terms to get
\begin{equation}
-\frac{v_o }{L}\; + \; s^2 I(s)  + \frac{R}{L} sI(s) + \frac{I(s)}{LC} + \frac{V_C(0^-)}{L} = 0
\end{equation}
so that
\begin{equation}
I(s) = \left( \frac{v_o \; - \; V_C(0^-) }{L} \right)  \frac{1}{s^2 + \frac{R}{L}s + \frac{1}{LC}}.
\end{equation}
We let  $V_C(0^-)$ = 0 simply to minimize the algebra in the following mathematics. Thus:
\begin{equation}
I(s) = \frac{v_o}{L}  \;  \frac{1}{s^2 + 2k s + \omega_o^2}
\end{equation}
where $k = \frac{R}{2L}$ is a decay rate and $\omega_o = \frac{1}{\sqrt{LC}}$ is a resonant frequency. The first thing we need to do is factor the denominator. We have
\begin{equation}
\text{roots}= -k \pm i \sqrt{\omega_o^2 -k^2 } 
\end{equation}
Thus
\begin{equation}
I(s) =\frac{v_o}{L}   \frac{1}{(s-a)(s-a^*)}
\end{equation}
with
\begin{equation}
a = -k + i \sqrt{\omega_o^2 -k^2 }
\end{equation}
and thus
\begin{equation}
i(t) =  \frac{v_o}{L}  \frac{1}{2 \pi i} \int_C ds  \frac{e^{st}}{(s-a)(s-a^*)}.
\end{equation}
In order to solve this we need a refresher on the residue theorem

\begin{framed}
{\bf "Blitz refresher on Cauchy's Residue Theorem"}

Integrals in the complex plane, of the form used in linear circuit analysis, may be evaluated by
\begin{equation}
 \int_C ds  F(s) = 2 \pi i \;\Sigma \; \text{Residues}\nonumber.
 \end{equation}
When 
\begin{eqnarray}
F(s) &=& \frac{\text{Any regular function}}{\text{Polynomial function with simple zeros}}\nonumber\\
     &\equiv& \frac{q(s)}{p(s)} \nonumber
 \end{eqnarray}
the residue at each zero of $p(s)$, or pole of $F(s)$, is given by the expression
\begin{equation}
\text{Residue} = \frac{q(s)}{\frac{\partial p(s)}{\partial{s}}} \arrowvert_{s = s_{\text{pole}}} \nonumber.
 \end{equation}
 For example, with $q(s) = r(s) e^{st}$ and $p(s) = (s-a)(s-b) \cdots (s-y)(s-z)$, we have
 \begin{eqnarray}
 \int_C ds  F(s) &=& \int_C ds  \frac{ r(s) e^{st}}{(s-a)(s-b)(s-c) \cdots (s-y)(s-z)} \nonumber\\
                        &=& 2 \pi i \left[  \frac{ r(s) e^{st}}{(s-b) \cdots (s-y)(s-z)}|_{s=a} \; + \cdots + \; \frac{ r(s) e^{st}}{(s-a)(s-b) \cdots (s-y)}|_{s=z} \right] \nonumber \\
                        &=& 2 \pi i \left[  \frac{ r(a) e^{at}}{(a-b) \cdots (a-y)(a-z)} \; + \cdots + \; \frac{ r(z) e^{zt}}{(z-a)(z-b) \cdots (z-y)} \right]. \nonumber              
 \end{eqnarray}
Note that complex poles always appear as conjugate pairs. Thus, for example, with
\begin{equation}
F(s) = \frac{e^{st}}{(s-a)(s-a^*)} \nonumber
 \end{equation}
 we find
 \begin{eqnarray}
f(t)  &=& \frac{1}{2 \pi i}  \int_C ds  F(s) \nonumber\\
			&=&\frac{1}{2 \pi i}  \int_C ds  \frac{ e^{st}}{(s-a)(s-a^*)} \nonumber \\
                        &=&\frac{1}{2 \pi i} \; 2 \pi i \left[  \frac{ e^{at}}{(a-a^*)} \; + \; \frac{ e^{a^*t}}{(a^*-a)} \right]. \nonumber \\             
                        &=& \;e^{\text{Re}[a]t}  \left[  \frac{ e^{i\text{Im}[a]t} \; - \;  e^{-i\text{Im}[a]t}}{2i \text{Im}[a]} \right] \nonumber\\            
                       &=& \; \frac{e^{\text{Re}[a]t}}{\text{Im}[a]} \; sin(\text{Im}[a]t) \nonumber              
 \end{eqnarray}
 which is just the form of our solution for the prior circuit application.

\includegraphics[width=11cm]{Laplace_Contour.jpg}
\end{framed}

The Cauchy residue theorem for the inverse transform thus yields:
\begin{eqnarray}
i(t) &=&  \frac{v_o}{L} \; \frac{e^{\text{Re}[a]t}}{\text{Im}[a]} \; sin(\text{Im}[a]t)  \\
     &=& \frac{v_o}{L} \frac{\; e^{-kt}}{\sqrt{\omega_o^2 -k^2}} sin\left( \sqrt{\omega_o^2 - k^2} \; t \right) \nonumber.
\end{eqnarray}
Note that the shift in the natural frequency, from $\omega_o$ to $\omega_o  \left[ 1 - \frac{1}{2}(\frac{k}{\omega_o})^2 + \cdots \right]$, is quite clear. When the loss is high, i.e., $k > \omega_o$, the sine term becomes a hyperbolic sine and the current just rises and decays exponentially. For the special case of $k = \omega_o$, so called 'critical damping',
\begin{equation}
i(t) =  \frac{2v_o}{R} \; kt \; e^{-kt}.
\end{equation}
Note also that the current at very short times is limited by the highest impedance, which is the inductance. In particular
\begin{equation}
i(t) \quad {\overrightarrow{t \rightarrow 0}} \quad \frac{v_o}{L} t .
 \end{equation}

\subsection{Application with step-to-sinusoid (tone) input}

Let's now move to a more interesting dynamics and replace the source with a cosine that turns on at $t=0$, that is
\begin{equation}
v_o(t) = v_o cos (\omega t)
\end{equation}
so that
\begin{equation}
-v_o cos (\omega t) \; + \; L \frac{di(t)}{dt}  + R i(t) + \frac{1}{C} \int \limits_0^t dt' \; i(t')  = 0
\end{equation}
where, for simplicity, we take the initial voltage on the capacitor to be zero.
Transforming, we get
\begin{eqnarray}
I(s) &=& i_o  \frac{k \; s^2}{(s-a)(s-a^*)(s^2-\omega^2)} \\
     &=& i_o  \frac{k \; s^2}{(s-a)(s-a^*)(s-i\omega)(s+i\omega)} \nonumber.
\end{eqnarray}
where we use the same abbreviations as above.  We choose to use $cos(\omega t) u(t)$ as this reverts to $u(t)$ as $\omega \rightarrow 0$.

\includegraphics[width=11cm]{Laplace_CIrcuit_cos.jpg}

The circuit will respond at both the driven frequency and at the natural frequency. We have, from the residue theorem, four terms that we will evaluate in pairs, i.e.
\begin{equation}
i(t) = i_o [f_1(t) + f_2(t)]
\end{equation}
where
\begin{equation}
f_1(t) =  \frac{k \; s^2 \; e^{st}} {(s-a^*)(s^2 + \omega^2)}|_{s=a} + \frac{k \; s^2 \; e^{st}} {(s-a)(s^2 + \omega^2)}|_{s=a^*}
\end{equation}
and
\begin{equation}
f_2(t) = \frac{k \; s^2 \; e^{st}} {(s-a)(s-a^*)(s+i\omega)}|_{s=i\omega} + \frac{k \; s^2 \; e^{st}} {(s-a)(s-a^*)(s-i\omega)}|_{s=-i\omega}.
\end{equation}
Before we solder on with $f_1(t)$, let's calculate some of the algebraic terms that we will need, i.e.,
\begin{equation}
a-a^* = i2\sqrt{\omega_o^2-k^2},
\end{equation}
\begin{equation}
aa^* = \omega_o^2,
\end{equation}
\begin{equation}
a^2 = 2k^2 - \omega_o^2 + i2\sqrt{\omega_o^2-k^2}.
\end{equation}
and
\begin{equation}
a^{*2} = 2k^2 - \omega_o^2 - i2\sqrt{\omega_o^2-k^2}.
\end{equation}
\begin{eqnarray}
f_1(t) &=& \frac{k e^{-kt}}{\sqrt{\omega_o^2-k^2}}\frac{1}{2i} \left( \frac{2k^2 - \omega_o^2 + i2k\sqrt{\omega_o^2-k^2}}{2k^2 +\omega^2- \omega_o^2 + i2k\sqrt{\omega_o^2-k^2}}e^{i\sqrt{\omega_o^2-k^2}\;t} - \frac{2k^2 - \omega_o^2 - i2k\sqrt{\omega_o^2-k^2}}{2k^2 +\omega^2- \omega_o^2 - i2k\sqrt{\omega_o^2-k^2}}e^{-i\sqrt{\omega_o^2-k^2}\;t}\right) \nonumber. \\
\end{eqnarray}
We rationalize the denominator, noting that
\begin{equation}
\left( 2k^2 +\omega^2- \omega_o^2 + i2k\sqrt{\omega_o^2-k^2} \right) \left( 2k^2 +\omega^2- \omega_o^2 - i2k\sqrt{\omega_o^2-k^2} \right) = (\omega^2-\omega_o^2)^2+(2k\omega)^2,
\end{equation}
\begin{equation}
\left( 2k^2 - \omega_o^2 + i2k\sqrt{\omega_o^2-k^2} \right)   \left( 2k^2 +\omega^2- \omega_o^2 - i2k\sqrt{\omega_o^2-k^2} \right) = \omega_o^4-\omega^2(\omega_o^2-2k^2) +i2k\omega^2\sqrt{\omega_o^2-k^2}
\end{equation}
and
\begin{equation}
\left( 2k^2 - \omega_o^2 - i2k\sqrt{\omega_o^2-k^2} \right)   \left( 2k^2 +\omega^2- \omega_o^2 + i2k\sqrt{\omega_o^2-k^2} \right) = \omega_o^4-\omega^2(\omega_o^2-2k^2) -i2k\omega^2\sqrt{\omega_o^2-k^2}
\end{equation}
so that
\begin{eqnarray}
f_1(t) &=& \frac{k e^{-kt}}{\sqrt{\omega_o^2-k^2}[(\omega^2-\omega_o^2)^2+(2k\omega)^2]} \\
&\times& \left( \left[ \omega_o^4-\omega^2(\omega_o^2-2k^2)\right] \frac{e^{i\sqrt{\omega_o^2-k^2}t} - e^{-i\sqrt{\omega_o^2-k^2}t}}{2i} + 2k\omega^2 \sqrt{\omega_o^2-k^2} \frac{e^{i\sqrt{\omega_o^2-k^2}t} + e^{-i\sqrt{\omega_o^2-k^2}t}}{2} \right)\nonumber \\
&=& \frac{k e^{-kt}}{\sqrt{\omega_o^2-k^2}[(\omega^2-\omega_o^2)^2+(2k\omega)^2]} \nonumber\\
&\times&  \left( \left[ \omega_o^4-\omega^2(\omega_o^2-2k^2)\right] sin(\sqrt{\omega_o^2-k^2} \; t) + 2k\omega^2 \sqrt{\omega_o^2-k^2}\; cos(\sqrt{\omega_o^2-k^2} \; t) \right)\nonumber \\
&=& \frac{\omega_o^2 k e^{-kt}}{\sqrt{(\omega_o^2-k^2)[(\omega^2-\omega_o^2)^2+(2k\omega)^2]}} \nonumber\\
&\times&  \left(  \frac{\omega_o^4-\omega^2(\omega_o^2-2k^2)}{\omega_o^2\sqrt{(\omega^2-\omega_o^2)^2+(2k\omega)^2}} sin(\sqrt{\omega_o^2-k^2} \; t) + \frac{2k\omega^2 \sqrt{\omega_o^2-k^2}}{\omega_o^2\sqrt{(\omega^2-\omega_o^2)^2+(2k\omega)^2}}\; cos(\sqrt{\omega_o^2-k^2} \; t) \right)\nonumber.
\end{eqnarray}
The weighting factors for the sine and cosine terms satisfy the right triangle rule
\begin{equation}
\left[ \omega_o^4-\omega^2(\omega_o^2-2k^2)\right]^2 + \left[2k\omega^2 \sqrt{\omega_o^2-k^2} \right]^2 = \left[\omega_o^2\sqrt{(\omega^2-\omega_o^2)^2+(2k\omega)^2}\right]^2
\end{equation}
so that with the definition
\begin{equation}
\phi_1(\omega) = atan \left( \frac{2k\omega^2 \sqrt{\omega_o^2-k^2}}{\omega_o^4-\omega^2(\omega_o^2-2k^2)} \right)
\end{equation}
we have
\begin{eqnarray}
f_1(t) &=& \frac{\omega_o^2k e^{-kt}}{\sqrt{(\omega_o^2-k^2)[(\omega^2-\omega_o^2)^2+(2k\omega)^2]}}\\
&\times&  \left(  cos[\phi_1(\omega)] \; sin(\sqrt{\omega_o^2-k^2} \; t)  \; + \; sin[\phi_1(\omega)] \; cos(\sqrt{\omega_o^2-k^2} \; t) \right)\nonumber\\
 &=&\frac{\omega_o^2}{\sqrt{(\omega^2-\omega_o^2)^2+(2k\omega)^2}}  \frac{k e^{-kt}}{\sqrt{(\omega_o^2-k^2)}} \; sin\left( \sqrt{\omega_o^2-k^2} \; t + \phi_1(\omega) \right)   \nonumber.
 \end{eqnarray}
The first term is maximized for the choice of drive frequency $\omega = \sqrt{\omega_o^2-2k^2}$, which is slightly lower than the natural response frequency of  $\omega = \sqrt{\omega_o^2-k^2}$.
Lastly, and as a sanity check, in the limit of $\omega \rightarrow 0$, we recover the result for the response to a step input, i.e.
\begin{equation}
f_1(t) \;\;  \overrightarrow{\omega \rightarrow 0}\; \; \frac{k e^{-kt}} {\sqrt{\omega_o^2-k^2}} \; sin\left( \sqrt{\omega_o^2-k^2} \; t\right).
\end{equation}
Let's now move on to the driven term $f_2(t)$. We first note the evaluations:
\begin{equation}
(s-a)(s-a^*)|_{s=i\omega} = (s^2+2ks+\omega_o^2)|_{s=i\omega} = (\omega_o^2-\omega^2) +i2k\omega,
\end{equation}
\begin{equation}
(s-a)(s-a^*)|_{s=-i\omega} = (s^2+2ks+\omega_o^2)|_{s=-i\omega} = (\omega_o^2-\omega^2) -i2k\omega.
\end{equation}
and
\begin{equation}
[(\omega_o^2-\omega^2) +i2k\omega] [(\omega_o^2-\omega^2) -i2k\omega] = (\omega_o^2-\omega^2)^2 + (2k\omega)^2
\end{equation}
Then
\begin{eqnarray}
f_2(t) &=& \frac{k \; (i\omega)^2 \; e^{i\omega t}}{ [(\omega_o^2-\omega^2) +i2k\omega](i2\omega)} +\frac{k \; (-i\omega)^2 \; e^{-i\omega t}}{ [(\omega_o^2-\omega^2) -i2k\omega](-i2\omega)} \\
          &=& \frac{-k\omega}{2i} \left( \frac{e^{i\omega t}[(\omega_o^2-\omega^2) -i2k\omega] \; - \; e^{-i\omega t}[(\omega_o^2-\omega^2) +i2k\omega]}{(\omega_o^2-\omega^2)^2 + (2k\omega)^2} \right) \nonumber \\
           &=& \frac{k\omega}{(\omega^2-\omega_o^2)^2 + (2k\omega)^2}  \left( 2k\omega \frac{e^{i\omega t} + e^{-i\omega t}}{2} \;+ (\omega^2-\omega_o^2) \frac{e^{i\omega t} + e^{-i\omega t}}{2i} \right) \nonumber \\
            &=& \frac{k\omega}{(\omega^2-\omega_o^2)^2 + (2k\omega)^2}  \left(  (\omega^2-\omega_o^2) \; sin(\omega t) \; + \; 2k\omega \; cos(\omega t) \right) \nonumber \\
             &=& \frac{k\omega}{\sqrt{(\omega^2-\omega_o^2)^2 + (2k\omega)^2}}  \left(  \frac{\omega^2-\omega_o^2}{\sqrt{(\omega^2-\omega_o^2)^2 + (2k\omega)^2}} \; sin(\omega t) \; + \; \frac{2k\omega}{\sqrt{(\omega^2-\omega_o^2)^2 + (2k\omega)^2}} \; cos(\omega t) \right) \nonumber
             \end{eqnarray}
The weighting factors for the sine and cosine terms satisfy the right triangle rule, so
\begin{eqnarray}
f_2(t) &=& \frac{k\omega}{\sqrt{(\omega^2-\omega_o^2)^2 + (2k\omega)^2}}  \left( sin[\phi_2(\omega)] sin(\omega t) + \cos[\phi_2(\omega)] cos(\omega t)  \right) \\    
&=& \frac{k\omega}{\sqrt{(\omega^2-\omega_o^2)^2 + (2k\omega)^2}}  cos \left( \omega t - \phi_2(\omega) \right) \nonumber      
\end{eqnarray}
where 
\begin{equation}
\phi_2(\omega) = atan \left( \frac{\omega^2 -\omega_o^2}{2k\omega} \right)
\end{equation}
\begin{eqnarray}
i(t) &=& \frac{v_o}{2kL} \left( f_1(t) + f_2 (t) \right) \\
 &=& \frac{v_o}{2\omega_oL} \frac{\omega_o^2}{\sqrt{(\omega^2-\omega_o^2)^2+(2k\omega)^2}}  \left( \frac{\omega_o e^{-kt}}{\sqrt{(\omega_o^2-k^2)}} \; sin\left( \sqrt{\omega_o^2-k^2} \; t + \phi_1(\omega) \right) + \frac{\omega}{\omega_o} cos\left(\omega t -\phi_2(\omega) \right) \right)   \nonumber.
\end{eqnarray}
At $t=0^+$, the amplitude of the response is
\begin{equation}
i(0^+) = \frac{v_o}{R}  \; \frac{(2k\omega)^2}{(\omega^2-\omega_o^2)^2+(2k\omega)^2}
\end{equation}
\end{document}
