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

improving rules for Bessel functions with half integer indices #816

Merged
merged 3 commits into from
Mar 20, 2023

Conversation

mmatera
Copy link
Contributor

@mmatera mmatera commented Mar 19, 2023

This PR improves the rules for Bessel functions of half integer index.

@rocky
Copy link
Member

rocky commented Mar 19, 2023

LGTM.

I am glad to see more code being written in Mathics as opposed to Python as the first choice.

Also my personal taste would be to write more comments or links to references as was done in some of the discussion in the previous PR. If it wasn't clear back then it might not be clear to someone in the future either.

@rocky
Copy link
Member

rocky commented Mar 19, 2023

And more doctests showing this aspect off would be nice too, as is done on the WMA site. If we have this goodness in there, we might advertise it a little more.

@mmatera mmatera force-pushed the more_general_halfinteger_bessel branch from 3942e7d to 62e3d44 Compare March 19, 2023 15:59
@mmatera
Copy link
Contributor Author

mmatera commented Mar 19, 2023

Here I added a couple of extra rules, including the integral form for BesselJ[0,z]. This can be extended in the future.



Unprotect[BesselI]
BesselI[1/2,z_] := (Sqrt[2/Pi] Sinh[z]) / Sqrt[z]
BesselI[-1/2,z_] := (Sqrt[2/Pi] Cosh[z]) / Sqrt[z]
(*Rayleight's formulas for half-integer indices*)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rayleight -> Rayleigh

Protect[BesselI]

Unprotect[BesselK]
(*Rayleight's formulas for half-integer indices*)
Copy link
Member

@rocky rocky Mar 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eight -> eigh

and below.

@rocky
Copy link
Member

rocky commented Mar 19, 2023

LGTM - see spelling typos. Much improved. Thanks!

@mmatera mmatera merged commit b83d0f0 into master Mar 20, 2023
@mmatera mmatera deleted the more_general_halfinteger_bessel branch March 20, 2023 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants