solving an inseparable differential equation involving exponentials Solve $2xe^y$ + $e^x$ + ($x^2$ + 1)$e^y$$\frac{dy}{dx}$ = 0 with $y$ = 0 when $x$ = 0.
So this is clearly an inseparable differential equation so I thought the standard way to approach this was with a substitution but I cannot think of anything that would help me solve this? I thought maybe $u = x^2 e^y$ or $y = ux^2$ but they didn't get me anywhere at all.
 A: Hint:
$\frac{\partial}{\partial y}(2xe^y+e^x) = \frac{\partial}{\partial x} (x^2+1)e^y$
A: Rewrite as
$$ (2xe^y + e^x)dx + (x^2+1)e^ydy = 0 $$
This is an exact differential equation of the form $M(x,y)dx + N(x,y)dy = 0$. 
The solution has the form $F(x,y) = C$, where $\frac{\partial F}{\partial x} = M(x,y)$ and $\frac{\partial F}{\partial y} = N(x,y)$
You can integrate to find
$$ F(x,y) = (x^2+1)e^y + e^x $$
Edit: The trick is to integrate just one of the derivatives, then make a comparison. First
$$ F(x,y) = \int M(x,y) dx = \int (2xe^y +e^x) dx = x^2e^y + e^x + g(y) $$
where $g(y)$ is the "constant of integration" with respect to $x$
Then, taking the other derivative, we find
$$ \frac{\partial F}{\partial y} = x^2e^y + g'(y) = N(x,y) = (x^2+1)e^y $$
$$ \implies g'(y) = (x^2+1)e^y - x^2e^y = e^y \implies g(y) = e^y + C $$
We can drop the constant $C$, since it's added back later. Finally, the solution is
$$ F(x,y) = x^2e^y + e^x + e^y = (x^2+1)e^y + e^x = C $$
A: Eyeballing the equation, observe that $2x e^y + (x^2 + 1) e^y \frac{dy}{dx} = \frac{d}{dx}\left((x^2 + 1) e^y\right)$, and take it from there.
A: $$2xe^y + e^x + (x^2 + 1)e^yy'= 0$$
$$(x^2e^y)'+e^x+(e^y)'=0$$
Integrate
$$x^2e^y+e^x+e^y=K$$
$$ \implies e^y=\frac {K-e^x}{x^2+1}$$
