What is the general solution of the differential equation # y'=y/x+xe^x #?

1 Answer
Dec 23, 2017

# y = xe^x + Cx #

Explanation:

We seek a solution to the First Order ODE:

# y'=y/x+xe^x #

We can use an integrating factor when we have a First Order Linear non-homogeneous Ordinary Differential Equation of the form;

# dy/dx + P(x)y=Q(x) #

So rewrite the equations in standard form as:

# dy/dx - y/x = xe^x ..... [1] #

Then the integrating factor is given by;

# I = e^(int P(x) dx) #
# \ \ = exp(int \ -1/x \ dx) #
# \ \ = exp( -lnx ) #
# \ \ = 1/x #

And if we multiply the DE [1] by this Integrating Factor, #I#, we will have a perfect product differential;

# 1/xdy/dx - y/x^2 = e^x #

# :. d/dx( y/x ) = e^x #

Which we can directly integrate to get:

# y/x = int \ e^x + C #

# :. y/x = e^x + C #

# :. y = xe^x + Cx #