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

Fix integral(1/max_symbolic(x, 1)^2, x, 0, oo, algorithm='giac') #32354

Closed
fchapoton opened this issue Aug 10, 2021 · 17 comments
Closed

Fix integral(1/max_symbolic(x, 1)^2, x, 0, oo, algorithm='giac') #32354

fchapoton opened this issue Aug 10, 2021 · 17 comments

Comments

@fchapoton
Copy link
Contributor

Compare

sage: integral(1/max_symbolic(x,1)**2,x,0,oo,algorithm='maxima')                
integrate(max(1, x)^(-2), x, 0, +Infinity)
sage: integral(1/max_symbolic(x,1)**2,x,0,oo,algorithm='sympy')                 
2
sage: integral(1/max_symbolic(x,1)**2,x,0,oo,algorithm='giac')                  
+Infinity

The correct answer is sympy's answer.

Related problem:

sage: ex=1/max_symbolic(x,1)**2                                                 
sage: integral(ex,x,0,2,algorithm='giac')                                       
undef

Upstream: Fixed upstream, but not in a stable release.

CC: @slel @sagetrac-parisse @tscrim @kliem

Component: calculus

Keywords: integral

Author: Frédéric Chapoton

Branch/Commit: 39edec7

Reviewer: Travis Scrimshaw

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

@fchapoton fchapoton added this to the sage-9.4 milestone Aug 10, 2021
@fchapoton

This comment has been minimized.

@fchapoton
Copy link
Contributor Author

comment:2

inside Giac:

  --> Switching to Giac <--

giac: integrate(1/max(x,1)^2,x,0,2)                                             
Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real):
Check [abs(x-1)]
when2sign does not work properly with infinities. Replace inf by Inf and run limit after.
Unable to cancel step at 1 of -4*1/2/(x+x)-infinity
undef
giac: integrate(1/max(x,1)^2,x,0,1)                                             
1
giac: integrate(1/max(x,1)^2,x,1,2)                                             
1/2

@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Aug 22, 2021
@fchapoton
Copy link
Contributor Author

comment:5

un petit souci avec cette intégrale assez simple de la fonction max, dans giac

@sagetrac-parisse
Copy link
Mannequin

sagetrac-parisse mannequin commented Aug 29, 2021

comment:6

Fixed in my source tree. I will certainly make a 1.7.0-27 release next week.

@fchapoton
Copy link
Contributor Author

comment:7

Merci !

@slel
Copy link
Member

slel commented Aug 29, 2021

Upstream: Fixed upstream, but not in a stable release.

@slel slel changed the title wrong integral with giac Fix integral(1/max_symbolic(x, 1)^2, x, 0, oo, algorithm='giac') Aug 29, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 May 3, 2022
@fchapoton
Copy link
Contributor Author

comment:11

now works, should be doctested

@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Sep 19, 2022
@fchapoton
Copy link
Contributor Author

Author: Frédéric Chapoton

@fchapoton
Copy link
Contributor Author

Commit: 819c06d

@fchapoton
Copy link
Contributor Author

comment:13

voilà un test


New commits:

f1da83epartial cleanup in partition.py
819c06dadd doctest for integral of max_symbolic with giac

@fchapoton
Copy link
Contributor Author

Branch: u/chapoton/32354

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 1, 2022

Changed commit from 819c06d to 39edec7

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 1, 2022

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

39edec7doctest for integral of max_symbolic with giac

@fchapoton
Copy link
Contributor Author

comment:15

lights are morally green, so please review

@tscrim
Copy link
Collaborator

tscrim commented Oct 3, 2022

comment:16

LGTM.

@tscrim
Copy link
Collaborator

tscrim commented Oct 3, 2022

Reviewer: Travis Scrimshaw

@vbraun
Copy link
Member

vbraun commented Oct 11, 2022

Changed branch from u/chapoton/32354 to 39edec7

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

5 participants