Circuit analysis for RC circuit
The schematic is:







simulate this circuit &ndash; Schematic created using CircuitLab

Before I get into the nodal analysis, it might help to know that the capacitor, \$C\$, will have a current in it that follows the equation: \$I_\text{C}=C\frac{\text{d}V_\text{C}}{\text{d}t}\$.

Using nodal analysis, outflowing currents on the left and inflowing currents on the right, I get these two simultaneous equations from the two unknown nodes, \$V_1\$ and \$V_2\$:

$$\begin{align*}
\frac{V_1}{R_1}+C\frac{\text{d}V_1}{\text{d}t}&amp;=\frac{V_0}{R_1}+C\frac{\text{d}V_2}{\text{d}t}\\\\
\frac{V_2}{R_2}+C\frac{\text{d}V_2}{\text{d}t}&amp;=C\frac{\text{d}V_1}{\text{d}t}
\end{align*}$$

It's very convenient at this point to define \$V_\text{C}=V_1-V_2\$. The following will show why. I'm placing the first equation on the left side and the second equation on the right side, as I develop them further here:

$$\begin{align*}
\frac{V_1}{R_1}+C\frac{\text{d}V_1}{\text{d}t}&amp;=\frac{V_0}{R_1}+C\frac{\text{d}V_2}{\text{d}t}
\quad&amp; \quad
\frac{V_2}{R_2}+C\frac{\text{d}V_2}{\text{d}t}&amp;=C\frac{\text{d}V_1}{\text{d}t}\\\\
\frac{V_1}{R_1}+C\frac{\text{d}\left(V_1-V_2\right)}{\text{d}t}&amp;=\frac{V_0}{R_1}
\quad&amp; \quad \frac{V_2}{R_2}&amp;=C\frac{\text{d}\left(V_1-V_2\right)}{\text{d}t}\\\\
\frac{V_1}{R_1}+C\frac{\text{d}V_\text{C}}{\text{d}t}&amp;=\frac{V_0}{R_1}
\quad&amp; \quad \frac{V_2}{R_2}&amp;=C\frac{\text{d}V_\text{C}}{\text{d}t}\\\\
V_1+R_1 C\frac{\text{d}V_\text{C}}{\text{d}t}&amp;=V_0
\quad&amp; \quad V_2-R_2 C\frac{\text{d}V_\text{C}}{\text{d}t}&amp;=0
\end{align*}$$

Now subtract the right equation from the left:

$$\begin{align*}
V_1+R_1 C\frac{\text{d}V_\text{C}}{\text{d}t}-V_2+R_2 C\frac{\text{d}V_\text{C}}{\text{d}t}&amp;=V_0\\\\
\left(V_1-V_2\right)+R_1 C\frac{\text{d}V_\text{C}}{\text{d}t}+R_2 C\frac{\text{d}V_\text{C}}{\text{d}t}&amp;=V_0\\\\
V_\text{C}+\left(R_1+R_2\right) C\frac{\text{d}V_\text{C}}{\text{d}t}&amp;=V_0
\end{align*}$$

Which in standard form would look like:

$$\frac{\text{d}V_\text{C}}{\text{d}t}+\frac{1}{\left(R_1+R_2\right) C} V_\text{C}=\frac{V_0}{\left(R_1+R_2\right) C}$$

(You might also notice that the values of \$R_1\$ and \$R_2\$ have been added, as you might expect to see happen in a series circuit like this. Nothing shocking about that fact.)

I think you can see how to solve that. It's just a first order linear ordinary diff-eq that can be solved in a variety of well-known ways.



To keep this a little simpler, set \$\tau=\left(R_1+R_2\right) C\$. Then for example, use the integrating factor method setting \$P_t=\frac{1}{\tau}\$ and \$Q_t=\frac{V_0}{\tau}\$. The integrating factor is then \$\mu=e^{\int P_t \:\text{d}t}=e^\frac{t}{\tau}\$ and the solution is:

$$\begin{align*}
V_\text{C}&amp;=\frac{1}{\mu}\int \mu \:Q_t\:\text{d}t=\frac{1}{\mu}\frac{V_0}{\tau}\int \mu \:\text{d}t=\frac{1}{\mu}\frac{V_0}{\tau}\bigg[\tau \mu + A_0\bigg]\\\\
&amp;=V_0 + \frac{1}{\mu}\frac{V_0}{\tau}A_0
\end{align*}$$

To meet the initial condition (assumed) of \$V_\text{C}=0\:\text{V}\$ at \$t=0\$, (when \$\mu=1\$), it must be the case that the constant of integration is \$A_0=-\tau\$.

So the final result of all this is:

$$\begin{align*}
V_\text{C}&amp;=V_0 - \frac{1}{\mu} V_0=V_0\left(1-e^\frac{-t}{\tau}\right)
\end{align*}$$



At this point, you still haven't arrived at an answer to your question. The above does not solve for \$V_2\$ as a function of time. It winds up solving the capacitor's voltage as a function of time. However, that is useful to know and you can use that solution to compute the current as a function of time. Knowing the current as a function of time, you've got the voltage drop of \$R_2\$ as a trivial output.

$$I_\text{C}=C\frac{\text{d}V_\text{C}}{\text{d}t}=C\left[\frac{V_0}{\tau}e^\frac{-t}{\tau}\right]=\frac{V_0}{R_1+R_2}\cdot e^\frac{-t}{\tau}$$

Therefore:

$$V_2=R_2\cdot I_\text{C}=V_0\frac{R_2}{R_1+R_2}\cdot e^\frac{-t}{\tau}$$

The voltage divider factor stands out like a sore-thumb here.



The simple approach would have been to treat this as a simple RC decay, where \$R=R_1+R_2\$. You wouldn't work as hard, that way. But then, it only gets you one answer rather than learning how to fish for answers, I suppose.

Or you could simultaneously solve the initial pairs of equations; either through substitution and solution or else by sorting out the homogeneous and steady state solutions.

I suppose it depends on what you feel like, at the time?