| 
      
      
      From: Dan G. <dg...@us...> - 2011-06-14 20:17:39
      
     | 
| 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  0108623c8eea2c36ffd5677f34b7223cd5cfeb54 (commit)
       via  3f782afca328f6fd6f02e1bc718baa28d034114f (commit)
       via  d785ee7c9d19394ad6354bb8e643821189e3c3d3 (commit)
      from  7d852ded553f999a2bf7a3ecfe69d75b0d1686cf (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 0108623c8eea2c36ffd5677f34b7223cd5cfeb54
Merge: 3f782af 7d852de
Author: Dan Gildea <dgildea>
Date:   Tue Jun 14 11:39:03 2011 -0400
    Merge branch 'master' of ssh://maxima.git.sourceforge.net/gitroot/maxima/maxima
commit 3f782afca328f6fd6f02e1bc718baa28d034114f
Merge: 2c3efda d785ee7
Author: Dan Gildea <dgildea>
Date:   Tue Jun 14 11:38:19 2011 -0400
    Merge branch 'bugfix'
commit d785ee7c9d19394ad6354bb8e643821189e3c3d3
Author: Dan Gildea <dgildea>
Date:   Tue Jun 14 11:32:59 2011 -0400
    src/solve.lisp:
    o solve: pass multiplicity to recursive calls.
    
    o easy-cases: pass multiplicity to recursive calls.
      Add new case: const^x => no solutions.
      fixes definite integration - ID: 3315476
    
    tests/rtestint.mac:
    o add integrate(1/2^x, x, 0, 1);
diff --git a/src/solve.lisp b/src/solve.lisp
index 26d6487..55aa30f 100644
--- a/src/solve.lisp
+++ b/src/solve.lisp
@@ -306,9 +306,10 @@
 				     (cddr exp)
 				     (not (equal 1 (setq *g (solventhp (cdddr exp) (cadr exp))))))
 				(solventh exp *g))
-			       (t (map2c #'solve1a
-					 (cond ($solvefactors (pfactor exp))
-					       (t (list exp 1))))))))))
+			       (t (cond ($solvefactors 
+					 (map2c (lambda (x y) (solve1a x (m* mult y)))
+						(pfactor exp)))
+					(t (solve1a exp mult)))))))))
 
      (cond (symbol (setq *roots (subst temp *var *roots))
 		   (setq *failures (subst temp *var *failures))))
@@ -326,8 +327,7 @@
 ;;; is an expression that can be undefined or infinity for certain values of
 ;;; the variable in question. But soon this will be no worry because I will
 ;;; add a list of  "possible bad roots" to what $SOLVE returns.
-;;; Solve is not fully recursive when it due to globals, $MULTIPLICIES
-;;; may be screwed here. (Solve should be made recursive)
+;;; Passes multiplicity to recursive calls to solve.
 
 (defun easy-cases (*exp *var mult)
   (cond ((or (atom *exp) (atom (car *exp))) nil)
@@ -337,18 +337,15 @@
 	   (solve (car terms) *var mult))
 	 'mtimes)
 
-	;; This code is commented out because it exposes a bug in the way
-	;; solve (or its friends) handles multiplicities. A previous 
-	;; version (1.2) had a typo (caar *exp) 'mexp ...) that prevented this
-	;; bug from manifesting.  Barton Willis, 12 May 2004
-	;;
-	;; In particular it causes test 137 in rtest15 and test 45 in
-	;; rtestint to fail.
-	#+nil
 	((eq (caar *exp) 'mexpt)
-	 (cond ((and (integerp  (caddr *exp))
+	 (cond ((and (freeof *var (cadr *exp))
+		     (not (zerop1 (cadr *exp))))
+		;; no solutions: c^x is never zero
+		'mexpt)
+
+	       ((and (integerp  (caddr *exp))
 		     (plusp (caddr *exp)))
-		(solve (cadr *exp) *var (caddr *exp))
+		(solve (cadr *exp) *var (m* mult (caddr *exp)))
 		'mexprat)))))
 
 ;;; Predicate to test for presence of troublesome trig functions to be
diff --git a/tests/rtestint.mac b/tests/rtestint.mac
index cad1505..bbf1eb3 100644
--- a/tests/rtestint.mac
+++ b/tests/rtestint.mac
@@ -1367,3 +1367,7 @@ integrate(log(1+7/(x^2)),x,1,inf);
 /* 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;
+
+/* definite integration - ID: 3315476 */
+integrate(1/2^x, x, 0, 1);
+1/(2*log(2));
-----------------------------------------------------------------------
Summary of changes:
 src/solve.lisp     |   27 ++++++++++++---------------
 tests/rtestint.mac |    4 ++++
 2 files changed, 16 insertions(+), 15 deletions(-)
hooks/post-receive
-- 
Maxima, A Computer Algebra System
 |