# Transient circuit analysis with additional source

The circuit in the image below is what I get when I open the switch of a larger circuit which I have already analysed. Therefore, I know the initial condition.

simulate this circuit – Schematic created using CircuitLab

I'm stuck here because I've never before had to deal with a circuit which has an active voltage source even after the switch is open.

If this circuit shown would have been identical except for a lacking voltage source, my approach would have been to write the KCL equation for node 1, which I've annotated on the image as "1". Here is what it would have looked like:

$$C\frac{\text dv_c(t)}{\text dt} + \frac1{6~\text k}v_c(t) = 0$$

After that, I would have been able to find the solution as normal, by dividing $$\C\$$ by $$\\frac1{6~\text k}\$$ to obtain $$\\tau\$$, and then substituting that along with the initial condition into $$\v(t)=Ae^{-\frac t\tau}\$$ to obtain the total response. But because of the voltage source, I am no longer sure what to do. I feel like my previous knowledge should allow me to figure this out, yet I am stuck even after some time.

### initial thoughts

I don't see any initial conditions being given in your question. Of course, the only possible initial condition would be the voltage across the capacitor. But I don't see it mentioned, by value. So I'll just assume that it can be anything and call that value $$\V_{\text{C}_{t=0}}\$$.

I also don't see the larger circuit you say you analyzed to produce this. I gather a switch opened on some unspecified larger circuit. I gather you have decided this is what's left once the switch is open. I'll take all that as granted, then.

### 1st order linear diff-eq solution

You haven't provided a ground or a way to know which end is up with regards to the voltage across the capacitor. And the circuit you provide could be expressed a little better, I think:

simulate this circuit – Schematic created using CircuitLab

I think the equivalent one on the far right side is easier on the eye, for analysis. That's just my opinion, though.

Regardless, KCL would seem to suggest:

$$\frac{V_{_\text{C}}}{R_1}+C_1\frac{\text{d}}{\text{d}t}V_{_\text{C}}=0\:\text{A}$$

That is an homogeneous equation and it looks like we agree with each other.

But the above is wrong. And that's where you went astray.

This is what you should get from KCL:

\begin{align*} \frac{V_{_\text{C}}-V_1}{R_1}+C_1\frac{\text{d}}{\text{d}t}V_{_\text{C}}&=0\:\text{A} \\\\ \frac{V_{_\text{C}}}{R_1}+C_1\frac{\text{d}}{\text{d}t}V_{_\text{C}}&=\frac{V_1}{R_1} \end{align*}

That's not homogeneous!

You could arrange it into standard solution form for use with the integrating factors method:

\begin{align*} \frac{\text{d}}{\text{d}t}V_{_\text{C}}+\left[P=\frac{1}{R_1\,C_1}\right]V_{_\text{C}}&=\left[Q=\frac{V_1}{R_1\,C_1}\right] \end{align*}

Then the integrating factor is $$\\mu=e^{^{\int P\:\text{d}t}}\$$ and the solution is:

\begin{align*} \require{cancel} V_{_\text{C}}&=\frac1{\mu}\int\mu \cdot Q\:\text{d}t \\\\ &=\exp\left(\frac{-t}{R_1\,C_1}\right)\frac{V_1}{R_1\,C_1}\left[R_1\,C_1\,\exp\left(\frac{t}{R_1\,C_1}\right)+A_0\right] \\\\ &=\cancel{\exp\left(\frac{-t}{R_1\,C_1}\right)}\frac{V_1}{\cancel{R_1\,C_1}}\cancel{R_1\,C_1}\,\cancel{\exp\left(\frac{t}{R_1\,C_1}\right)}+A_0\exp\left(\frac{-t}{R_1\,C_1}\right)\frac{V_1}{R_1\,C_1} \\\\ &=V_1+A_0\frac{V_1}{R_1\,C_1}\exp\left(\frac{-t}{R_1\,C_1}\right) \\\\ &=V_1+A_1\exp\left(\frac{-t}{R_1\,C_1}\right),\text{where }A_1=A_0\frac{V_1}{R_1\,C_1} \end{align*}

And from initial conditions you then know that $$\A_1=V_{\text{C}_{t=0}}-V_1\$$. So the final result is:

$$V_{_\text{C}}=V_1+\left(V_{\text{C}_{t=0}}-V_1\right)\exp\left(\frac{-t}{R_1\,C_1}\right)$$

### other methods

We could take the derivative of that earlier non-homogeneous equation:

