How to solve this ODE: $y'(x) e^x = y^2(x)$? I am trying to solve the differential equation
$$y'(x) e^x = y^2(x) \quad (DE) $$

This is a Bernoulli form DE i.e $y'(x) + a(x)y(x) = b(x)y^r(x)$, where $r = 2, a(x) = 0, b(x) = \frac1e $

*

*Let $u(x) = y^{1-r} = y^{-1} \iff u'(x) = -y^{-2}(x) y'(x)$

*Then for $y \neq 0$: $(DE) = \frac{y(x)'}{y^r(x)} = e^{-x} \iff -u'(x) = -e^x (2)$
But $(2)$ is a seperate variable form ODE therefore:
$$ u(x) = e^{-x} + C \iff \frac1y = e^{-x} + C \iff $$
$$ \bbox[15px,#ffd,border:1px solid green]{y(x) = \frac{1}{e^x + C} }$$
with $y(x) =0$, not being a solution of the DE.

It all seems right to me, but wolfram has another opinion i.e
$$ \bbox[15px,#ffd,border:1px solid blue]{y\left(x\right)\:=\:\frac{-e^x}{\left(Ce^x\:-\:x\:-\:1\right)}} $$
I never won an argument against Wolfie, so I am wondering what I did wrong in my solution.

Your equation is equivalent to
$$\frac{\dot{y}}{y^2}=e^{-x}$$
as long as $y(t)\neq0$. (Notice that $y(t)\equiv0$ is a solution to your problem)
Integrating over some intervals,say $[x_0,x]$ leads to
$$
\int^x_{x_0}\frac{y'(t)}{y^2(t)}\,dt=\int^x_{x_0}e^{-t}\,dt=-e^{-t}|^x_{x_0}=e^{-x_0}-e^{-x}
$$
The integral on the left can be simplifies by change of variables $u=y$ to get
$$
-\frac{1}{y(t)}\Big|^x_{x_0}=\frac{1}{y(x_0)}-\frac{1}{y(x)}=e^{-x_0}-e^{-x}
$$
solving for $y(x)$ on gets
$$
\frac{1}{y(x)}=\frac{1}{y(x_0)}-e^{-x_0}+e^{-x}
$$
and so
$$
y(x)=\frac{1}{y(x_0)^{-1}-e^{-x_0}+e^{-x}}
$$
