x(dy/dx)-(1+x)y=xy2
dy/dx - (1+x)y/x = y2
This is Bernoulli's First Order ODE. The equation can be put in this form:
dy/dx - P(x)y = f(x)yn
Let u = y1-n = y1-2= y-1, Therefore du = (-1/y2)dy
Multiply both sides by -1/y2
(-1/y2)(dy/dx) + (1+x)/(xy) = -1
Make the equation in terms of u and x.
du/dx +u(1+x)/x = -1
The integrating factor is e ∫P(x)dx
e∫P(x)dx = e ∫(1+x)/x dx =e ln(x)+x = xex
Therefore:
(xex)du/dx +u(ex)(1+x) = -xex
d(uxex)/dx = -xex (Product rule of differentiation)
uxex = - ∫xexdx (Use integration by parts)
uxex = - xex+ex + C
u = (- xex+ex + C)/xex
Substitute u in terms of y:
y-1 = (- xex+ex + C)/xex
y = xex/(- xex+ex + C)