changeset 68896:da69cee7c84c

(math-integrate-by-parts): Do a more careful test to see if equation can be solved.
author Jay Belanger <jay.p.belanger@gmail.com>
date Tue, 14 Feb 2006 21:39:26 +0000
parents ab08676bc819
children 32dec66a83cf
files lisp/calc/calcalg2.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calcalg2.el	Tue Feb 14 21:38:57 2006 +0000
+++ b/lisp/calc/calcalg2.el	Tue Feb 14 21:39:26 2006 +0000
@@ -1253,9 +1253,11 @@
 			(calcFunc-expand temp)
 		      (setq v (list 'var 'PARTS math-cur-record)
 			    temp (let (calc-next-why)
-				   (math-solve-for (math-sub v temp) 0 v nil)))
-		      (and temp (not (integerp temp))
-			   (math-simplify-extended temp)))))
+                                   (math-simplify-extended
+                                    (math-solve-for (math-sub v temp) 0 v nil)))
+                            temp (if (and (eq (car-safe temp) '/) 
+                                          (math-zerop (nth 2 temp))) 
+                                     nil temp)))))
 	   (setcar (cdr math-cur-record) 'busy)))))
 
 ;;; This tries two different formulations, hoping the algebraic simplifier