Question: why particularsol fail on this ode?

Maple can solve this second order linear non homogeneous ode,  but DEtools:-particularsol() not able to find the particular solution.

Any one would know why? Should it have been to find it since dsolve can? 

restart;

ode:=diff(y(x),x$2)-6*diff(y(x),x)+8*y(x)=sqrt(x);

diff(diff(y(x), x), x)-6*(diff(y(x), x))+8*y(x) = x^(1/2)

p:=DEtools:-particularsol(ode,y(x))

sol:=dsolve(ode);

y(x) = (1/2)*exp(4*x)*c__1+(1/32)*Pi^(1/2)*exp(4*x)*erf(2*x^(1/2))-(1/16)*exp(2*x)*2^(1/2)*Pi^(1/2)*erf(2^(1/2)*x^(1/2))+(1/8)*x^(1/2)+exp(2*x)*c__2

sol:=dsolve(ode,useInt);

y(x) = (Int(exp(2*x)*(Int(x^(1/2)/(exp(2*x))^2, x))+exp(2*x)*c__1, x)+c__2)*exp(2*x)

 

 

Download why_can_not_find_yp_april_1_2026.mw

update

I think I remembered now something.

What Maple calls "particular sol" is different from what we use at school, where general solution = y_h + y_p. here y_p is the "normal" particular solution used in textbooks. Maple's definition of particular sol is different.

So for a work around, I just use varparm from now on and it gives me what I wanted:

restart;

RHS:=sqrt(x);
ode:=diff(y(x),x$2)-6*diff(y(x),x)+8*y(x)=0;
basis:=dsolve(ode, y(x), output=basis);

x^(1/2)

diff(diff(y(x), x), x)-6*(diff(y(x), x))+8*y(x) = 0

[exp(4*x), exp(2*x)]

p:=DEtools:-varparam(basis,sqrt(x),x,true): #use the basis solutions from y_h

print("particular solution is ", p)

"particular solution is ", -(1/16)*2^(1/2)*Pi^(1/2)*erf(2^(1/2)*x^(1/2))*exp(2*x)+(1/32)*Pi^(1/2)*erf(2*x^(1/2))*exp(4*x)+(1/8)*x^(1/2)

 

 

Download why_can_not_find_yp_april_1_2026_V2.mw

ps. it will be really nice if the above command would also support useInt. This way it makes it more easy to see the particular solution integrals used before they are evaluated. But now this command does not accept useInt.

 

Please Wait...