Now `V_R(t)=u(t)-u(t-2)`
To solve this, we need to work in voltages, not current.
We start with .`Ri+1/Cinti\ dt=V`
The voltage across a capacitor is given by `v=1/Cinti\ dt`.
It follows that `C(dv)/(dt)=i`.
So for this example we have:
`RC(dv)/(dt)+v=u(t)-u(t-2)`
Substituting known values:
`RC=10^6xx10^-6=1`
Then
`(dv)/(dt)+v=u(t)-u(t-2)`
Taking Laplace Transform of both sides: `(sV-v_0)+V=1/s-(e^(-2s))/s`
Since `v_0=0`, we have:
`(s+1)V=1/s-(e^(-2s))/s`
`{: (V,=1/(s(s+1))-(e^(-2s))/(s(s+1))),(,=(1/s-1/(s+1))-(e^(-2s)/s-(e^(-2s))/(s+1))),(,=1/s-1/(s+1)-(e^(-2s))/s+(e^(-2s))/(s+1)):}`
So, taking inverse Laplace
`v=u(t)-e^(-t)*u(t)-u(t-2)+e^(-t+2)*u(t-2)`
NOTE: For the part: `ccL^(-1){(e^(-2s))/(s+1)}`, we use:
`ccL^(-1){e^(-as)G(s)}=g(t-a)*u(t-a)`
So we have:
`G(s)=1/(s+1)`
`g(s)=e^(-t)`
`a=2`
`{: (ccL^(-1){(e^(-2s))/(s+1)},=g(t-a)*u(t-a)),(,=e^(-(t-2))*u(t-2)),(,=e^(-t+2)*u(t-2)):}`
1. To find the Inverse Laplace:
`ccL^(-1){1/(s(s+1))-(e^(-2s))/(s(s+1))}` `=1-e^(-t)-"Heaviside"(t-2)(1-e^(-t+2))`
2. To solve the original DE:
`{:((dv)/(dt)+v=u(t)-u(t-2)),(v(0)=0):}`
Exact solution for v(t):
`v(t)="Heaviside"(t)` `-e^(-t)"Heaviside"(t)` `-"Heaviside"(t-2)` `+"Heaviside"(t-2)e^(-t+2)`
To see what this means, we could write it as follows:
`{:(v(t)=(1-e^(-t))u(t)+(-1+e^(-t+2))*u(t-2)),(=(1-e^(-t))*u(t)+(-1+e^(-t)e^2)*u(t-2)),(=(1-e^(-t))*u(t)+(-1+e^(-t))*u(t-2)+e^(-t)(e^2-1)*u(t-2)),(=(1-e^(-t))*(u(t)-u(t-2))+e^(-t)(e^2-1)*u(t-2)):}`
To get an even better idea what our expression for v(t) means, we graph it as follows:
