-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Integral of sin(x)/x gives false result. #11164
Comments
Upstream: Fixed upstream, in a later stable release. |
comment:1
In the future, be sure to pick a component (for instance, calculus or symbolics); that will help people find it more easily. There are two problems here.
This is definitely a problem. However, it's fixed in the latest Maxima. Here is the old one, in Sage:
And here is 5.24.0. I assume this isn't a problem of which Lisp we are using?
New:
We'd need doctesting to test both of these once we upgrade Maxima. |
add doctest to confirm fix |
comment:2
Attachment: trac_11164_verify_integration_sinx_x.patch.gz Might as well doctest and close. |
comment:3
I may have misstated whether this is "fixed".
The graph makes it very obvious the second (numerical) answer is correct. Unsurprisingly, the other answer is off by exactly Presumably the first answer is "correct" in the sense that it is an alternate representation of the So we still need to do something with this. Or at the very least warn about branches. But really, |
comment:4
You're right, of course. It's silly to start with sin(x)/x and then generalize to something which doesn't reduce to the expected value, but far, far sillier to add a doctest enshrining the goofy behaviour as the expected. :^) Does this work on the current maxima trunk now? |
comment:5
This is the previous version (5.25.1):
W|A agrees that this is about
Here is the issue; this function may or may not be the same as the sine integral. The problem seems to be that although Maxima has the sine integral ( What do you think a good solution to this is? I suppose we could open a ticket for it on the Maxima site, but I'm not sure whether the |
comment:6
By which I mean it isn't the same, of course, but also that (as defined) it isn't even always the same constant away. Antiderivatives can differ by a constant, but when the constant is different depending on what |
comment:7
By the way, achrzesz has a great one-liner for a related question:
Though here it doesn't solve the problem, but maybe it will trigger someone's memory as to another Maxima flag to set...
|
comment:8
I wonder whether this is potentially fixed in #13364 - I don't know if we ever reported upstream, or whether we should have... |
comment:9
Apparently not yet. |
This comment has been minimized.
This comment has been minimized.
comment:10
In 6.3.beta4 (so with #13973), I get:
Something bad happens with the integration computation when crossing over 0 as we have:
|
comment:11
The problem is caused by the integral being computed via symbolic integration; see also comment:5. Maxima integrates |
comment:12
How much you wanna bet this is the same underlying problem as in #17328? |
comment:13
Nah, I was thrown off by the gammas, I think. What if we don't allow incomplete gamma to become |
comment:14
Looks like if that was once possible, it isn't any more (already done during integration in Maxima, I mean). |
Changed upstream from Fixed upstream, in a later stable release. to Reported upstream. No feedback yet. |
comment:15
Or maybe not;
so maybe we are already setting |
comment:16
See also the documentation for gamma_expand. The changelog says
|
comment:17
Drivel. We could try this, though the branch problem is likely still there with incomplete gamma.
because we do
in sage/functions/other.py But unfortunately
So same problem there. Yuck. We really need Maxima to provide a proper |
Stopgaps: todo |
comment:19
Replying to @sagetrac-jakobkroeker:
Maxima has provided a proper Si function for a while called
Edit: upstream said this would be fixed here in 2016. |
Changed keywords from none to maxima |
Changed upstream from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug. |
Changed keywords from maxima to maxima, integration |
comment:23
Similar bug (regression after upgrade to Maxima 5.44.0): #30389 |
I expected an answer of about 2e-6.
Upstream: Reported upstream. Developers acknowledge bug.
Component: calculus
Keywords: maxima, integration
Stopgaps: todo
Issue created by migration from https://trac.sagemath.org/ticket/11164
The text was updated successfully, but these errors were encountered: