rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

fails on integrations #768

Open rtoy opened 4 months ago

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-03 10:32:37 Created by zmth on 2014-10-08 02:05:47 Original: https://sourceforge.net/p/maxima/bugs/2820


wxMaxima version: 13.4.0 Maxima version: 5.31.1 Maxima build date: 2013-09-24 09:49:12 Host type: i686-pc-mingw32 Lisp implementation type: GNU Common Lisp (GCL) Lisp implementation version: GCL 2.6.8

These two integrals it is forever calculating or forever parsing output. Same problem if do a stringout in place of ldisp..

(mm:1,assume(u>0,v>0,rm[1]>0,rm[2]>0) , p1pt6:
%pi^5*rm[1]^3*rm[2]^10*u^2*(4*rm[2]^2*u+2*rm[2]^2+2*rm[1]^2)*(sqrt(%pi)*((4*rm[2]^2*u+2*rm[2]^2+2*rm[1]^2)*v+4*rm[2]^2*u
+rm[2]^2+2*rm[1]^2)*(sqrt(4*rm[2]^2*u+2*rm[2]^2+2*rm[1]^2)*(32*sqrt(%pi)*rm[2]^4*u^2+(32*sqrt(%pi)*rm[2]^4+32*sqrt(%pi)*rm[1]
^2*rm[2]^2)*u+8*sqrt(%pi)*rm[2]^4+16*sqrt(%pi)*rm[1]^2*rm[2]^2+8*sqrt(%pi)*rm[1]^4)*v+sqrt(4*rm[2]^2*u+2*rm[2]^2+2*rm[1]^2)*
(32*sqrt(%pi)*rm[2]^4*u^2+(24*sqrt(%pi)*rm[2]^4+32*sqrt(%pi)*rm[1]^2*rm[2]^2)*u+4*sqrt(%pi)*rm[2]^4+12*sqrt(%pi)*rm[1]^2*rm[2]
^2+8*sqrt(%pi)*rm[1]^4))/sqrt((4*rm[2]^2*u+2*rm[2]^2+2*rm[1]^2)*v^2+(8*rm[2]^2*u+3*rm[2]^2+3*rm[1]^2)*v+4*rm[2]^2*u+rm[2]^2
+rm[1]^2)+2*%pi*rm[1]^2*rm[2]^2*sqrt(4*rm[2]^2*u+2*rm[2]^2+2*rm[1]^2)*((4*rm[2]^2*u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+8*rm[1]^4)*v+16*rm[2]^4*u^2+(8*rm[2]
^4+16*rm[1]^2*rm[2]^2)*u+rm[2]^4+4*rm[1]^2*rm[2]^2+4*rm[1]^4)^2) , ldisp(["p2pt16",p2pt16]) , ti: integrate(p2pt16,v,0,inf)
,ldisp([" integ  wrt v",ti]))

On both of these also fails if change the definite integral to indefinite :integrate(p1pt6,u) etc. same failure.

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-03 10:32:37 Created by zmth on 2014-10-08 02:28:03 Original: https://sourceforge.net/p/maxima/bugs/2820/#03ac


In fact it is so bad aside from integrate it can't even do simply only

expand(p2pt16)

forever parsing output. And for expand(p1pt6) finally get a Lisp error !

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-03 10:32:41 Created by zmth on 2014-10-08 02:59:25 Original: https://sourceforge.net/p/maxima/bugs/2820/#d8a1


Surprisingly did get integrate(factor(p1pt6),u) and integrate(factor(p2pt16),u) to work. Ofcourse one should not always have to tell it to factor things and expand(...) should work regardless.

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-03 10:32:45 Created by zmth on 2014-10-08 04:51:59 Original: https://sourceforge.net/p/maxima/bugs/2820/#7e1b


so had to manually do for example,

(ti:integrate(factor(p1pt6),u),tt:factor(limit(ti,u,inf)-subst(u=0,ti))) to get the

definite integral tt which it should have done directly just above

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-03 10:32:48 Created by robert_dodier on 2014-10-10 20:36:05 Original: https://sourceforge.net/p/maxima/bugs/2820/#1908


Diff:


--- old
+++ new
@@ -8,6 +8,7 @@
 These two integrals it is forever calculating or forever parsing output. Same problem if do
 a stringout in place of ldisp..

+~~~~
 (mm:1,assume(u>0,v>0,rm[1]>0,rm[2]>0) , p1pt6:
 %pi^5*rm[1]^3*rm[2]^10*u^2*(4*rm[2]^2*u+2*rm[2]^2+2*rm[1]^2)*(sqrt(%pi)*((4*rm[2]^2*u+2*rm[2]^2+2*rm[1]^2)*v+4*rm[2]^2*u
 +rm[2]^2+2*rm[1]^2)*(sqrt(4*rm[2]^2*u+2*rm[2]^2+2*rm[1]^2)*(32*sqrt(%pi)*rm[2]^4*u^2+(32*sqrt(%pi)*rm[2]^4+32*sqrt(%pi)*rm[1]
@@ -22,9 +23,11 @@
 [2]^4+32*rm[1]^2*rm[2]^2)*u+4*rm[2]^4+12*rm[1]^2*rm[2]^2+8*rm[1]^4)*v+16*rm[2]^4*u^2+(8*rm[2]^4+16*rm[1]^2*rm[2]^2)*u+rm
 [2]^4+4*rm[1]^2*rm[2]^2+4*rm[1]^4))  , ldisp(["p1pt6",p1pt6]) , ti: integrate(p1pt6,u,0,inf)
 ,ldisp([" integ  wrt u",ti]))
+~~~~

 And another:

+~~~~
 (mm:1,assume(u>0,v>0,rm[1]>0,rm[2]>0) , p2pt16:
 %pi^4*rm[1]^3*rm[2]^8*u*sqrt(4*rm[2]^2*u+2*rm[2]^2+2*rm[1]^2)*(sqrt(%pi)*((4*rm[2]^2*u+2*rm[2]^2+2*rm[1]^2)*v+4*rm[2]^2*u+
 rm[2]^2+2*rm[1]^2)*(sqrt(4*rm[2]^2*u+2*rm[2]^2+2*rm[1]^2)*(32*sqrt(%pi)*rm[2]^4*u^2+(32*sqrt(%pi)*rm[2]^4+32*sqrt(%pi)*rm[1]
@@ -39,6 +42,7 @@
 +(32*rm[2]^4*u^2+(24*rm[2]^4+32*rm[1]^2*rm[2]^2)*u+4*rm[2]^4+12*rm[1]^2*rm[2]^2+8*rm[1]^4)*v+16*rm[2]^4*u^2+(8*rm[2]
 ^4+16*rm[1]^2*rm[2]^2)*u+rm[2]^4+4*rm[1]^2*rm[2]^2+4*rm[1]^4)^2) , ldisp(["p2pt16",p2pt16]) , ti: integrate(p2pt16,v,0,inf)
 ,ldisp([" integ  wrt v",ti]))
+~~~~

 On both of these also fails if change the definite integral to indefinite :integrate(p1pt6,u)
 etc. same failure.
rtoy commented 4 months ago

Imported from SourceForge on 2024-07-03 10:32:52 Created by robert_dodier on 2014-10-10 20:36:05 Original: https://sourceforge.net/p/maxima/bugs/2820/#b9ca


Enclose code blocks in four tildes for formatting.