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

contour integration #67

Closed
stevengj opened this issue Feb 7, 2023 · 1 comment
Closed

contour integration #67

stevengj opened this issue Feb 7, 2023 · 1 comment
Labels

Comments

@stevengj
Copy link
Member

stevengj commented Feb 7, 2023

I thought this was supported, but then this integral should give 2πi by the residue theorem:

julia> quadgk(z -> cos(z)/z, 1, im, -1, -im)
(0.50046301807924 + 4.71238898038469im, 4.027482497221434e-9)

and the result looks clearly wrong. 😢

@stevengj stevengj added the bug label Feb 7, 2023
@stevengj
Copy link
Member Author

stevengj commented Feb 7, 2023

Oh, nevermind, I forgot to close the contour by ending up back at z=1:

julia> quadgk(z -> cos(z)/z, 1, im, -1, -im, 1)
(0.0 + 6.283185307179587im, 5.369976662961913e-9)

@stevengj stevengj closed this as completed Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant