The given differential equation can be written as
dydx = 2xexy − y2yexy − (1)
Let F(x,y) = 2xexy − y2yexy
Then F(λx,λy) = λ2xexy − λyλ2yexy = λ0[F(x,y)]
Thus, F(x,y) is a homogeneous function of degree zero.
Therefore, the given differential equation is a homogeneous differential equation.
To solve it, we make the substitution
x = vy − (2)
Differentiating equation (1) and (2) w.r.t to y, we get
dydx = v + ydydv
Substitute the value of x and dydx in equation (1), we get
v + ydydv = 2vevy − v
dydydv = 2vevy − v − v
2evydvdv = −dyy
∫2evydv = −∫dyy
2evy = −log|y| + C
Now replacing v by xy, we get
2exy + log|y| = C −(3)
Substituting x = 0 and y = 1 in equation (3), we get
2e01 + log|1| = C ⇒ C = 2
2exy + log|y| = 2