Opened 4 years ago
Last modified 2 years ago
#14591 new defect
cosh integral incorrect because of abs_integrate
Reported by: | kcrisman | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | calculus | Keywords: | |
Cc: | tmonteil, gagern | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | Reported upstream. No feedback yet. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: | #12731 |
Description
See this ask.sagemath question.
sage: a = integrate(sqrt(1-1/4*cosh(x)^2),x) sage: a.full_simplify() cosh(x)
Not that I'm an expert here, but at any rate, viewed as real functions this makes no sense, though perhaps on some branch it does. This happens because
Maxima 5.29.1 http://maxima.sourceforge.net using Lisp ECL 12.12.1 Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. (%i1) domain:complex; (%o1) complex (%i2) display2d:false; (%o2) false (%i3) B:integrate(sqrt(1-cosh(x)^2/4),x); (%o3) 'integrate(sqrt(1-cosh(x)^2/4),x) (%i4) trigsimp(B); (%o4) 'integrate(sqrt(-(cosh(x)^2-4)/4),x) (%i5) fullratsimp(B); (%o5) 'integrate(sqrt(-(cosh(x)^2-4)/4),x) (%i6) load(abs_integrate); (%o6) "/Users/.../sage-5.9.rc1/local/share/maxima/5.29.1/share/contrib/integration/abs_integrate.mac" (%i7) trigsimp(B); (%o7) cosh(x) (%i8) fullratsimp(B); (%o8) cosh(x)
I'm not sure we want to unload abs_integrate
but we need to figure something out here.
Change History (13)
comment:1 Changed 4 years ago by
- Cc tmonteil added
comment:2 Changed 4 years ago by
- Cc gagern added
comment:3 Changed 4 years ago by
comment:4 Changed 3 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:5 Changed 3 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:6 Changed 3 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:7 Changed 3 years ago by
The answer cosh(x) is completely wrong, even in a neighbourhood of x = 0:
cosh(x) = integrate(sqrt(1 - 1/4*cosh(x)^2),x) => sinh(x) = sqrt(1 - 1/4*cosh(x)^2) => sinh(x)^2 = 1 - 1/4*cosh(x)^2 => 0 = 3/4 (substitute x = 0)
According to the ask.sagemath.org link in the ticket description, the correct answer can be expressed in terms of an elliptic integral function, which I trust much more.
comment:8 follow-up: ↓ 9 Changed 3 years ago by
As Thierry pointed out on the ask.sagemath question. So, does #13973 fix this or not?
comment:9 in reply to: ↑ 8 Changed 3 years ago by
Replying to kcrisman:
As Thierry pointed out on the ask.sagemath question.
Yes, I just wanted to give a clear reason here why the answer couldn't possibly be right.
So, does #13973 fix this or not?
No, it doesn't. I have been doing some debugging of the Maxima command
trigsimp(integrate(sqrt(4 - cosh(x)^2),x));
which returns cosh(x)
when executed after loading abs_integrate
. It seems that the problem arises in ratsubst
, when substituting 1 + sinh(x)^2
for cosh(x)^2
. What makes it more tricky is that calling ratsubst
directly with the same arguments gives a correct answer. Possibly some flag is set at some intermediate point that triggers the bug.
comment:10 Changed 3 years ago by
- Report Upstream changed from N/A to Reported upstream. No feedback yet.
Reported upstream: https://sourceforge.net/p/maxima/bugs/2737/
comment:11 Changed 2 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:12 Changed 2 years ago by
See also #12731.
comment:13 Changed 2 years ago by
- Stopgaps set to #12731
Fixed by #13973.