Question: why such large difference in dsolve answer using two methods of solving

This is linear ode, third order, Euler type and inhomogeneous ode.

If I solve the homogeneous ode only, then ask Maple to give me a particular solution, then add these, I get much much smaller solution which Maple verifies is correct.

Now when asking Maple to solve the original inhomogeneous ode as is, the solution is much more complicated and much longer with unresolved integrals.

Why does not Maple give the simpler solution? Both are verified to be correct.

This is my theory: When asking maple to find only the particular solution, it seems to have used a different and advanced method to find yp. Which is new to me and trying to learn it. It is based on paper "D'Alembertian Solutions of Inhomogeneous Equations (differential, difference, and some other).

Undetermined coefficients method can't really be used on ode's such as this because its coefficients are not constant.

Now, when asking Maple to solve the inhomogeneous ode, it seems to have used variation of parameters method, which results in integrals, which can be hard to solve.

My question is: Why does not Maple give the same much shorter answer when asked to solve the ode as is? Should it not have done so? Any thoughts on why such large difference in answer? Why it did not use the same method to find yp when asked to solve the whole ode as that leads to much smaller and more elegant solution.

ps. debugging this, it uses LinearOperators:-dAsolver:-dAlembertianSolver which is called from ODEtools/particularsol/linear to find yp when calling DETools:-particularsol(ode); but for some reason, it does not do this when asking it to solve the whole ode directly (if it did, then one will expect same answer to result, right?)

Maple 2023.2 on windows 10.
 

restart;

189900

(1)

#the ode
ode:=x^3*diff(y(x), x, x, x) + x^2*diff(y(x), x, x) + 2*x*diff(y(x), x) - y(x) = 2*x^3 - ln(x);

x^3*(diff(diff(diff(y(x), x), x), x))+x^2*(diff(diff(y(x), x), x))+2*x*(diff(y(x), x))-y(x) = 2*x^3-ln(x)

(2)

# find y_h
yh:=dsolve(lhs(ode)=0);

y(x) = c__1*x^(-(1/6)*((44+12*69^(1/2))^(2/3)-4*(44+12*69^(1/2))^(1/3)-20)/(44+12*69^(1/2))^(1/3))+c__2*x^((1/12)*(-20+(44+12*69^(1/2))^(2/3)+8*(44+12*69^(1/2))^(1/3))/(44+12*69^(1/2))^(1/3))*sin((1/12)*(3^(1/2)*(44+12*69^(1/2))^(2/3)+20*3^(1/2))*ln(x)/(44+12*69^(1/2))^(1/3))+c__3*x^((1/12)*(-20+(44+12*69^(1/2))^(2/3)+8*(44+12*69^(1/2))^(1/3))/(44+12*69^(1/2))^(1/3))*cos((1/12)*(3^(1/2)*(44+12*69^(1/2))^(2/3)+20*3^(1/2))*ln(x)/(44+12*69^(1/2))^(1/3))

(3)

#find particular solution
yp:=DETools:-particularsol(ode);

y(x) = (2/17)*x^3+ln(x)+3

(4)

#test particular solution is correct
odetest(yp,ode);

0

(5)

#find general solution = yh+ yp
y_general:=y(x)=rhs(yh)+rhs(yp);

y(x) = c__1*x^(-(1/6)*((44+12*69^(1/2))^(2/3)-4*(44+12*69^(1/2))^(1/3)-20)/(44+12*69^(1/2))^(1/3))+c__2*x^((1/12)*(-20+(44+12*69^(1/2))^(2/3)+8*(44+12*69^(1/2))^(1/3))/(44+12*69^(1/2))^(1/3))*sin((1/12)*(3^(1/2)*(44+12*69^(1/2))^(2/3)+20*3^(1/2))*ln(x)/(44+12*69^(1/2))^(1/3))+c__3*x^((1/12)*(-20+(44+12*69^(1/2))^(2/3)+8*(44+12*69^(1/2))^(1/3))/(44+12*69^(1/2))^(1/3))*cos((1/12)*(3^(1/2)*(44+12*69^(1/2))^(2/3)+20*3^(1/2))*ln(x)/(44+12*69^(1/2))^(1/3))+(2/17)*x^3+ln(x)+3

(6)

#test general solution is correct
odetest(y_general,ode);

0

(7)

#now solve the ode directly using Maple. Why this solution is much more complicated?
y_general_direct_method:=dsolve(ode);

