Solve the differential equation #x (d^2 y)/(dx^2) +(x-1) (dy)/(dx)-y = x^2# ?

1 Answer
Nov 17, 2017

#y = C_0 e^-x + C_1(1-x)+x^2#

Explanation:

This is a linear differential equation so it can be solved as the addition of the homogeneous solution

#x (d^2 y_h)/(dx^2) +(x-1) (dy_h)/(dx)-y = 0# and a particular solution

#x (d^2 y_p)/(dx^2) +(x-1) (dy_p)/(dx)-y = x^2#

For the homogeneous solution, substituting #y_h = c_0e^(lambda x)# we obtain

#c_0e^(lambda x) (1 + lambda) (lambda x-1) = 0# and then

#lambda = -1#

For the particular solution we propose

#y_p = c_1+c_2x+c_3x^2#

and after substituting

#(c_3-1)x^2-c_1-c_2=0# then

#c_3 = 1, c_1 = -c_2#

or

#y_p = c_1-c_1x + x^2#

and the general solution

#y = y_h+y_p = C_0 e^-x + C_1(1-x)+x^2#