Regression in integration



After  fixing my code, it runs the testsuite OK with just a few problems.  In rtest_integrate, seven integrals differ in 
(I think) insignificant ways to the expected,  and the assumptions for two integrals  would need need to be changed to allow 
the testsuite to run--the assumption changes are due to weaknesses in sign.

I know that asksign isn't loved by all. Nevertheless if there is support for the askequal & related change to the 
integrate defprop for mexpt, let me know.

--Barton

(defun $askequal (a b)
  (let ((answer (meqp a b))) ; presumably handles mbags and extended reals.
    (setq answer
	  (cond ((eq answer t) '$yes)
		((eq answer nil) '$no)
		(t (retrieve `((mtext) "Is " ,a " equal to " ,b "?") nil))))
    
    (cond ((eq answer '$no)
	   (tdpn (sub b a))
	   answer)
	  ((eq answer '$yes)
	   (tdzero (sub a b))
	   answer)
	  (t  
	   (mtell "Please answer either yes or no.")
	   ($askequal a b)))))
	  
;; integrate(x^n,x) = if n # -1 then x^(n+1)/(n+1) else logmabs(x).

(defun integrate-mexpt (x n)
  (setq n-is-minus-one ($askequal n -1))
  (cond ((eq '$yes n-is-minus-one)
	 (logmabs x)) ; that's log(abs(x)) when logabs is true, and log(x) otherwise.
	(t
	 (setq n (add n 1))
	 (div (take '(mexpt) x n) n))))
	  
(putprop 'mexpt `((x n) ,(lambda (x n) (integrate-mexpt x n))) 'integral)