# How to find the current of an RC circuit?

The problem asks me to find the current in the circuit when 4π seconds have elapsed.

Initially there is no charge on the capacitor, so I assumed that q(0)=0

My solution was the following

$$\begin{array}{l}V_{\left(t\right)}=Rq_{\left(t\right)}^{\prime}+\frac{1}{C}q_{\left(t\right)}\\ 300\cos \left(2t\right)=200q_{\left(t\right)}^{\prime}+\frac{1}{10^{-2}}q_{\left(t\right)}\\ \frac{300}{200}\cos \left(2t\right)=q_{\left(t\right)}^{\prime}+\frac{10^2}{200}q_{\left(t\right)}\\ q_{\left(t\right)}^{\prime}+\frac{1}{2}q_{\left(t\right)}=\frac{3}{2}\cos \left(2t\right)\\ \mu =e^{\int _{ }^{ }\frac{1}{2}dt}=e^{\frac{1}{2}t}\\ e^{\frac{1}{2}t}q_{\left(t\right)}^{\prime}+e^{\frac{1}{2}t}\frac{1}{2}q_{\left(t\right)}=\frac{3}{2}e^{\frac{1}{2}t}\cos \left(2t\right)\\ q_{\left(t\right)}e^{\frac{1}{2}t}=\frac{3}{2}\int _{ }^{ }e^{\frac{1}{2}t}\cos \left(2t\right)dt\\ q_{\left(t\right)}e^{\frac{1}{2}t}=\frac{3e^{\frac{t}{2}}\cos \left(2t\right)}{17}+\frac{12e^{\frac{t}{2}}\sin \left(2t\right)}{17}+C\\ q_{\left(t\right)}=\frac{3\cos \left(2t\right)}{17}+\frac{12\sin \left(2t\right)}{17}+Ce^{-\frac{1}{2}t}\\ q_{\left(0\right)}=0\\ 0=\frac{3}{17}+C\\ \left[C=-\frac{3}{17}\right]\\ q_{\left(t\right)}=\frac{3\cos \left(2t\right)}{17}+\frac{12\sin \left(2t\right)}{17}-\frac{3}{17}e^{-\frac{1}{2}t}\\ \frac{dq_{\left(t\right)}}{dt}=\frac{d}{dt}\left(\frac{3\cos \left(2t\right)}{17}+\frac{12\sin \left(2t\right)}{17}-\frac{3}{17}e^{-\frac{1}{2}t}\right)\\ i_{\left(t\right)}=\frac{24}{17}\cos \left(2x\right)-\frac{6}{17}\sin \left(2x\right)+\frac{3}{34}e^{-\frac{x}{2}}\\ i_{\left(4\pi \right)}=\frac{24}{17}\cos \left(2\cdot 4\pi \right)-\frac{6}{17}\sin \left(2\cdot 4\pi \right)+\frac{3}{34}e^{-\frac{4\pi }{2}}\\ \left[i_{\left(4\pi \right)}=1.41\text{A}\right]\end{array}$$

However, the solution of the problem tells me that the current when 4π seconds elapse is 0.2779 amps, is my solution or the solution of the problem wrong?

• You have $\omega$. Work out $X_C$, etc. Nov 14, 2022 at 0:50
• @StainlessSteelRat, in principle that won't give the right answer because it neglects the transient due to the initial conditions given (afaik) not being the same as if the circuit had been running for all time. In practice...4pi is about 6 times the time constant so it's probably gonna be close enough for engineering. Nov 14, 2022 at 1:52
• @ALEXANDER I get the same answer you did. Roughly $\frac{300\:\text{V}-17.614104\:\text{V}}{200\:\Omega}\approx 1.412\:\text{A}$.
– jonk
Nov 14, 2022 at 3:09
• I get the same: 1.41 A Nov 14, 2022 at 12:44
• I also get 1.41... so I think it's safe to say that the answer of 0.278 is wrong. It can happen. Where is this problem from? Nov 14, 2022 at 17:31

Well, the current in your circuit is given by:

$$\text{i}_\text{in}\left(t\right)=\mathscr{L}_\text{s}^{-1}\left[\frac{\text{V}_\text{i}\left(\text{s}\right)}{\text{R}+\frac{1}{\text{sC}}}\right]_{\left(t\right)}\tag1$$

Using the convolution theorem of the Laplace transform, we can write:

