Solving this integral involving Ei function? How do I get a closed form for the answer of this differential equation?
$\frac{dN}{dt} = N*e^{r*(1-\frac{N}{K})}$
where r = 2.5
K = 1000
and at t=0, $N_0$ = 10.
The limits on the integral go from 0 to t for $dt$ and $N_0$ to $N_t$ for dN.
I tried using the Ei function, but pretty much got confused and made a mess of it.
 A: First lets make a change of variables: $y=\frac{r}{K}N$ and $x=\mathrm{e}^r t$. Your ODE then becomes:
$$\frac{dy}{dx} = y \mathrm{e}^{-y}, ~~~ y(0)=y_0=\frac{r}{K}N_0$$
with solution:
$$ y(x) = \mathrm{Ei}^{-1}(x + \mathrm{Ei}(y_0))$$
Or using original variables:
$$ N(t) = \frac{K}{r} \mathrm{Ei}^{-1}\left(\mathrm{e}^r t + \mathrm{Ei}\left(\frac{r}{K}N_0\right)\right)$$
Update: $\mathrm{Ei}^{-1}$
To define what $\mathrm{Ei}^{-1}$ means, we use the one to one mapping between $x$ and $y$ in
$$ \mathrm{Ei}(y) - \mathrm{Ei}(y_0) = x$$
It's a one to one mapping because of following observations.
a) $y(x)$ is strictly monotonic increasing and $y(x) \gt 0$ for $x \ge 0$, since $y' \gt 0$ for $y \gt 0$ (follows from the ODE) and $y(0) \gt 0$ (given initial condition).
b) From $\mathrm{Ei}(y)'=\frac{\mathrm{e}^y}{y}$ it follows that $\mathrm{Ei}(y)$ is strictly monotonic increasing for $ y \gt 0$.
Taken together, this means that whenever $x$ increases, the lhs increases as well and that there is a unique positive value $y$ for each $x \ge 0$.
