(%i1) x * (x^2 + k[0])/(1 + x^2); (%o1) (x*(x^2+k[0]))/(x^2+1)
(%i2) integrate(%,x); (%o2) ((k(0)-1)*log(x^2+1))/2+x^2/2
First reported by David Ronis on the mailing list (http://www.math.utexas.edu/pipermail/maxima/2012/028989.html)
The bug comes from subst10 (defined in sin.lisp). A possible fix is to change (atom ex) to ($mapatom ex).
(defun subst10 (ex) (cond ((atom ex) ex) ((and (eq (caar ex) 'mexpt) (eq (cadr ex) var)) (list '(mexpt) var (integerp2 (quotient (caddr ex) *d*)))) (t (cons (ncons (caar ex)) (mapcar #'(lambda (c) (subst10 c)) (cdr ex))))))
Log in to post a comment.
The bug comes from subst10 (defined in sin.lisp). A possible fix is
to change (atom ex) to ($mapatom ex).
(defun subst10 (ex)
(cond ((atom ex) ex)
((and (eq (caar ex) 'mexpt) (eq (cadr ex) var))
(list '(mexpt) var (integerp2 (quotient (caddr ex) *d*))))
(t (cons (ncons (caar ex))
(mapcar #'(lambda (c) (subst10 c)) (cdr ex))))))