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 gives wrong antiderivative for trig with possible zero coefficient #35406

Open
2 tasks done
kcrisman opened this issue Mar 31, 2023 · 3 comments
Open
2 tasks done

Comments

@kcrisman
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.

Did you read the documentation and troubleshoot guide?

  • I have read the documentation and troubleshoot guide

Environment

All

Steps To Reproduce

No response

Expected Behavior

As reported here and here:

var('n t')
assume(n, 'integer')
integrate(cos(2 * pi * n * t), t, 0, 1)

should be one if n=0.

Actual Behavior

Instead, we get zero, because Maxima uses a generic antiderivative:

integrate(cos(2 * %pi * n * t),t);
sin(2*%pi*n*t)/(2*%pi*n)

Additional Information

As seen in the cell server, this has nothing to do with declaration, it's a pure Maxima issue, reported upstream at Bug 4125.

Note that Sympy does this correctly:


var('n t')
integrate(cos(2 * pi * n * t), t, algorithm='sympy')

cases(((pi*n != 0, 1/2*sin(2*pi*n*t)/(pi*n)), (1, t)))

but for the definite integral Sage can't interpret the case structure, I guess, which is a separate issue.

@kcrisman
Copy link
Member Author

PS: the process to create this bug was kind of onerous for those of us used to the Trac form. Is there a way to not have to fill in all these form boxes and instead just report, you know, the bug? I agree it's helpful for new folk, but it's somewhat time-consuming.

@kcrisman
Copy link
Member Author

Update: Maxima devs don't consider the antiderivative a bug (removable discontinuity) but the integer assumption issue stands, I would think.

@kcrisman
Copy link
Member Author

BTW, is there an equivalent to the Trac upstream response reports? I couldn't find labels for that.

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

1 participant