The given differential equation is a Riccati one.
If one solution of a 2nd order ODE is known, then it is known that another solution can be obtained by
quadrature, i.e., a simple integration. The same holds for the Riccati equation. If one particular
solution y1 can
be found, the general solution is obtained as y = y1 + u.
It can be readily verified that y1= ex is a solution. Then by substituting y = ex + u we have
ex + u' = ( ex + u )2 − 2 ex ( ex + u ) + ex + e2x
u' = e2x + 2 ex u + u2 −2 e2x + 2 ex u + e2x
u' = u2
du / u2 = dx
u = -1 / (x +c )
Hence the general solution is
y = ex − 1 / (x +c ) , c ∈ ℜ