Find a general solution $$(y+e^x)\frac{dy}{dx}=-\frac{y^2}{2}-2ye^x$$
I attempted to turn this inexact eq. to exact:
I multiply by IF = $e^t$ and got:
$$(ye^x+e^{2x})dy+(\frac{y^2}{2}e^x+2ye^{2x})dx = 0$$
which is exact.
Then I integrate, and I get $y^2e^x+2ye^{2x} + c = 0$.
My question is if this is considerate a general solution? or does this expression need to be expressed in terms of y?
If so, how can I do this?
Thanks
 A: A general solution of an ODE is an explicit expression of the form
$$
y=\varphi(x,c),
$$
which contains all the solutions of the ODE for different values of $c$.
The $c$ is a scalar if the equation is scalar of first order. In general, however, it is a vector in $\mathbb R^n,\,$ where $\,n=$order of ODE $\times$ dimension of system.
Nevertheless, such an expression is not always easy to find. Very often the general solution is obtained implicitly, i.e.,
$$
\varPhi(x,y,c)=0,
$$
and this still is acceptable as an implicitly expressed general solution.
A: Re-write The ODE as: $M dx +N dy=0$, then
$$[(y^2e^{-x}/2+2y]dx+(ye^{-x}+1) dy~~~~(1)$$
$$\frac{\partial M}{\partial y}=2ye^{-x}+2, ~~\frac{\partial N}{\partial x}=-ye^{-x}$$
So the integrating factor $I$ to make it exact is given by
$$I=\exp \left[\int \frac{1}{N}\left(\frac{ \partial M}{\partial y}-\frac{\partial N}
{\partial x} \right)dx\right]=e^{2x}.$$
Multiplying (1) by I we get an exact ODE as
$$[(y^2 e^{x}/2)+2ye^{2x}]dx+(ye^x+e^{2x}) dy=0 \implies \bar M dx+ \bar Ndy=0$$
Then the solution is given by
$$\int [(y^2 e^{x}/2)+2ye^{2x}] dx~\text{(treat $y$ as constant)}+ \int \text{terms of $\bar N$ not containing $x$]} dy=C$$
$$(y^2e^x/2)+ye^{2x}=C. $$
The general solution of (1) can be written as:
$$F(y^2e^x/2+ye^{2x})=A,$$
where $F$ is an arbitrary function and $A$ is and arbitrary constant.
These two could be fixed by specifying consitions,
