Example 6: Find a particular solution of [Maple Math] .

Solution: Since a linear combination of [Maple Math] and [Maple Math] is of the form [Maple Math] we have

> diff(a*x*sin(x)+b*(sin(x)-x*cos(x)),x,x)+a*x*sin(x)+b*(sin(x)-x*cos(x))-x*sin(x);

[Maple Math]

> p:=unapply(%,x);

[Maple Math]

> solve({p(0)=0,p(1)=0,p(2)=0},{a,b});solve({p(0)=0,p(1)=0,p(2)=0},{a,b});

No solution. Next, we try a particular solution of the form

[Maple Math] .

> diff(x*(a*x*sin(x)+b*(sin(x)-x*cos(x))),x,x)+x*(a*x*sin(x)+b*(sin(x)-x*cos(x)))-x*sin(x);

[Maple Math]
[Maple Math]
[Maple Math]

> p:=unapply(%,x);

[Maple Math]
[Maple Math]
[Maple Math]

> solve({p(0)=0,p(1)=0,p(2)=0},{a,b});

[Maple Math]

Hence [Maple Math] .

or=#000000>.