What is the general solution of this equation:
$Q \frac{\partial C}{\partial V} + r = \frac{\partial C}{\partial t}$
where Q and r are constants?
I tried to use the method of separation of variables but it doesn't work. Any help will be really appreciated.
Rewriting your equation a little, we have $$ \partial_t C - Q\partial_V C = r. $$ This can be written as $$ DC\begin{pmatrix} 1\\ -Q\end{pmatrix} = r $$ That is the directional derivative in direction $(1,-Q)^t$ is $r$. So let us consider $C$ in this direction, define $f \colon [0,\infty) \to \mathbb R$ by $f(t) := C(t, V_0 - tQ)$, we have \begin{align*} f'(t) &= \partial_t C(t, V_0 - tQ) - Q\partial_V C(t, V_0 - tQ)\\ &= r \end{align*} for any $t \ge 0$. Hence, by integrating \begin{align*} f(t) &= f(0) + \int_0^t f'(s)\, ds\\ &= C(0, V_0) + rt \end{align*} So, the solution is given by $$ C(t, V) = C(t, V + tQ - tQ) = C(0, V+tQ) + rt $$ for some initial function $C(0,\cdot)$.