Help solving variable separable ODE: $y' = \frac{1}{2} a y^2 + b y - 1$ with $y(0)=0$ I am studying for an exam about ODEs and I am struggling with one of the past exam questions. The past exam shows one exercise which asks us to solve:
$$y' = \frac{1}{2} a y^2 + b y - 1$$with $y(0)=0$
The solution is given as
$$y(x) = \frac{2 \left( e^{\Gamma x} - 1 \right)}{(b + \Gamma)(e^{\Gamma x} - 1) + 2\Gamma},$$ with $\Gamma = \sqrt{b^2 + 2a}$

I am really getting stuck at this exercise and would love to have someone show me how this solution is derived.
One thing I did find out is that this ODE is variable separable. That is,
$$y' = g(x)h(y) = (1) \cdot (\frac{1}{2} ay^2 + by - 1),$$ and therefore the solution would result from solving
$$\int \frac{1}{\frac{1}{2} ay^2 + by - 1} dy = \int dx + C,$$
where C is clearly zero because $y(0) = 0$.
I am now getting stuck at solving the left integral. Could anyone please show me the steps?

UPDATE
So I came quite far with @LutzL solution, however my answers seems to slightly deviate from the solution given above. These are the steps I performed (continuing from @LutzL's answer):
You complete the square $\frac12ay^2+by-1=\frac12a(y+\frac ba)^2-1-\frac{b^2}{2a}$ and use this to inspire the change of coordinates $u=ay+b$ leading to
$$
\int \frac{dy}{\frac12ay^2+by-1}=\int\frac{2\,du}{u^2-2a-b^2}
$$
and for that your integral tables should give a form using the inverse hyperbolic tangent. Or you perform a partial fraction decomposition for
$$
\frac{2Γ}{u^2-Γ^2}=-\frac{1}{u+Γ}+\frac{1}{u-Γ}
$$
and find the corresponding logarithmic anti-derivatives,
$$
\ln|u-Γ|-\ln|u+Γ|=Γx+c,\\ \frac{u-Γ}{u+Γ}=Ce^{Γx},\ C=\pm e^c
$$
which you now can easily solve for $u$ and then $y$.
Given that $y(0) = 0$ we have $u(y(0)) = u(0) = b$ and therefore the final equation becomes
$$\frac{u(0)-Γ}{u(0)+Γ}= \frac{b-Γ}{b+Γ}=Ce^{Γ\cdot0} = Ce^{Γ \cdot 0} = C$$
Now by first isolating $u$ I get
$$u - \Gamma = u C e^{\Gamma x} + \Gamma C e^{\Gamma x} \Rightarrow \\
u \left( 1 - C e^{ \Gamma x} \right) = \Gamma \left( 1 + C e^{\Gamma x} \right) \Rightarrow \\
u = \frac{\Gamma \left( 1 + C e^{\Gamma x} \right)}{\left( 1 - C e^{ \Gamma x} \right)}$$
Now substituting u and C gives
$$ay + b= \frac{\Gamma \left( 1 + \frac{b-Γ}{b+Γ} e^{\Gamma x} \right)}{\left( 1 - \frac{b-Γ}{b+Γ} e^{ \Gamma x} \right)} \Rightarrow \\
y = \frac{\Gamma \left( 1 + \frac{b-Γ}{b+Γ} e^{\Gamma x} \right) - b \left( 1 - \frac{b-Γ}{b+Γ} e^{ \Gamma x} \right)}{a \left( 1 - \frac{b-Γ}{b+Γ} e^{ \Gamma x} \right)}$$
Now using the fact that $\Gamma = \sqrt{b^2 + 2a} \Rightarrow a = \frac{(\Gamma + b)(\Gamma - b)}{2}$ we get that
$$y = \frac{2 \left( \Gamma \left( 1 + \frac{b-\Gamma }{b+\Gamma } e^{\Gamma x} \right) - b \left( 1 - \frac{b-\Gamma }{b+\Gamma } e^{ \Gamma x} \right) \right)}{(\Gamma + b)(\Gamma - b) \left( 1 - \frac{b-\Gamma }{b+\Gamma } e^{ \Gamma x} \right)}  \\
= \frac{2 \left( (\Gamma - b) + (\Gamma + b) \frac{b-\Gamma }{b+ \Gamma } e^{\Gamma x} \right)}{(\Gamma + b)(\Gamma - b) \left( 1 - \frac{b-\Gamma }{b+\Gamma } e^{ \Gamma x} \right)} \\
= \frac{2 \left( (\Gamma - b) - (\Gamma + b) \frac{\Gamma - b }{b+ \Gamma } e^{\Gamma x} \right)}{(\Gamma + b)(\Gamma - b) \left( 1 - \frac{b-\Gamma }{b+\Gamma } e^{ \Gamma x} \right)}$$
Now cancelling the terms $(b + \Gamma)$ and $(b - \Gamma)$ wherever possible and multiplying denominator and nominator by -1 gives
$$y = \frac{2 \left(  e^{\Gamma x} - 1 \right)}{(\Gamma + b) \left( \frac{b-\Gamma }{b+\Gamma } e^{ \Gamma x} - 1 \right)} $$
So clearly, I got the nominator right, but I can not seem to get the denominator to equal $(b + \Gamma)(e^{\Gamma x} - 1) + 2\Gamma$. Can someone rescue me and show me what I did wrong?
Maybe it helps if I say that x is always positive?
 A: You complete the square $\frac12ay^2+by-1=\frac12a(y+\frac ba)^2-1-\frac{b^2}{2a}$ and use this to inspire the change of coordinates $u=ay+b$ leading to
$$
\int \frac{dy}{\frac12ay^2+by-1}=\int\frac{2\,du}{u^2-2a-b^2}
$$
and for that your integral tables should give a form using the inverse hyperbolic tangent. Or you perform a partial fraction decomposition for
$$
\frac{2Γ}{u^2-Γ^2}=-\frac{1}{u+Γ}+\frac{1}{u-Γ}
$$
and find the corresponding logarithmic anti-derivatives,
$$
\ln|u-Γ|-\ln|u+Γ|=Γx+c,\\ \frac{u-Γ}{u+Γ}=Ce^{Γx},\ C=\pm e^c
$$
which you now can easily solve for $u$ and then $y$.
A: This is a Riccati equation. Let us introduce the change of variable $z = y+\alpha$. The differential equation $y' = \frac{1}{2}ay^2 + by - 1$ rewrites as
\begin{aligned}
z' &= \frac{a}{2}(z^2-2\alpha z + \alpha^2) + b(z-\alpha) - 1\\
&= \frac{a}{2}z^2 + (b-a\alpha)z + \frac{a}{2}\alpha^2 - b\alpha - 1 \, .
\end{aligned}
If $\alpha$ is chosen so that the constant term $\frac{1}{2}a\alpha^2 - b\alpha - 1$ vanishes, e.g. $\alpha=\frac{b + \Gamma}{a}$ with $\Gamma = \sqrt{b^2+2a}$, then this differential equation may be viewed as a Bernoulli differential equation. The latter can be solved by setting $u=z^{-1}$, which satisfies the linear ODE
$$
u' -\Gamma u = -\frac{a}{2}  \, .
$$
The solution with initial condition $u(0)=\alpha^{-1}$ is
$$
u (x) = \left(\alpha^{-1}-\frac{a}{2\Gamma}\right) e^{\Gamma x} +\frac{a}{2\Gamma} \, ,
$$
from which we deduce the expression of $y = u^{-1}-\alpha$ using the identity $a = \frac{\Gamma^2 - b^2}{2}$:
$$
y(x) = \frac{2 \left(1 - e^{\Gamma x}\right)}{(\Gamma - b)\, e^{\Gamma x} + \Gamma + b} \, .
$$
A: write $$\int \frac{\frac{dy}{dx}}{\frac{1}{2}ay(x)^2+by(x)-1}dx=\int1dx$$
$$\frac{2\tan^{-1}\left(\frac{b+ay(x)}{\sqrt{-2a-b^2}}\right)}{\sqrt{-2a-b^2}}=x+C$$
$$y(x)=\frac{-b+\sqrt{-2a-b^2}\tan\left(\frac{1}{2}\sqrt{-2a-b^2}(x+C)\right)}{a}$$
