Welcome Guest.

# How to find the general solution of this differential equation?

Asked by: Walter 226 views Computer January 11, 2019

How to find the general solution of this differential equation?

xy”=y’+x2e^x,xy"-y’=x2e^x.

Homogeneous equation: xy”-y’=0.

dy’/y’=dx/x,ln|y’|=ln|c1x|.

y’=c1x, y=c1x+c2.

Set the equation solution y*=(ax+b)e^x.

y*’=[ax+(a+b)]e^x,

y*”=[ax+(2a+b)]e^x.

Substitute the original equation

[ax2+(2a+b)x]e^x

=[ax+(a+b)]e^x+ X2e^x.

So a=1, b=-1.

y=c1x+c2+(x-1)e^x.

Dividing both sides by x2 gives y ́ ́/xy ́/x2=e^x, or decreasing the order to (y ́/x) ́=e^x, the two sides are obtained once: y ́/x=e^x+C1, that is, y ́=xe^x+C1·x, and then integrate once to obtain a general solution: y=(x-1)e^x+C1x2/2+C2, C1 and C2 are Any constant.

Solution: Set the general solution to y=C(x)e^x, then

y’= C'(x)e^x+C(x)e^x=[C'(x)+C(x)]e^x

y"=[C"(x)+C'(x)e^x+[C'(x)+C(x)]e^x=[C"(x)+2C'(x)+C( x)]e^x

Substituting them into the original differential equation, there are

x[C" (x)+2C'(x)+C(x)]e^x=[C'(x)+C(x)]e^x+x2e^x=[C'(x)+C(x) +x2]e^x

get x[C"(x)+2C'(x)+C(x)]=C'(x)+C( x)+x2

ie xC"(x)+(2x-1)C'(x)+(x-1)C(x)=x2

It can be seen that C(x) is a function. Let C(x)=ax+b, then C'(x)=a, C"(x)=0, substituting into the above formula ,

(2x-1)a+(x-1)(ax+b)=ax2+(a+b)x-(a+ b)=x2 –> a=1,b=-a=-1

Therefore C(x)=x-1

Then  y=C(x)e^x=(x-1)e^x