Menu

#4780 function ldefint

None
open
nobody
ldefinit (2)
5
2026-06-15
2026-06-15
No

Some issues with:

(defmfun $ldefint (exp var ll ul &aux $logabs ans a1 a2)
  (setq $logabs t ans (sinint exp var)
    a1 (toplevel-$limit ans var ul '$minus)
    a2 (toplevel-$limit ans var ll '$plus))
  (and (member a1 '($inf $minf $infinity $und $ind) :test #'eq)
       (setq a1 (nounlimit ans var ul)))
  (and (member a2 '($inf $minf $infinity $und $ind) :test #'eq)
       (setq a2 (nounlimit ans var ll)))
  ($expand (m- a1 a2)))

Problems:

  • The limits from the left and right assume that ll < ul, but the code doesn't check that that this is true. I don't know if a incorrect value due to this assumption.

  • There should be logic that detects divergent integrals.

  • When sinint returns an integration nounform, the function ldefint returns a difference of limits of indefinite integrals. This assumes that the additive constant in each indefinite integral is the same. This is unlikely to ever cause a bug, but it's wrong.

  • The final call to $expand is perverse.

  • The &aux variables should be updated.

The testsuite call s ldefint only once--it needs much more testing.

Discussion


Log in to post a comment.

Auth0 Logo