|
From: Dan G. <dg...@us...> - 2011-06-09 19:52:17
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Maxima, A Computer Algebra System".
The branch, master has been updated
via 2c3efda3ea0f0c40062dfcdc6cf516fd21ace723 (commit)
via 4e66d8670cb4bfa5e6f37a7b2875f9956cee4508 (commit)
from 6fe1bb34c713aff1ab95accddeace79de1171181 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2c3efda3ea0f0c40062dfcdc6cf516fd21ace723
Merge: 6fe1bb3 4e66d86
Author: Dan Gildea <dgildea>
Date: Thu Jun 9 15:51:55 2011 -0400
Merge branch 'bugfix'
commit 4e66d8670cb4bfa5e6f37a7b2875f9956cee4508
Author: Dan Gildea <dgildea>
Date: Thu Jun 9 15:50:46 2011 -0400
src/defint.lisp:
o intcv: don't evaluate var at minf/inf
o scaxn: integral should not return ind, causes ind - ind => 0
fixes integrate(sin(x)-cos(x),x,0,inf) wrong - ID: 1664729
o limit-subs: inf - minf = divergent, inf - inf = don't know
fixes integral from minf to inf of an absolute value combo fails - ID: 3313531
tests/rtestint.mac:
o add integrate(abs(x - 1) + abs(x + 1) - 2*abs(x),x,minf,inf);
diff --git a/src/defint.lisp b/src/defint.lisp
index 2d250d1..2849ef7 100644
--- a/src/defint.lisp
+++ b/src/defint.lisp
@@ -373,9 +373,8 @@ in the interval of integration.")
(do* ((roots *roots (cddr roots))
(root (caddar roots) (caddar roots)))
((null root) nil)
- (if (test-inverse nv var root 'yx ll)
- ;; to do: check upper limit,
- ;; test for minf/inf
+ (if (or (real-infinityp ll)
+ (test-inverse nv var root 'yx ll))
(return root))))
(cond (flag (intcv2 d ind nv))
(t (intcv1 d ind nv))))
@@ -944,8 +943,8 @@ in the interval of integration.")
(a2 ($limit e var ul '$minus)))
(cond ((member a1 '($inf $minf $infinity ) :test #'eq)
(cond ((member a2 '($inf $minf $infinity) :test #'eq)
- (cond ((eq a2 a1) (diverg))
- (t ())))
+ (cond ((eq a2 a1) ())
+ (t (diverg))))
(t (diverg))))
((member a2 '($inf $minf $infinity) :test #'eq) (diverg))
((or (member a1 '($und $ind) :test #'eq)
@@ -2424,10 +2423,8 @@ in the interval of integration.")
;; Ok, we have cos(b*x^n) or sin(b*x^n), and we set e = (n
;; b)
(cond ((equal (car e) 1.)
- ;; n = 1. Give up. (Why IND? Why not divergent or
- ;; something else? Why is this case different from
- ;; the case below of n <= 1?)
- '$ind)
+ ;; n = 1. Give up. (Why not divergent?)
+ nil)
((zerop (setq s (let ((sign ($asksign (cadr e))))
(cond ((eq sign '$pos) 1)
((eq sign '$neg) -1)
diff --git a/tests/rtestint.mac b/tests/rtestint.mac
index 6d8965f..cad1505 100644
--- a/tests/rtestint.mac
+++ b/tests/rtestint.mac
@@ -1363,3 +1363,7 @@ integrate((log((2-x)/2)+log(2))/(1-x), x, 0, 1);
/* Incorrect integral of log(1+a/(x*t)^2) - ID: 3291160 */
integrate(log(1+7/(x^2)),x,1,inf);
(14*atan(sqrt(7))-sqrt(7)*log(8))/sqrt(7);
+
+/* integral from minf to inf of an absolute value combo fails - ID: 3313531 */
+integrate(abs(x - 1) + abs(x + 1) - 2*abs(x),x,minf,inf);
+2;
-----------------------------------------------------------------------
Summary of changes:
src/defint.lisp | 15 ++++++---------
tests/rtestint.mac | 4 ++++
2 files changed, 10 insertions(+), 9 deletions(-)
hooks/post-receive
--
Maxima, A Computer Algebra System
|