$$$$\begin{split} \text{i}_\text{in}\left(t\right)&=\int\limits_0^t\mathscr{L}_\text{s}^{-1}\left[\text{V}_\text{i}\left(\text{s}\right)\right]_{\left(\tau\right)}\cdot\mathscr{L}_\text{s}^{-1}\left[\frac{1}{\text{R}+\frac{1}{\text{sC}}}\right]_{\left(t-\tau\right)}\space\text{d}\tau\\ \\ &=\int\limits_0^t\text{v}_\text{i}\left(\tau\right)\cdot\left(\frac{\delta\left(t-\tau\right)}{\text{R}}-\frac{\exp\left(\frac{\tau-t}{\text{CR}}\right)}{\text{CR}^2}\right)\space\text{d}\tau\\ \\ &=\int\limits_0^t\text{v}_\text{i}\left(\tau\right)\cdot\frac{\delta\left(t-\tau\right)}{\text{R}}\space\text{d}\tau-\int\limits_0^t\text{v}_\text{i}\left(\tau\right)\cdot\frac{\exp\left(\frac{\tau-t}{\text{CR}}\right)}{\text{CR}^2}\space\text{d}\tau\\ \\ &=\frac{1}{\text{R}}\int\limits_0^t\text{v}_\text{i}\left(\tau\right)\cdot\delta\left(t-\tau\right)\space\text{d}\tau-\frac{1}{\text{CR}^2}\int\limits_0^t\text{v}_\text{i}\left(\tau\right)\cdot\exp\left(\frac{\tau-t}{\text{CR}}\right)\space\text{d}\tau\\ \\ &=\frac{1}{\text{R}}\cdot\left\{\int\limits_0^t\text{v}_\text{i}\left(\tau\right)\cdot\delta\left(t-\tau\right)\space\text{d}\tau-\frac{1}{\text{CR}}\int\limits_0^t\text{v}_\text{i}\left(\tau\right)\cdot\exp\left(\frac{\tau-t}{\text{CR}}\right)\space\text{d}\tau\right\}\\ \\ &=\frac{1}{\text{R}}\cdot\left\{\text{v}_\text{i}\left(t\right)\left(2\theta\left(t\right)-1\right)-\frac{1}{\text{CR}}\int\limits_0^t\text{v}_\text{i}\left(\tau\right)\cdot\exp\left(\frac{\tau-t}{\text{CR}}\right)\space\text{d}\tau\right\} \end{split}\tag2$$$$

$$$$\begin{split} \text{i}_\text{in}\left(4\pi\right)&=\int\limits_0^{4\pi}300\cos\left(2\tau\right)\cdot\left(\frac{\delta\left(4\pi-\tau\right)}{200}-\frac{1}{200^2\cdot10^{-2}}\cdot\exp\left(\frac{\tau-4\pi}{200\cdot10^{-2}}\right)\right)\space\text{d}\tau\\ \\ &=\frac{3\left(16+\exp\left(-2\pi\right)\right)}{34}\\ \\ &\approx1.41193\space\text{A} \end{split}\tag3$$$$

I also get the same answer of ~1.41 A when using the equivalent phasor of the circuit (see here if you're not familiar). Starting from Ohm's law:

$$V=IZ$$

Where Z is the complex impedance of the circuit. Here we have a resistor and capacitor in series which gives

$$Z=R+\frac{1}{j\omega C}=\frac{4j+1}{0.02j}$$

for R =200, C = 0.01, and ω = 2. With some complex algebra convert 1/Z to its exponential form:

$$\frac{1}{Z}=\frac{0.02e^{j\pi/2}}{\sqrt{4^2+1}e^{j\cdot arctan(4)}}$$ $$=\frac{0.02}{\sqrt{17}}e^{j[\pi/2-arctan(4)]}$$ $$=0.0024e^{0.2450j}$$

Subbing this into Ohm's law gives

$$I=300(0.0024e^{0.2450j})$$ $$I=1.4552 cos(2t+0.2450)$$

Which, if we sub in t = 4π, we get 1.4117 A. It seems a bunch of us have gotten the same answer with different approaches, so maybe the problem's original solution has an error.

Taking the lazy approach...

At $$\ 4 \pi \$$ seconds, the current is 1.4119376 A where the current has stabilized enough where using a simplified approach to solving the problem will yield a fairly accurate answer.

Perhaps the book answer is wrong.

 The dialog box parameters for the source is shown below.

• Can you tell me which simulator you use for this? Nov 14, 2022 at 22:53
• @ALEXANDERMONTOYAREYES Simulator is LTspice. It is free and works quite well. Download from the Analog Devices web site.
– qrk
Nov 15, 2022 at 1:34
• How did you set the source? did you use an identity? Nov 16, 2022 at 2:18
• @ALEXANDERMONTOYAREYES The curly brackets { } instruct LTspice to treat what is inside the brackets as a computation which also includes variables such as the built in definition of pi. Thus, the frequency is defined as {1/pi} which is approximately 0.3183 Hz. In the .tran statement, the time is defined as {4*pi} which is approximately 12.566 seconds. I have added an image to the post showing how the dialog window is filled out.
– qrk
Nov 16, 2022 at 6:01