How can I solve this differential equation? x dy/dx+y=x^2y^2

# x dy/dx+y=x^2y^2#

1 Answer
Feb 18, 2018

#y=1/(Cx-x^2)#

Explanation:

This equation is a Bernoulli equation as it can be rewritten to the form #("d"y)/("d"x)+f(x)y=g(x)y^n#.

From #x ("d"y)/("d"x)+y=x^2y^2#, one can divide both sides by #x# so that it fits the Bernoulli form.

#("d"y)/("d"x)+y/x=xy^2#

Divide both sides by #y^2#:
#y^-2 ("d"y)/("d"x)+1/(xy)=x#

Then, define a function #v=y^(1-2)=y^-1#. Differentiate both sides with respect to #x# to get #("d"v)/("d"x)=-("d"y)/("d"x)y^-2#, or #("d"y)/("d"x)=-y^2("d"v)/("d"x)#. We can now substitute these values into the original ODE:
#-y^2*("d"v)/("d"x)*y^-2+v/x=x#
#-("d"v)/("d"x)+v/x=x#
#("d"v)/("d"x)-v/x=-x#

This now becomes a simple linear first-order ODE. To solve this, we multiply both sides by the integrating factor #e^(-int("d"x)/x)=1/x#:

#1/x("d"v)/("d"x)-v/x^2=-1#
#"d"/("d"x)(v/x)=-1#
#v/x=C-x#
#v=Cx-x^2#

Recall that we previously defined #v=y^-1#, or the solution #y=v^-1#.

Thus, our final answer is #y=1/(Cx-x^2)#.