\begin{align*} \frac{\text{d}}{\text{d}t}\left[\frac{V_{_\text{C}}}{R_1}+C_1\frac{\text{d}}{\text{d}t}V_{_\text{C}}\right]&=\frac{\text{d}}{\text{d}t}\left[\frac{V_1}{R_1}\right] \\\\ \frac{\text{d}}{\text{d}t}\left[\frac{1}{R_1}+C_1\frac{\text{d}}{\text{d}t}\right]V_{_\text{C}}&=0 \\\\ \frac{\text{d}}{\text{d}t}\left[\frac{\text{d}}{\text{d}t}+\frac{1}{R_1\,C_1}\right]V_{_\text{C}}&=0 \\\\ \left[\frac{\text{d}}{\text{d}t}-0\right]\,\left[\frac{\text{d}}{\text{d}t}-\frac{-1}{R_1\,C_1}\right]V_{_\text{C}}&=0 \end{align*}

Now, that is homogeneous and has two solutions that are added together.

First, $$\\left[\frac{\text{d}}{\text{d}t}-0\right]\$$ is solved by $$\A_0\exp\left(0\cdot t\right)=A_0\$$.

Second, $$\\left[\frac{\text{d}}{\text{d}t}-\frac{-1}{R_1\,C_1}\right]\$$ is solved by $$\A_1\exp\left(\frac{-t}{R_1\,C_1}\right)\$$.

$$V_{_\text{C}}=A_0+A_1\exp\left(\frac{-t}{R_1\,C_1}\right)$$

At $$\t=\infty\$$ final conditions we know that $$\A_0=V_1\$$ and from $$\t=0\$$ initial conditions we know that $$\A_0+A_1=V_{\text{C}_{t=0}}\$$, so it follows that $$\A_1=V_{\text{C}_{t=0}}-V_1\$$. Which we already worked out, earlier. The answer is, again:

$$V_{_\text{C}}=V_1+\left(V_{\text{C}_{t=0}}-V_1\right)\exp\left(\frac{-t}{R_1\,C_1}\right)$$

I tend to like this approach better; taking the derivative to make the equation homogeneous. Because I don't have to mess around with integrating factors.

It's not only better for that reason. It's downright beautiful as a piece of work in mathematics.

### summary

Let's dig a little deeper into the prior (last) approach above, where I examined this form and came up with two solutions to be added:

\begin{align*} \left[\frac{\text{d}}{\text{d}t}-0\right]\,\left[\frac{\text{d}}{\text{d}t}-\frac{-1}{R_1\,C_1}\right]V_{_\text{C}}&=0 \end{align*}

What does the above say?

It says that whatever function $$\V_{_\text{C}}\$$ represents, it must be the case that applying these two prior operators to that function (in either order) always results with zero.

What's an operator? Well, just apply what you see and do the usual distribution and see where that goes. Order isn't important. So you can swap the two operators when deciding which of them to apply first.

Recall that with an operator of the form $$\\left[\frac{\text{d}}{\text{d}t}-\alpha\right]\$$ then the solution (if looking for a zero outcome as occurs in homogeneous equations) is always of the general form: $$\A\exp\left(\alpha\,t\right)\$$.

But why?

Well, test it out:

\begin{align*}\require{cancel} \left[\frac{\text{d}}{\text{d}t}-\alpha\right]A\exp\left(\alpha\,t\right)&=0 \\\\ \frac{\text{d}}{\text{d}t}A\exp\left(\alpha\,t\right)-\alpha A\exp\left(\alpha\,t\right)&= 0 \\\\ \cancel{\alpha A\exp\left(\alpha\,t\right)}-\cancel{\alpha A\exp\left(\alpha\,t\right)}&= 0 \end{align*}

Yeah. That sure does work!

With something like $$\A_0+A_1\exp\left(\alpha\,t\right)\$$ then we know that the operator $$\\left[\frac{\text{d}}{\text{d}t}\right]\$$ will kill the $$\A_0\$$ constant. But it won't kill the 2nd term. So we need the $$\\left[\frac{\text{d}}{\text{d}t}-\alpha\right]\$$ operator to kill that term. This is why we need both $$\\left[\frac{\text{d}}{\text{d}t}\right]\,\left[\frac{\text{d}}{\text{d}t}-\alpha\right]\$$ to kill the whole function.

This is also called annihilation. And it is what these operators are designed to do for you. They annihilate functions. This is also why homogeneous forms are attractive. When the goal is to get a zero result, annihilators are the tool you reach for. They do the job!

The reverse is true. This means that in the case of an homogeneous equation and when seeing an operator of the form $$\\left[\frac{\text{d}}{\text{d}t}-\alpha\right]\$$ being applied to a function then the conclusion is that the function includes, in part, the form of $$\A\exp\left(\alpha\,t\right)\$$.

One final point is about what to do when faced with more difficult non-homogeneous equations. A goal may still be to create an homogeneous equation with all the operators on the left side and the simple value of zero still on the right. This is handled by applying annihilators equally to both sides until the right side is zero and the equation is homogeneous.

