Determining solution curve of ODE I have been introduced to autonomous ODE's and have recently come across the notion of a non-autonomous differential equation. After some reading, I came across this logistic model,
$$\frac{dx}{dt}=x(a(t)-b(t)x), \ \ \ \ x(s)=x_0.$$
Where $a(t),b(t)>0$.
And apparently, this logistic equation has 'relatively straightforward' asymptotic behaviour since there exists an explicit solution. My question is, how would you go about finding this explicit solution? All of the variables in this equation are dependent on time. It doesn't seem to be separable either. A hint would be greatly appreciated, just to get me started at finding a solution $\space x(t) \space$ to the above equation.
Thank you in advance!
 A: Note: I'm going to use a dot to denote differentiation w.r.t $t$.
First expand and move the linear $x$ term to the L.H.S:
$$\dot{x}-a(t)x=b(t)x^2$$
Make the substitution $s=x^{-1}$:
$$\dot{x}-\frac{a(t)}{s}=\frac{b(t)}{s^2}$$
Notice that $x=\frac{1}{s}$, therefore $\dot{x}=\frac{-\dot{s}}{s^2}$. So
$$\frac{-\dot{s}}{s^2}-\frac{a(t)}{s}=\frac{b(t)}{s^2}$$
Multiply through by $-s^2$:
$$\dot{s}+a(t)s=-b(t)$$
Now define $u=\exp\left(\int a(t)\mathrm{d}t\right)$ and multiply through:
$$u\dot{s}+u\cdot a(t)s=-u\cdot b(t)$$
Now notice that
$$\dot{u}=\exp\left(\int a(t)\mathrm{d}t\right)\frac{\mathrm{d}}{\mathrm{d}t}\left(\int a(t)\mathrm{d}t\right)=a(t)u$$
Therefore the differential equation can be stated as
$$u\dot{s}+\dot{u}s=-u\cdot b(t)$$
Notice that $u\dot{s}+\dot{u}s=\frac{\mathrm{d}}{\mathrm{d}t}(u\cdot s)$:
$$\frac{\mathrm{d}}{\mathrm{d}t}(u\cdot s)=-u\cdot b(t)$$
$$s=\frac{-1}{u}\int u\cdot b(t)\mathrm{d}t$$
Now since $s=1/x$,
$$x(t)=\frac{-\exp\left(\int a(t)\mathrm{d}t\right)}{\int \exp\left(\int a(t)\mathrm{d}t\right)\cdot b(t)\mathrm{d}t}$$
Which should line up with Wolfram's output. Suggested reading: https://en.wikipedia.org/wiki/Bernoulli_differential_equation
A: It is perhaps noteworthy to remark that for $x_0=0$ the unique solution is $x(t)=0$ for all $t$. This implies that when $x_0>0$ (or $x_0<0$) any maximal solution will stay non-zero. Thus the change of coordinates $z=1/x$ is legitimate in such a case:
$$ \dot{z}=-\dot{x}/x^2= -1/x(a_t-b_t x) = -z a_t + b_t$$
leading to $$ \dot{z} + a_t z = b_t$$
which may be solved using standard methods. When $a$ and $b$ are defined for all $t$ then so is the flow for the latter ode. It may, however, cross $z=0$ corresponding to $x$ passing through infinity in a regular way on the projective line.
