<s>[INST] Solving $\frac{dP}{dt} = P(a - b\sqrt P)$ using separation of variables I need to solve the following differential equation using separation of variables but I am unsure on how to do this
$$
\frac{dP}{dt} = P(a - b\sqrt P)
$$
Where $p(0) = 4$, $a = 0.302$ and $b =0.002$
I tried substituting $P = u^2$ as a change of variables to help me solve the equation.
 [/INST] $$\begin{aligned}\frac{dP}{dt}& = P(a - b\sqrt P)\\ 
(\text{Replacing }P(t)=(u(t)^2))\implies 2u\frac{du}{dt} &=u^2(a-bu) \\ (u(t)\equiv_t 0,\text{ i.e.} u(t)=0 \ \forall t, \text{ or}\cdots )  \implies2\dfrac{du}{dt} & = u(a-bu) \\ \implies \int dt = \int \dfrac{2du}{u(a-bu)}&=\dfrac{2b}{a}\int \dfrac{a}{bu(a-bu)}du\\  = \dfrac{2}{a}\int\left(\dfrac1{\frac{a}{b}-u}+\dfrac1{u}\right)du &=\dfrac{2}{a}\ln\left(\dfrac{u}{\frac{a}{b}-u}\right) +c\\ \implies t &=\dfrac2a\ln\left(\dfrac{bu}{a-bu}\right)+C\end{aligned}$$
Thus we have
$$\begin{aligned} \exp\left(\dfrac{a(t-C)}2\right)&=\dfrac{bu}{a-bu} \\ \implies \exp\left(\dfrac{a(C-t)}2\right)&=\dfrac{a-bu}{bu}=\dfrac{a}{bu}-1 \\ \implies 1+\exp\left(\dfrac{a(C-t)}2\right) &= \dfrac{a}{bu(t)} \\ \implies \sqrt{P(t)}= u(t)&=\dfrac{a}{b\left(1+\exp\left(\dfrac{a(C-t)}2\right)\right)} \\ \implies P(t) & = \dfrac{a^2}{b^2\left(1+\exp\left(\dfrac{a(C-t)}2\right)\right)^2} \end{aligned}$$
where $C$ is the constant of integration, which can be found by substituting the values of $a,b$ and $t=0, P(0)=4$.
</s>