## [Maxima-commits] CVS: maxima/share/contrib/integration partition.mac, 1.1, 1.2

 [Maxima-commits] CVS: maxima/share/contrib/integration partition.mac, 1.1, 1.2 From: Barton Willis - 2009-06-20 21:07:04 ```Update of /cvsroot/maxima/maxima/share/contrib/integration In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30293 Modified Files: partition.mac Log Message: o protect against divide by zero o append thanks (request from RJF) Index: partition.mac =================================================================== RCS file: /cvsroot/maxima/maxima/share/contrib/integration/partition.mac,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- partition.mac 12 Jan 2009 11:14:54 -0000 1.1 +++ partition.mac 20 Jun 2009 21:06:57 -0000 1.2 @@ -2,7 +2,8 @@ Application includes implementing stage 1 of Moses' SIN symbolic indefinite integration, intfudu. - Author: Richard Fateman, January, 2009. + Author: Richard Fateman, January, 2009. Suggestions by B. Willis. + Revision June 19, 2009 Documentation http://www.cs.berkeley.edu/~fateman/papers/partition.pdf */ /* Moving expression arg to end makes matchdeclare @@ -85,15 +86,15 @@ (thefuns:intable[inpart(k,0)])#false and (thelist:apply(thefuns,inargs(k)))#false then( [int,df]:thelist, - if freeof(%voi,therest:ratsimp(exp/k/df)) + if df # 0 and freeof(%voi,therest:ratsimp(exp/k/df)) then (result:(therest*int), return())), /*if nothing of form f(u)du worked, then try matching u^1*u'-> u^2/2 */ if result=false then - for k in factors do - if freeof(%voi,therest:ratsimp(exp/k/diff(k,%voi))) + for k in factors do ( + if diff(k,%voi) # 0 and freeof(%voi,therest:ratsimp(exp/k/diff(k,%voi))) then (result:(therest*k^2/2), - return()), + return())), return(result))\$ intfugudu(exp,%voi):= ```

 [Maxima-commits] CVS: maxima/share/contrib/integration partition.mac, 1.1, 1.2 From: Barton Willis - 2009-06-20 21:07:04 ```Update of /cvsroot/maxima/maxima/share/contrib/integration In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30293 Modified Files: partition.mac Log Message: o protect against divide by zero o append thanks (request from RJF) Index: partition.mac =================================================================== RCS file: /cvsroot/maxima/maxima/share/contrib/integration/partition.mac,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- partition.mac 12 Jan 2009 11:14:54 -0000 1.1 +++ partition.mac 20 Jun 2009 21:06:57 -0000 1.2 @@ -2,7 +2,8 @@ Application includes implementing stage 1 of Moses' SIN symbolic indefinite integration, intfudu. - Author: Richard Fateman, January, 2009. + Author: Richard Fateman, January, 2009. Suggestions by B. Willis. + Revision June 19, 2009 Documentation http://www.cs.berkeley.edu/~fateman/papers/partition.pdf */ /* Moving expression arg to end makes matchdeclare @@ -85,15 +86,15 @@ (thefuns:intable[inpart(k,0)])#false and (thelist:apply(thefuns,inargs(k)))#false then( [int,df]:thelist, - if freeof(%voi,therest:ratsimp(exp/k/df)) + if df # 0 and freeof(%voi,therest:ratsimp(exp/k/df)) then (result:(therest*int), return())), /*if nothing of form f(u)du worked, then try matching u^1*u'-> u^2/2 */ if result=false then - for k in factors do - if freeof(%voi,therest:ratsimp(exp/k/diff(k,%voi))) + for k in factors do ( + if diff(k,%voi) # 0 and freeof(%voi,therest:ratsimp(exp/k/diff(k,%voi))) then (result:(therest*k^2/2), - return()), + return())), return(result))\$ intfugudu(exp,%voi):= ```