Skip to content

Add more special-function rules#110

Merged
Bumblebee00 merged 2 commits into
JuliaSymbolics:mainfrom
AshtonSBradley:more-specials
May 17, 2026
Merged

Add more special-function rules#110
Bumblebee00 merged 2 commits into
JuliaSymbolics:mainfrom
AshtonSBradley:more-specials

Conversation

@AshtonSBradley
Copy link
Copy Markdown
Contributor

Summary

  • Adds rule-based integration support for more registered special functions.
  • Extends the existing Bessel special-function rules with Hankel H1/H2 analogues.
  • Adds focused regression coverage for Hankel, Airy, error functions, exponential integral, and sine/cosine integral primitives.

Explanation

This PR adds low-risk special-function rules for cases that are already represented in the rule-based integration machinery.

The Hankel rules mirror the existing Bessel J/Y monomial recurrence structure, covering direct order-raising primitives and the same even-step recurrence form used by the current Bessel rules.

It also adds direct primitives for Airy derivative identities and the Airy differential equation cases:

  • ∫ airyaiprime(a*x) dx
  • ∫ airybiprime(a*x) dx
  • ∫ x*airyai(x) dx
  • ∫ x*airybi(x) dx

Finally, it adds integration-by-parts primitives for linear arguments of erf, erfi, expinti, sinint, and cosint. These use standard derivative identities and do not add new dependencies or public API.

Tests

  • julia --project=. test/methods/rule_based/test_special_functions.jl
    • Passed: 22/22
  • julia --project=. test/runtests.jl
    • Passed with exit code 0: 195 passed, 1 broken
    • The runner also reported one existing RuleBased baseline improvement to tighten separately.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 13, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.51%. Comparing base (0f6cd70) to head (3625e0e).
⚠️ Report is 6 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #110   +/-   ##
=======================================
  Coverage   54.51%   54.51%           
=======================================
  Files          22       23    +1     
  Lines        4309     4309           
=======================================
  Hits         2349     2349           
  Misses       1960     1960           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AshtonSBradley AshtonSBradley marked this pull request as ready for review May 13, 2026 20:57
@Bumblebee00
Copy link
Copy Markdown
Collaborator

Thank for adding these rules I think they are really useful. Just one correction, I think is better to put in the file src/methods/rule_based/rules2/8 Special functions/8.1 Bessel functions.jl only the rules for the bessel functions, and to put the airy functions in another file (maybe 8.1 Airy functions.jl), then erf, erfi, expinti, in another and also sinint, and cosint in another, to keep it ordered. Could you do this modification? then is ready to merge

Then I am actually curious on why you added them, you use them in your research/work? did you create these rules manually yourself or you translated them from the Mathematica ones?

@AshtonSBradley
Copy link
Copy Markdown
Contributor Author

Thank for adding these rules I think they are really useful. Just one correction, I think is better to put in the file src/methods/rule_based/rules2/8 Special functions/8.1 Bessel functions.jl only the rules for the bessel functions, and to put the airy functions in another file (maybe 8.1 Airy functions.jl), then erf, erfi, expinti, in another and also sinint, and cosint in another, to keep it ordered. Could you do this modification? then is ready to merge

Done

Then I am actually curious on why you added them, you use them in your research/work?

Research - I would like to see first class open source symbolic integration available to the math/physics community.

did you create these rules manually yourself or you translated them from the Mathematica ones?

I added these manually. They’re small standard identities chosen to match the existing rule style here, not translated from the Mathematica rules.

@Bumblebee00 Bumblebee00 merged commit 2e423c7 into JuliaSymbolics:main May 17, 2026
20 checks passed
@AshtonSBradley AshtonSBradley deleted the more-specials branch May 17, 2026 07:41
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.

3 participants