What is a solution to the linear differential equation: #dy/dx= y/x+x#?

2 Answers
Apr 17, 2018

#y =cx+x^2#

Explanation:

Solve first the homogeneous equation that is separable:

#dy/dx = y/x#

#dy/y = dx/x#

Integrate both sides:

#int dy/y = int dx/x#

#ln abs y = ln abs x +C#

and taking the exponential of both sides:

#y = cx#

Use now the variable coefficient method to find a solution to the compete equation in the form;

#bar y = c(x) x#

Differentiate using the product rule:

#(dbary)/dx = x c'(x) + c(x)#

and substitute in the original equation:

#(dbary)/dx =(bary)/x +x#

#x c'(x) + c(x) = (c(x) x)/x +x#

#x c'(x) + c(x) = c(x)+x#

#x c'(x) = x#

#c'(x) = 1#

#int c'(x)dx = int dx#

#c(x) = x#

and we do not need the constant because we can choose just one solution:

#bar y = c(x) x = x^2#

Then the complete solution of the equation is:

#y =cx+x^2#

In fact:

#dy/dx = c+2x = (c+x)+x = (cx+x^2)/x+x =y/x +x#

Apr 18, 2018

# y = x^2 +Cx #

Explanation:

We have:

# dy/dx = y/x+x #

Which we can write as:

# dy/dx +(-1/x) y = x #

Which is of the form:

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

So, we can construct an Integrating Factor:

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

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

# 1/x dy/dx -1/x^2 y = 1 #

# :. d/dx (1/x y) = 1 #

This is now separable, so we can "separate the variables" to get:

# y/x = int \ 1 \ dx #

Which is trivial to integrate:

# y/x = x+C #

Leading to the GS:

# y = x^2 +Cx #