I'd like to compute the following derivative (i.e., solve for $v$):
\begin{align} \frac{dv}{dt} = \frac{-v(t) + I_{rec}(t) + I_{ext}(t)}{\tau_m}. \end{align}
I know that if I had $\frac{dv}{dt}=\frac{-v(t)}{\tau_m}$, I'd have $v(t) = e^{-t/\tau_m}$. But it's not clear to me what to do here.
Any help would be much appreciated.
You have an equation of the form $$ v'(t) + av(t) = f(t), $$ for some $a \in \mathbb{R}$. The homogeneous solution is indeed $v(t) = Ce^{-t/a}$. Now you need to pick a particular solution $v_p(t)$ of this equation, and the general solution would be given by $$v(t) = Ce^{-t/a} + v_p(t).$$
Picking the particular solution can be done by guessing if the form of $f(x)$ is suggestive, or by variation of parameters.