General Differential Equations Salt Tank question. I am attempting to model a relatively easy ODE differential problem, but I seem to be missing something. 
The model will be distilled into a spreadsheet that uses the variables as inputs into the final equation. The problem is written as such
$y' = R_\text{in} C_1 - y/V_1 * R_\text{out}$. 
Rate in and Rate out will always be equal to each other, but not necessarily the same. Therefore my volume will never change for each instance of the model.
$y$ is the amount of contaminant in the system at any given time. 
$y'$ is change in contaminant in the system at any given time. 
$V_1$ is the volume of the system, which will remain constant for each problem, but needs to be a variable dependant on the system being modeled.
C1 is concentration of the influent, which is static per instance, but variable each time the model is used.  
I am trying to solve this. It has been a few years since my DiffEQ days and my attempts to solidify the model are proving fruitless. Every time I find an answer depicted, it always uses an actual number and cancelation in the derivation/integration steps. 
Any help is greatly appreciated! 
Thank you. 
 A: The phrase "Rate in and Rate out will always be equal to each other, but not necessarily the same" engenders some hesitation in me, but I'll assume that means they are arbitrary constants at best and not functions of $y$ at the least (to ensure linearity).
If that assumption is true, we have:


*

*linear (no $y(t)$s or it derivatives multiplying one another);

*non-separable (cannot create the construction $ f(y) \mathrm{d}y = g(t) \mathrm{d}t$);

*non-homogeneous (since the influent acts as a source terms);

*first-order (highest derivative being $1$);

*ordinary (one independent variable)


differential equation.
Reposing the problem in a more general form by letting $p(t) = R_{\mbox{out}}/V_1$ and $q(t) = C_1 R_{\mbox{in}}$, the ODE is 
$$
\frac{\mathrm{d}y}{\mathrm{d}t}+ p(t) y(t) = q(t)
$$
My preferred tool of choice for solving this kind of problem (and others) is the integrating factor.
If a function $\mu(t)$ has the definition
$$
\mu(t) = \exp\left(\int p(t)\mathrm{d}t\right) \mbox{,}
$$
multiplying $\mu(t)$ through our ODE yields an exact differential by construction (see the Wikipedia page for details).
This means we can re-write the ODE as
$$
\frac{\mathrm{d}}{\mathrm{d}t} \left[\mu(t) y(t)\right] = \mu(t)q(t)
$$
We can now solve the ODE by integrating definitely
$$
\int_{t_0}^{t}\frac{\mathrm{d}}{\mathrm{d}t'} \left[\mu(t') y(t')\right]\mathrm{d}t' = \int_{t_0}^{t}\mu(t')q(t') \mathrm{d}t'
$$
$$
\mu(t) y(t) - \mu(t_0) y(t_0) = \int_{t_0}^{t}\mu(t')q(t') \mathrm{d}t'
$$
$$
y(t) = \frac{\mu(t_0)}{\mu(t)} y(t_0) + \frac{1}{\mu(t)}\int_{t_0}^{t}\mu(t')q(t') \mathrm{d}t'
$$
Plugging in our actual, constant data into the integrating factor, then into the above formula, letting $y(t_0) = y_0$, and simplifying yields
$$
y(t) = C_1 V_1 \frac{R_\mbox{in}}{R_\mbox{out}}\left[1- \exp\left(\frac{R_{\mbox{out}} (t_0 - t)}{V_1}\right)\right] + y_0\exp\left[\frac{R_{\mbox{out}} (t_0 - t)}{V_1}\right]
$$
I hope this is what you were looking for.
