Menu

#2416 integrate changes k[0] --> k(0)

closed
nobody
5
2012-05-30
2012-05-30
No

(%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)

Discussion

  • Barton Willis

    Barton Willis - 2012-05-30

    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))))))

     
  • Barton Willis

    Barton Willis - 2012-05-30
    • status: open --> closed
     

Log in to post a comment.