How do I find a function from a differential equation? Hey, I'm looking for a guide on how I find Q given the following, where $a$ and $b$ are constants:
\begin{equation}
\frac{dQ}{dt} = \frac{a + Q}{b}
\end{equation}
I have the answer and working for specific case I'm trying to solve but do not understand the steps involved. A guide on how I can solve this, with an explanation of each step would be much appreciated.
 A: Yet, another method for solving this differential equation is to look at it as a linear differential equation, whose general form is:
$$
y'(x) = a(x) y(x) + b(x) \ , \qquad\qquad\qquad [1]
$$
where $a(x), b(x)$ are arbitrary functions depending on the variable $x$. In your case:
$$
x = t \ , y(x) = Q(t) \ , b(x) = \frac{a}{b} \quad \text{and}\quad a(x) = \frac{1}{b} \ .
$$
A general procedure for solving [1] is the following:
1. First, try to solve the associated homogeneous linear differential equation
$$
y' = a(x)y \ .  \qquad\qquad\qquad    [2]
$$
This is easy: the general solution is
$$
y = K e^{A(x)} \ ,   \qquad\qquad\qquad   [3]
$$
where $K\in \mathbb{R}$ is an arbitrary constant and $A(x) = \int a(x)dx$ is a primitive function of $a(x)$.
2. Once you have the general solution [3] of [2], you apply variation of constants; that is, you look for solutions of [1] of the following kind:
$$
y = K(x) e^{A(x)} \ .   \qquad \qquad \qquad  [4]
$$
Here, we have replaced the arbitrary constant $K$ by an arbitrary unkown function $K(x)$ (hence the name "variation of constants") to be determined. How? Imposing that we want [4] to be a solution of our first differential equation [1]. It goes like this: if you replace $y$ in [4] into [1], you get
$$
K'(x) e^{A(x)} + K(x) A'(x) e^{A(x)} = a(x) K(x) e^{A(x)} + b(x) \ .
$$
Since $A'(x) = a(x) $, this is the same as
$$
K'(x) e^{A(x)} = b(x) \ .
$$
So
$$
K(x) = \int b(x)e^{-A(x)}dx + C \ ,
$$
where $C \in \mathbb{R}$ is an arbitrary constant. Now you put this $K(x)$ into [4] and get the general solution of your differential equation:
$$
y(x) = Ce^{A(x)} + e^{A(x)}\int b(x) e^{-A(x)}dx \ . \qquad\qquad\qquad   [5]
$$
Since I've never could remember formula [5], I use to repeat the whole process for each particular linear differential equation, which is not hard and you can do it for yours.
A: Edit: Your particular differential equation can be solved without any calculation if you know the solutions of $$\frac{dQ}{dt} = Q$$, i.e. $C\exp(t), C\in\mathbb{R}$.
Note that, if $f$ is a solution to $\frac{dQ}{dt} = \frac 1b Q$, then $f-a$ is a solution to your equation, therefore is suffices to only look at $a=0$.
The chain rule can be used to see, that if $f$ solves $\frac{dQ}{dt} = Q$, then $f(t/b)$ solves $\frac{dQ}{dt} = \frac 1b Q$.
Therefore all your solutions are of the form $C\exp(t/b) - a, C\in\mathbb{R}$.

Old Post:
I think these differential equations can be solved by "Separation of Variables". See the Wikipedia for a guide. It's got examples! =)
A: To deal well with substitution of variables in differential equations you should know when there is a differential operator and when there is a derivative. In the first case a variable is linked with differential operator and changing it you should also change a differential operator, in the second a derivative is just a function so you can simultaneously change the same argument in all equation's functions.
Let's see on your equation.
$$\frac{dQ}{dt}=\frac{a+Q}{b}$$
And rewrite it using a differential operator notation:
$$\frac{d}{dt}[Q(t)]=\frac{a+Q(t)}{b}$$
Let's define a functional map $F_1(f)(x)=f(x)-a$, obvious this map is bijection and let $g$ be a solution of $F_1(g)=Q$. So $Q(t)=F_1(g)(t)=g(t)-a$ and we rewrite the equation:
$$\frac{d}{dt}[g(t)-a]=\frac{a+g(t)-a}{b}$$
Reduce it and calculate a derivative:
$$g'(t)=\frac{1}{b}g(t)$$
And back to a differential operator notation:
$$\frac{d}{dt}[g(t)]=\frac{1}{b}g(t)$$
Repeat the trick with a map $F_2(f)(x)=f(\frac{1}{b}x)$, let $w$ be a solution of $F_2(w)=g$, so $g(t)=F_2(w)(t)=w(\frac{1}{b}t)$ and substitute it into the equation:
$$\frac{d}{dt}[w(\frac{1}{b}t)]=\frac{1}{b}w(\frac{1}{b}t)$$
Calculate a derivative and reduce:
$$w'(\frac{1}{b}t)=w(\frac{1}{b}t)$$
But there is no a differential operator, so we change an argument $\frac{1}{b}t$ to $t$ in whole equation:
$$w'(t)=w(t)$$
It's known that a solution is $w(t)=C_1e^t$ and $Q=F_1(F_2(w))$ so $Q(t)=C_1e^{\frac{1}{b}t}-a$
This is a very verbose solution, but then understand it you can just use rules of substitution of variables and solve an equation in a few lines.
A: Very old question. I am just going to write down a shorter answer, it may be help new visitors to learn separation of variables easily (I have just learned it now :P came to ask related question but going to answer :P).
Your given equation is $$\dfrac{dQ}{dt}=\dfrac{a+Q}{b}$$ and you mentioned that $a$ and $b$ are constants. Just manipulate the equation
$$\dfrac{1}{a+Q}dQ=\dfrac{1}{b}dt$$
I have to find a function of $Q$. And $a$ and $b$ are constants, so you can just integrate over them with respect to anything easily. That's why I planned to send Q to integrate with respect to Q since Q is $t$ dependent but I don't know what the function of Q is so I can't do anything with Q with respect to $t$.
Now integrate both side
$$\implies\int\dfrac{1}{a+Q(t)} \ \mathrm dQ=\dfrac{t}{b}+C$$
$$\implies \ln |a+Q(t)|=\dfrac{t}{b}+C$$
$$\implies a+Q(t)=e^{\dfrac{t}{b}+C}$$
$$\implies Q(t)=e^{\dfrac{t}{b}+C}-a$$
Here, $C$ is just a constant. If $Q(0)=0$ then $C=0$
