What is a solution to the differential equation dy/dx=(2y+x^2)/xdydx=2y+x2x?

2 Answers
Oct 2, 2016

y(x) = (C+log_e(x))x^2y(x)=(C+loge(x))x2

Explanation:

This is a linear differential equation. Its solution can be composed of the homogeneous solution (y_h(x)yh(x)) plus a particular solution (y_p(x)yp(x)) so

y(x) = y_h(x) + y_p(x)y(x)=yh(x)+yp(x)

The homogeneous solution obeys

(dy_h)/(dx) -2/x y_h(x) = 0dyhdx2xyh(x)=0. Here, clearly the solution is

y_h(x) = C x^2yh(x)=Cx2

By grouping variables:
dy_h/(y_h)=2dx/x->ln y_h=C_1lnx^2->y_h=Cx^2dyhyh=2dxxlnyh=C1lnx2yh=Cx2

The determination of y_p(x)yp(x) must obey

(dy_p)/(dx)-2/x y_p(x) = xdypdx2xyp(x)=x.

To solve this, we will use a technique due to Lagrange
(https://en.wikipedia.org/wiki/Joseph-Louis_de_Lagrange)

called the constant variation technique.

We will suppose that y_p(x) = c(x)y_h(x)yp(x)=c(x)yh(x). Substituting we obtain

y_h(x)(dc(x))/(dx) + c(x) ((dy_h(x))/(dx)-(2 y_h(x))/x) = xyh(x)dc(x)dx+c(x)(dyh(x)dx2yh(x)x)=x or

y_h(x)(dc(x))/(dx) = xyh(x)dc(x)dx=x so

(dc(x))/(dx) = x/(y_h(x)) = x/( x^2) = 1/xdc(x)dx=xyh(x)=xx2=1x so

c(x)= log_e xc(x)=logex and finally

y(x) = C x^2+log_e(x) x^2 = (C+log_e(x))x^2y(x)=Cx2+loge(x)x2=(C+loge(x))x2

Oct 3, 2016

y= x^2 (ln x + C)y=x2(lnx+C)

Explanation:

Alternative Approach

y'=(2y+x^2)/x = 2 y/x + x

y'- 2/x y = x

This is exact if we times it by a factor of 1/x^2 [See below for mechanical process to find that factor]

1/x^2 y'- 2/x^3 y = 1/x

ie
(1/x^2 y)'= 1/x

1/x^2 y= ln x + C

y= x^2 (ln x + C)

Integrating Factor
We can extract the "integrating factor" eta(x) for the DE in form y' color(red)(- 2/x) y = x as:

eta = exp (int color(red)( -2/x) dx )

= e^(-2 ln x )

= 1/x^2