Find general solution of first order DE using integrating factor I have the equation
$$R\frac{dq(t)}{dt}+\frac{q(t)}{C}-V_0=0$$
And am asked to find the general solution using the integrating factor. 
I am a bit confused as I have been shown two ways to do it. The first is using the form 
$$y(x)=e^{-\int{p(x)}}*\int{e^{\int{p(x)}}}q(x)dx$$
The first step was to get it into the right form. All I know is that $\frac{dq}{dt}$ cannot by multiplied by anything. Because it is multiplied by R, I divide the rest of the equation by R.
$$\frac{dq(t)}{dt}+\frac{q(t)}{RC}-\frac{V_0}{R}=0$$
The next thing is I have to put it into the product rule form i.e
$$\frac{dy}{dx}+p(x)y(x)=q(x)$$
Now this is where I am a little confused. I don't see a p(x). But I assume it is referring to $\frac{1}{RC}$? And y(x) is q(t), and q(x) is the same as $\frac{V_0}{R}$?
So I have 
$$\frac{dq(t)}{dt}+\frac{1}{RC}q(t)=\frac{V_0}{R}$$
Using the 'integrating factor formula'? above I have
$$q(t)=e^{-\int{\frac{1}{RC}}}*\int{e^{\int{\frac{1}{RC}}}\frac{V_0}{R}dt}$$
$\int{\frac{1}{RC}}dt=\frac{t}{RC}+C$ (But the C is disregarded in exponentials?)
$$q(t)=e^{-\frac{t}{RC}}\cdot\frac{V_0}{R}\cdot\int{e^{\frac{t}{RC}}dt}$$
$$=e^{-\frac{t}{RC}}\cdot\frac{V_0}{R}\cdot\left[\frac{1}{(\frac{1}{RC})}\cdot{e^{\frac{t}{RC}}}+C_1\right]$$
$$=e^{-\frac{t}{RC}}\cdot\frac{V_0}{R}\cdot\left[RC\cdot{e^{\frac{t}{RC}}}+C_1\right]$$
$$=e^{-\frac{t}{RC}}\cdot\frac{V_0}{R}\cdot{C_1}+e^{-\frac{t}{RC}}\cdot\frac{V_0}{R}RC\cdot{e^{\frac{t}{RC}}}$$
$$=e^{-\frac{t}{RC}}\cdot\frac{V_0C_1}{R}+\frac{V_0}{R}RC$$
$$q(t)=e^{-\frac{t}{RC}}\cdot\frac{V_0C_1}{R}+V_0C$$
However... I tried to find the general solution using another way, where I find the integrating factor of p(x) and simply multiply it through. This never seemed to get me anywhere. The start was the same. I structured the equation as so. 
$$\frac{dq(t)}{dt}+\frac{1}{RC}q(t)=\frac{V_0}{R}$$
From there I found $e^{\int{p(x)}}$ = $e^{\frac{t}{RC}}$
So I multiplied that through
$$e^{\frac{t}{RC}}\cdot{\frac{dq(t)}{dt}}+e^{\frac{t}{RC}}\cdot{\frac{q(t)}{CR}}=\frac{V_0}{R}\cdot{e^{\frac{t}{RC}}}$$
But from here I have no idea what to do. Naturally I would just cancel them out because it doesn't seem to make things any easier. My question is which method should I be using, and where have I gone wrong?
 A: Now, make a substitution: $e^\frac{t}{RC}q(t)=z$. Hope you can do the rest easily.
A: As a way to interpret the integrating factor:
If we propose that for the equation 
$$
\frac{dy(x)}{dx} + p(x)y(x) = q(x)
$$
we can multiply through by a function $\phi(x)$ we will then obtain
$$
\phi(x)\frac{dy(x)}{dx} + p(x)\phi(x)y(x) = \phi(x)q(x)
$$
then using $\frac{d}{dx}\left(fg\right) = \frac{df}{dx}g + f\frac{dg}{dx}$
we find that 
$$
\phi(x)\frac{dy(x)}{dx} = \frac{d}{dx}\left(\phi(x)y(x)\right) - \frac{d\phi(x)}{dx}y(x)
$$
then inserting back into equation above we find
$$
\left[\frac{d}{dx}\left(\phi(x)y(x)\right) - \frac{d\phi(x)}{dx}y(x)\right] + p(x)\phi(x)y(x) = \phi(x)q(x)
$$
then collecting the terms linear in $y(x)$
$$
\frac{d}{dx}\left(\phi(x)y(x)\right) -\left[\frac{d\phi(x)}{dx} - p(x)\phi(x)\right]y(x) = \phi(x)q(x)
$$
The next reduction is to make the argument of $[...]$ identically zero i.e.
$$
\frac{d\phi(x)}{dx} - p(x)\phi(x) = 0
$$
the solution of the above is then
$$
\phi(x) = \mathrm{e}^{\int p(x)dx}
$$ 
(note we should really use dummy variables in the integral)
This transforms the equation (with subbing back the form of $\phi(x)$ as
$$
\frac{d}{dx}\left(\mathrm{e}^{\int p(x)dx}y(x)\right) -0*y(x) = \mathrm{e}^{\int p(x)dx}q(x)
$$
Now integrate both sides
$$
\mathrm{e}^{\int p(x)dx}y(x) = \int \mathrm{e}^{\int p(x)dx}q(x) dx.
$$
$\textbf{Edit:}$
The solution to the above is 
$$
q(t) = q(0)\mathrm{e}^{-\frac{t}{RC}} + V_{0}C\left[1-\mathrm{e}^{-\frac{t}{RC}} \right].
$$
where $q(0)$ is the initial condition. This arises from
$$
q(t)\mathrm{\frac{t}{RC}} = \int \frac{V_{0}}{R}\mathrm{e}^{\frac{t}{RC}} +\lambda = \frac{V_{0}}{R}\frac{1}{1/RC}\mathrm{e}^{\frac{t}{RC}} + \lambda
$$
