How do I solve this kind of differential equation? $ $ $\frac{dy}{dx} + ay^2+b = 0$ How do I solve this kind of differential equation?
$$\frac{dy}{dx} + ay^2+b = 0$$
I'm not seeing how to deal with the $y^2$ part. $ $  I suppose there's a simple technique.
 A: $$\frac{dy}{dx}= -(ay^2+b)$$
$$\frac{y'}{(ay^2+b)}= -1$$
This is now a standard integral that can be solved using substitution.
A: You have an equation of the form $y'=f(y)$ so you'll end up finding an antiderivative for $\dfrac 1f$.
So you want to make known derivatives appear, and in this case groups like $1+u^2$ or $1-u^2$ related to $\tan$ and $\tanh$.
The first thing to do is to make a variable change for the group $ay^2+b$ to become standard. So we see there many cases depending on whether $a$ and $b$ have the same sign or not, are zero or not.
case 1: $a=b=0$
$y'=0\iff y=y_0$

case 2: $a=0,b\neq 0$
$y'=-b\iff y=b(x_0-x)$

case 3: $a\neq 0,b=0$
$y'=-ay^2\quad$ so $y$ is monotonous and can annulate at most $1$ time.
On each of the two intervals where $y(x)\neq 0$ let's set $y=\frac 1u$ we get $-\frac {u'}{u^2}=-\frac a{u^2}\iff u'=a$
So $u=a(x-x_0)$ and $y=\dfrac 1{a(x-x_0)}$

case 4: $ab>0\quad \sigma=\operatorname{sgn}(b)=\pm 1$
Let's set $y=\sqrt{\frac ba}\, u\quad$ the equation becomes
$\sqrt{\frac ba}u'+a\frac bau^2+b=\sqrt{\frac ba}u'+b(u^2+1)=0\iff u'+\sigma\sqrt{ab}(1+u^2)=0$
Let's set $u=\tan v\quad$ and substitute
$v'(1+u^2)+\sigma\sqrt{ab}(1+u^2)=0\iff v'=-\sigma\sqrt{ab}\iff v=\sigma\sqrt{ab}(x_0-x)$
Finally $y=\sqrt{\frac ba}\tan\left(\sigma\sqrt{ab}(x_0-x)\right)$

case 5: $ab<0\quad\sigma=\operatorname{sgn}(b)=\pm 1$
Let's set $y=\sqrt{-\frac ba}\, u\quad$ the equation becomes
$\sqrt{-\frac ba}u'-a\frac bau^2+b=\sqrt{-\frac ba}u'+b(1-u^2)=0\iff u'+\sigma\sqrt{-ab}(1-u^2)=0$
Let's set $u=\tanh v\quad$ and substitute
$v'(1-u^2)+\sigma\sqrt{-ab}(1-u^2)=0\iff v'=-\sigma\sqrt{-ab}\iff v=\sigma\sqrt{-ab}(x_0-x)$
Finally $y=\sqrt{-\frac ba}\tanh\left(\sigma\sqrt{-ab}(x_0-x)\right)$
