Given $\frac{du}{dt}=au+1$, $u(0)=1$ and $\frac{dv}{dt}=bv+1$, $v(0)=1$, what are $u$ and $v$? I have the following problem which I cannot solve. I get a similar result, but nothing like the actual answer... I know this is very basic, but I cannot solve it. I would really appreciate it if someone could show me the substitution/step my professor took to solve it. Thanks a lot!
So I am given $\frac{du}{dt}=au+1$, $u(0)=1$ and $\frac{dv}{dt}=bv+1$, $v(0)=1$, what is $u$ and $v$?
I tried to solve it like this, but did not get anything:
$$\frac{du}{dt}=au+1 \implies \frac{du}{u dt}=a+1/u \implies \frac{du}{u}=(a+1/u)dt$$
But then when I integrate on both sides, I get the following:
$$\ln{u}=at+\frac{1}{u}t \implies u=e^{at}+e^{t/u}$$
However, the results for $u$ and $v$ are:
$$u=e^{at}+\frac{e^{at}-1}{a}\quad and \quad v=e^{bt}+\frac{e^{bt}-1}{b}$$
 A: First off, note that
$\dfrac{du}{dt} = au + 1 \tag{1}$
and
$\dfrac{dv}{dt} = bv + 1 \tag{2}$
are really instances of the same equation
$\dfrac{dx}{dt} = \lambda x + \gamma, \;\; x(t_0) = x_0, \tag{3}$
with different parameter values in each instance.  Here $\lambda$ and $\gamma$ and $x_0$ are constants, with $x_0$ being an initial condition.
The difficulty our OP user133971 encountered in the attempt to solve such equations lies in the division by $u$ to obtain
$\dfrac{1}{u}\dfrac{du}{dt} = a + \dfrac{1}{u}, \tag{4}$
and the attempt to integrate this equation as is, via
$\int_{u_0}^u \dfrac{du}{u} = \int_{t_0}^t \dfrac{1}{u(s)} \dfrac{du(s)}{ds}ds = \int_{t_0}^t a ds + \int_{t_0}^t \dfrac{ds}{u(s)}; \tag{5}$
for though it is correct to write
$\int_{u_0}^u \dfrac{du}{u} = \ln u - \ln u_0 = \ln(\dfrac{u}{u_0}) \tag{6}$
and
$\int_{t_0}^t a ds = a(t - t_0), \tag{7}$
it is a fundamental error to assume
$\int_{t_0}^t \dfrac{ds}{u(s)} = \dfrac{t - t_0}{u}, \tag{8}$
since $u(t)$, as a function of $t$, cannot be treated as a constant and pulled out of the integral.  Indeed, the antiderivative of $1/u(t)$ is mos' 'def NOT $t/u(t)$, since
$\dfrac{d}{dt}(\dfrac{t}{u(t)}) = \dfrac{u(t) - t(du/dt(t))}{u^2(t)} \ne \dfrac{1}{u(t)} \tag{9}$
unless $du/dt = 0$.  This mistake led to the errors in the OP's final results.  
An easy way to solve equations such as (3) is to write them as
$\dfrac{dx}{dt} - \lambda x = \gamma, \;\; x(t_0) = x_0, \tag{10}$
and observe that
$\dfrac{d}{dt}(e^{-\lambda t}x(t)) = -\lambda e^{-\lambda t} x(t) + e^{-\lambda t} \dfrac{dx(t)}{dt}; \tag{11}$
this is the so-called integrating factor method, for if we multiply (10) through by $e^{-\lambda t}$ we obtain
$e^{-\lambda t} \dfrac{dx}{dt} - \lambda e^{-\lambda t} x = \gamma e^{-\lambda t} \tag{12}$
or, by (11),
$\dfrac{d}{dt}(e^{-\lambda t} x(t)) = \gamma e^{-\lambda t}; \tag{13}$
(13) may now be readily integrated with respect to $t$:
$e^{-\lambda t}x(t) - e^{-\lambda t_0} x(t_0) = \int_{t_0}^t \dfrac{d}{ds}(e^{-\lambda s}x(s))ds = \int_{t_0}^t \gamma e^{-\lambda s} ds = \dfrac{\gamma}{\lambda}(e^{-\lambda t_0} - e^{-\lambda t}), \tag{14}$
from which $x(t)$ may be isolated by a few little algebraic maneuvers:
$x(t) = e^{\lambda (t - t_0)}x(t_0) + \dfrac{\gamma}{\lambda}(e^{\lambda(t - t_0)} - 1); \tag{15}$
that (15) solves (3) with the given initial condition is easily checked; the details are left to the reader.  
Setting $t_0 = 0$, $x(0) = 1$, and $\gamma = 1$ we find
$x(t) = e^{\lambda t} + \dfrac{e^{\lambda t} - 1}{\lambda}; \tag{16}$
setting $\lambda = a, b$ turns (17) into the reported correct forms for $u(t)$ and $v(t)$, respectively.
