Mercurial > emacs
comparison lisp/calc/calcalg2.el @ 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 | 6bf177f8065b |
children | 7a3f13e2dd57 9e490faa9f6b |
comparison
equal
deleted
inserted
replaced
68895:ab08676bc819 | 68896:da69cee7c84c |
---|---|
1251 (setq temp (math-sub (math-mul u v) temp)) | 1251 (setq temp (math-sub (math-mul u v) temp)) |
1252 (if (eq (nth 1 math-cur-record) 'parts) | 1252 (if (eq (nth 1 math-cur-record) 'parts) |
1253 (calcFunc-expand temp) | 1253 (calcFunc-expand temp) |
1254 (setq v (list 'var 'PARTS math-cur-record) | 1254 (setq v (list 'var 'PARTS math-cur-record) |
1255 temp (let (calc-next-why) | 1255 temp (let (calc-next-why) |
1256 (math-solve-for (math-sub v temp) 0 v nil))) | 1256 (math-simplify-extended |
1257 (and temp (not (integerp temp)) | 1257 (math-solve-for (math-sub v temp) 0 v nil))) |
1258 (math-simplify-extended temp))))) | 1258 temp (if (and (eq (car-safe temp) '/) |
1259 (math-zerop (nth 2 temp))) | |
1260 nil temp))))) | |
1259 (setcar (cdr math-cur-record) 'busy))))) | 1261 (setcar (cdr math-cur-record) 'busy))))) |
1260 | 1262 |
1261 ;;; This tries two different formulations, hoping the algebraic simplifier | 1263 ;;; This tries two different formulations, hoping the algebraic simplifier |
1262 ;;; will be strong enough to handle at least one. | 1264 ;;; will be strong enough to handle at least one. |
1263 (defun math-integrate-by-substitution (expr u &optional user uinv uinvprime) | 1265 (defun math-integrate-by-substitution (expr u &optional user uinv uinvprime) |