Solve the differential equation dy/dx = -xe^y and determine the equation of the curve through P(1,2)

I tried solving the differential equation and I get y = log(x^2/2 + C).
Is this correct?

Now I forgot how to find the equation.

Thank you!

4 answers

Your solution is almost good, just a change of the sign will fix it.
y=-log(x^2/2+C)

If it has to pass through P(1,2)
substitute x=1, and y=2 and find C.
2=-log(1/2+C)
log(1/2+C)=-2
take logs
1/2+C=e^(-2)
C=e^(-2)-1/2

so
y=-log(x²/2+e^(-2)-1/2)
thanks a lot mate
oops, that was under my brother's name hehe
You're both welcome!