y(x) = -(Int(-(5/2)*(x^(-(1/400)*69^(1/2)*(44+12*69^(1/2))^(2/3)+(11/1200)*(44+12*69^(1/2))^(2/3)+(1/12)*(44+12*69^(1/2))^(1/3)+2/3))^2*(44+12*69^(1/2))^(1/3)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)*cos((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))^2+3*(44+12*69^(1/2))^(1/3)*69^(1/2)*sin((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))^2-11*(44+12*69^(1/2))^(1/3)*cos((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))^2-11*(44+12*69^(1/2))^(1/3)*sin((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))^2+100*cos((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))^2+100*sin((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))^2)*(-2*x^3+ln(x))/(x^3*(3*3^(1/2)*23^(1/2)+11)*(11*3^(1/2)*23^(1/2)-207)), x))*x^((1/200)*69^(1/2)*(44+12*69^(1/2))^(2/3)-(11/600)*(44+12*69^(1/2))^(2/3)-(1/6)*(44+12*69^(1/2))^(1/3)+2/3)+(Int(-(5/6)*x^((1/200)*69^(1/2)*(44+12*69^(1/2))^(2/3)-(11/600)*(44+12*69^(1/2))^(2/3)-(1/6)*(44+12*69^(1/2))^(1/3)+2/3)*x^(-(1/400)*69^(1/2)*(44+12*69^(1/2))^(2/3)+(11/1200)*(44+12*69^(1/2))^(2/3)+(1/12)*(44+12*69^(1/2))^(1/3)+2/3)*(44+12*69^(1/2))^(1/3)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)*3^(1/2)*cos((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))-9*(44+12*69^(1/2))^(1/3)*69^(1/2)*sin((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))-11*(44+12*69^(1/2))^(1/3)*3^(1/2)*cos((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))+33*(44+12*69^(1/2))^(1/3)*sin((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))+100*3^(1/2)*cos((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))+300*sin((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x)))*(-2*x^3+ln(x))*3^(1/2)/(x^3*(3*3^(1/2)*23^(1/2)+11)*(11*3^(1/2)*23^(1/2)-207)), x))*x^(-(1/400)*69^(1/2)*(44+12*69^(1/2))^(2/3)+(11/1200)*(44+12*69^(1/2))^(2/3)+(1/12)*(44+12*69^(1/2))^(1/3)+2/3)*cos((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))+(Int(-(5/6)*x^((1/200)*69^(1/2)*(44+12*69^(1/2))^(2/3)-(11/600)*(44+12*69^(1/2))^(2/3)-(1/6)*(44+12*69^(1/2))^(1/3)+2/3)*x^(-(1/400)*69^(1/2)*(44+12*69^(1/2))^(2/3)+(11/1200)*(44+12*69^(1/2))^(2/3)+(1/12)*(44+12*69^(1/2))^(1/3)+2/3)*(44+12*69^(1/2))^(1/3)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)*3^(1/2)*sin((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))+9*(44+12*69^(1/2))^(1/3)*69^(1/2)*cos((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))-11*(44+12*69^(1/2))^(1/3)*3^(1/2)*sin((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))-33*(44+12*69^(1/2))^(1/3)*cos((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))+100*3^(1/2)*sin((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))-300*cos((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x)))*(-2*x^3+ln(x))*3^(1/2)/(x^3*(3*3^(1/2)*23^(1/2)+11)*(11*3^(1/2)*23^(1/2)-207)), x))*x^(-(1/400)*69^(1/2)*(44+12*69^(1/2))^(2/3)+(11/1200)*(44+12*69^(1/2))^(2/3)+(1/12)*(44+12*69^(1/2))^(1/3)+2/3)*sin((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))+c__1*x^((1/200)*69^(1/2)*(44+12*69^(1/2))^(2/3)-(11/600)*(44+12*69^(1/2))^(2/3)-(1/6)*(44+12*69^(1/2))^(1/3)+2/3)+c__2*x^(-(1/400)*69^(1/2)*(44+12*69^(1/2))^(2/3)+(11/1200)*(44+12*69^(1/2))^(2/3)+(1/12)*(44+12*69^(1/2))^(1/3)+2/3)*cos((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))+c__3*x^(-(1/400)*69^(1/2)*(44+12*69^(1/2))^(2/3)+(11/1200)*(44+12*69^(1/2))^(2/3)+(1/12)*(44+12*69^(1/2))^(1/3)+2/3)*sin((1/1200)*(44+12*69^(1/2))^(1/3)*3^(1/2)*(3*(44+12*69^(1/2))^(1/3)*69^(1/2)-11*(44+12*69^(1/2))^(1/3)+100)*ln(x))

(8)

#test the above
odetest(y_general_direct_method,ode);

0

(9)

 


 

Download why_such_difference_in_dsolve_answer.mw

Please Wait...