For example, what if $$\V_1=V_0\cos\left(\omega\,t\right)\$$ (an AC source rather than DC.) In this case, the simpler $$\\left[\frac{\text{d}}{\text{d}t}-0\right]\$$ annihilator won't work on the right-side's $$\V_1\$$. For this, the more agile and capable $$\\left[\left(\frac{\text{d}}{\text{d}t}-\alpha\right)+\omega^2\right]\$$ annihilator is brought in as the right tool. This will kill the new $$\V_1\$$. In this case, because $$\V_1\$$ is just a simple cosine with a constant multiplier, $$\\alpha=0\$$. So the actual annihilator that could be used, in this case, may be simplified to $$\\left[\left(\frac{\text{d}}{\text{d}t}\right)^2+\omega^2\right]\$$.

### Laplace and annihilation are tightly related

KCL can also easily be done in Laplace notation, using s instead of $$\\frac{\text{d}}{\text{d}t}\$$. But it works out in the same fashion as I just showed here without using the integrating factors. So I won't belabor it further, here. The Laplace method is entirely equivalent. (Being able to straddle between Laplace and time-domain with fluency is a nice-to-have.)

A table of Laplace transforms can be used to find any annihilator you may likely need. For example, let's go and see what a Laplace table says about the cosine and sine functions:

Look at the denominators, in particular. This is how you find your annihilators. Keeping in mind the equivalence of s to $$\\frac{\text{d}}{\text{d}t}\$$, again, note that #8 shows $$\s^2+a^2\$$ and that $$\a\$$ is the same as my use of $$\\omega\$$, earlier above. So this is the same thing as $$\\left[\left(\frac{\text{d}}{\text{d}t}\right)^2+\omega^2\right]\$$ I provided above. (Note that both #19 and #20 have the same annihilator showing in their denominator. This means that sums of sine and cosine are annihilated, so long as they share the same $$\\alpha\$$ for the exp function and the same $$\\omega\$$ for the sine and cosine functions.)

This spotlights the tight bond between the differential operator Laplace domain and differential equations in the time domain. And it's hard to express in words the beauty and power of this relationship.

For all capacitive first order circuits, the response to a step is always the same. There is an exponential transition from the initial condition to the applied voltage. The process can be separated into two actions:

• Discharging the initial capacitor voltage to zero.
• Charging the capacitor to its final value ($$\V_{\text{supply}}\$$ or $$\V_{\text{Thevenin}}\$$).

While these two actions occur at the same time, they allow the response to be easily written as: $$v_C(t)=V_{CI}e^{\frac{-t}{RC}} + V_{1}(1-e^{\frac{-t}{RC}})$$

where $$\V_{CI}\$$ is the initial condition. Memorizing this provides a target for the analysis. The 1st term to the right of the equals sign is the discharge term. The second term is the charge term. These are also referred to as the zero-input (homogeneous) response and the zero-state (non-homogeneous) response respectively.

Superposition allows these two expressions to be solved separately then combined.

Choosing KCL to perform the analysis is ambiguous without specifying a reference node. For node 1 to be the capacitor voltage the reference should be the junction of C and R. Choosing the negative terminal of V1 would make $$\v_{\text{node1}}=v_1\$$. This may be part of the difficulty.

Instead, my choice would be to apply KVL to the mesh: $$RC\frac{dv_C}{dt}+v_C=v_1$$

This equation has two solutions, the zero-input (homogeneous) response and the zero-state (non-homogeneous) response.

The question already demonstrates that the zero-input solution to $$RC\frac{dv_C}{dt}+v_C=0\text{ is }v_{Czi}(t)=V_{CI}e^{\frac{-t}{RC}}$$

For the zero-state solution a simple change of variable allows the same approach to be used. The step input for $$\t\ge 0\$$, $$\v_1(t)=V_1\$$ a constant. Let $$\x=v_C-V_1\$$, then: $$RC\frac{dx}{dt}+x=0\Rightarrow x(t)=X_Ie^{\frac{-t}{RC}}$$

Back substituting reveals that: $$v_{Czs}(t)=V_{1}(1-e^{\frac{-t}{RC}})$$

So now the solution is obtained by super position.

The differential equation can also be obtained from KCL at node 1 by choosing the other terminal of the capacitor as the reference node (0V).

$$C\frac{dv_C}{dt}=\frac{v_1-v_c}{R}\Rightarrow RC\frac{dv_C}{dt}+v_C=v_1$$

as before.

The solution can also be written in the steady state, transient form as: $$v_C(t)=V_1+(V_{CI}-V_1)e^{\frac{-t}{\tau}}$$

Memorizing the two solution forms makes 1st order life easy.