From 63f7edace755ddb71ba842b55bafa98e55a2e768 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Tue, 14 Feb 2006 21:39:26 +0000 Subject: [PATCH] (math-integrate-by-parts): Do a more careful test to see if equation can be solved. --- lisp/calc/calcalg2.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el index facb691c08b..f71e58e223a 100644 --- a/lisp/calc/calcalg2.el +++ b/lisp/calc/calcalg2.el @@ -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 -- 2.39.2