# General solution using separation of variables

Ok I have the equation:

$$R\frac{dq(t)}{dt} + \frac{q(t)}{C} - V = 0$$

and have been asked to find the general solution using separation of variables. I am unsure if I am rearranging the the equation correctly. Here is my attempt:

$$CR \ dq(t) = (-q(t) + VC) \ dt$$

Which then I integrate both sides giving me:

$$CR \ q(t)=-q(t)t+VCt$$

Which I rearrange in terms of q(t):

$$q(t) = \frac{VCt}{CR+t}$$

I just wanted to confirm I performed the steps correctly. Alot of the online examples are in terms of $x$ and $y$, seeing the $dq(t)$ has really confused my perspective of the solution.

Thanks

• You could always use find and replace on a text edit to perform $q\to y$. – Git Gud May 2 '14 at 1:40
• Yeah that's true, but then would $\frac{dq(t)}{dt}$ equal $y'$? If so then there's only one 'function' in the equation? – user142973 May 2 '14 at 1:42
• Yes, the notation $\dfrac{dq(t)}{dt}$ is short for $\dfrac{dq}{dt}(t)$ which is the derivative of $q$ evaluated at $t$, just like $q'(t)$. – Git Gud May 2 '14 at 1:44
• The thing that bothers me is that when I integrate both sides, I'm integrating a function $q(t)$ and treating it like a variable, whereas it should have some sort of function with respect to $t$ within it. Am I correct in assuming it's a variable and just integrating it? – user142973 May 2 '14 at 1:49
• Very nice observation. Your question is answered here. TL.DR: you can treat as a variable, it works, even though it doesn't make sense. – Git Gud May 2 '14 at 1:51

The "variables", which are $\ q \$ and $\ t \$ , have not actually been separated in your expression: you need to divide $\ CR \ dq = (-q(t) + VC) \ dt \$ through to write
$$\frac{dq}{q \ - \ VC} \ = \ -\frac{1}{CR} \ dt \ \ ,$$
before proceeding to integrate both sides. This can now be accomplished with a $\ u-$ substitution.
• Thankyou for that, I just had an epiphany when I replaced the $q(t)$ with $y$ and realised that there is no dependant $t$ variable as with most $x$ and $y$ examples. That really helps, thanks again. – user142973 May 2 '14 at 1:56