Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maxima integral wrong #18599

Open
kcrisman opened this issue Jun 3, 2015 · 3 comments
Open

Maxima integral wrong #18599

kcrisman opened this issue Jun 3, 2015 · 3 comments

Comments

@kcrisman
Copy link
Member

kcrisman commented Jun 3, 2015

See

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)
log(sin(x))
sage: maxima_integrator(sqrt(cot(x)^2),x,pi/4,3*pi/4)
0
sage: maxima_integrator(cot(x),x, pi/4,3*pi/4)
0
sage: f(x) = maxima_integrator(sqrt(cot(x)^2),x)
sage: f(pi/4)
-1/2*log(2)
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);
                                         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);
                                             2
                                      log(tan (x) + 1)
(%o4)                   log(tan(x)) - ----------------
                                             2

Reported upstream at bug 2971.

Upstream: Reported upstream. No feedback yet.

CC: @rwst @nbruin

Component: calculus

Issue created by migration from https://trac.sagemath.org/ticket/18599

@kcrisman kcrisman added this to the sage-6.8 milestone Jun 3, 2015
@kcrisman

This comment has been minimized.

@kcrisman
Copy link
Member Author

kcrisman commented Jun 3, 2015

Changed upstream from Not yet reported upstream; Will do shortly. to Reported upstream. No feedback yet.

@rwst

This comment has been minimized.

@mkoeppe mkoeppe removed this from the sage-6.8 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants