What is a solution of $v(t)$ in the differential equation? I has $Vs(t)$ as well as a wave form in picture. So what is a solution of $v(t)$ in the differential equation? I used Laplace transform for solving but it is incorrect. Next picture, it is a wave form of $v(t)$ when $Vm = 12V$, $T = 20ms$ but i must know the equation of v(t).
Thank you.


 A: The first step is to figure out the Laplace transform of the voltage source.
In order to not confuse the voltage across the capacitor and the voltage source ($V_s$), lets call $V_s = E_s$.
$E_s$ is a periodic voltage source with period $T = 20~ ms = \dfrac{1}{50}$ seconds (or a circuit frequency of $50$ Hz (Hertz)). Because $E_s$ is a periodic source with interval $\left(0, \dfrac{1}{50}\right)$ seconds, it can be defined analytically as:

$$
   E_s(t) = \left\{
     \begin{array}{lr}
       12 ~V ,~~~ 0 \lt t \lt \dfrac{1}{100}~ \mbox{seconds}\\
       ~0 ~V,~~~ \dfrac{1}{100} \lt t \lt \dfrac{1}{50}~ \mbox{seconds} 
            \end{array}
   \right.$$

For a periodic function, $E_s$ with period $T \gt 0$, we have:
$$\mathscr{L}~(E_s(t)) = \dfrac{\int_0^T e^{-s t}E_s(t)~dt}{1-e^{-sT}} = \dfrac{\int_0^{1/50} e^{-s t}E_s(t)~dt}{1-e^{-s/50}}$$
However, we have:
$$\begin{align}\int_0^{1/50} e^{-s t}E_s(t)~dt & = \int_0^{1/100} e^{-s t}(12)~dt + \int_{1/100}^{1/50} e^{-s t}(0)~dt \\ \\ & = -\dfrac{12}{s}~(e^{-st})~\Bigr|_{t=0}^{t = 1/100} \\ \\ & = \dfrac{12}{s}(1 - e^{-s/100})\end{align}$$
So, we can simplify (note: $(1-e^{-s/50}) = (1-e^{-s/100})(1+e^{-s/100})$) and arrive at:
$$\mathscr{L}~(E_s(t)) = \dfrac{\int_0^{1/50} e^{-s t}E_s(t)~dt}{1-e^{-s/50}}=\dfrac{\dfrac{12}{s}(1 - e^{-s/100})}{1-e^{-s/50}} = \dfrac{12}{s(1+e^{-s/100})}$$
For the second part, we need the Laplace Transform of the second order differential equation:
$\mathscr{L}\left( \dfrac{d^2v}{dt^2} + \alpha \dfrac{dv}{dt} + \omega_0^2~v = \omega_0^2~ E_s\right)$, with $\alpha = \dfrac{R}{L}, \omega_0^2 = \dfrac{1}{LC}$, yielding:
$$(s^2~v(s) - s~v(0)-v'(0)) + \alpha (s~v(s)-v(0)) + \omega_0^2~v(s) = \dfrac{12~\omega_0^2}{s(1+e^{-s/100})}$$
Solving for $v(s)$ yields:
$$v(s) = \dfrac{1}{s^2 + \alpha~s + \omega_0^2}\left(\dfrac{12~\omega_0^2}{s(1+e^{-s/100})} + s~v(0) + v'(0) + \alpha~v(0)\right)$$
Substitute all of your initial conditions, resistor, inductor and capacitor component values and then do partial fractions on the right-hand-side and then find:
$$v(t) = \mathscr{L^{-1}}~(v(s)) ~~\mbox{Volts}$$
Note: the result above matches your posted result because $v'(0) = v(0) = 0, V_m = 12, T = \dfrac{1}{50}$. 

Just replace the component values and find the inverse Laplace Transform and you are done.
