Opened 6 years ago

Last modified 6 years ago

#18599 new defect

Maxima integral wrong

Reported by: kcrisman Owned by:
Priority: major Milestone: sage-6.8
Component: calculus Keywords:
Cc: rws, nbruin Merged in:
Authors: Reviewers:
Report Upstream: Reported upstream. No feedback yet. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by rws)


sage: from sage.symbolic.integration.external import maxima_integrator
sage: maxima_integrator(sqrt(cot(x)^2),x)
-1/2*log(tan(x)^2 + 1) + log(tan(x))
sage: maxima_integrator(cot(x),x)
sage: maxima_integrator(sqrt(cot(x)^2),x,pi/4,3*pi/4)
sage: maxima_integrator(cot(x),x, pi/4,3*pi/4)
sage: f(x) = maxima_integrator(sqrt(cot(x)^2),x)
sage: f(pi/4)
sage: f(3*pi/4)
I*pi - 1/2*log(2)

But that is wrong, as this function is nonnegative and usually positive. The problem is in Maxima.

(%i1) domain:complex;
(%o1)                               complex
(%i2) sqrt(cot(x)^2);
(%o2)                            sqrt(cot (x))
(%i3) integrate(sqrt(cot(x)^2),x,%pi/4,%pi/4*3);
(%o3)                                  0
(%i4) integrate(sqrt(cot(x)^2),x);
                                      log(tan (x) + 1)
(%o4)                   log(tan(x)) - ----------------

Reported upstream at bug 2971.

Change History (2)

comment:1 Changed 6 years ago by kcrisman

  • Cc nbruin added
  • Description modified (diff)
  • Report Upstream changed from Not yet reported upstream; Will do shortly. to Reported upstream. No feedback yet.

comment:2 Changed 6 years ago by rws

  • Description modified (diff)
Note: See TracTickets for help on using tickets.