>>>>> "Gosse" == Gosse Michel <michel.gosse@freesbee.fr> writes:
Gosse> Hello
Gosse> With maxima 5.6, the following command :
Gosse> integrate(1/cos(x)^2,x,0,%PI/4);
Gosse> give the answer :
Gosse> lim(x->0) tan(x+%PI/4)
Gosse> I would expect that maxima returns the real 1, because it is a very
Gosse> classical function to integrate.
Raymond> Appears to be a bug in maxima's limit function:
Raymond> (C1) limit(tan(x+%pi/4),x,0,minus);
Raymond> %PI
Raymond> (D1) limit TAN(x + ---)
Raymond> x -> 0- 4
Raymond> Don't know why it can't determine this for itself. It has no problem
Raymond> with sin(x+%pi/4). And it works correctly for cot(x+%pi/4)!
I think I found the problem. In limit.lisp, simplim%tan is the
routine for finding the limit of tan. I don't see why it couldn't be
replaced by the much simpler function:
(defun simplim%tan (arg)
(simplimit `((mtimes simp) ((mexpt simp) ((%cos simp) ,arg) -1) ((%sin simp) ,arg))
var val)
)
which computes the limit by computing the limit of sin/cos. This
makes the above limit work, and for the few test cases I tried.
I hope someone can give this some more tests before this change is
committed.
Ray