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

Proposal: Add a Section on Numerical Integration in Mathematics section #699

Open
mtantaoui opened this issue Nov 20, 2024 · 4 comments
Open

Comments

@mtantaoui
Copy link

I would like to propose the addition of a section in the Rust Cookbook dedicated to numerical integration. Numerical integration is a foundational topic in many fields such as engineering, physics, and data science, and having examples in the Cookbook would make it more accessible to Rust developers.

There are various numerical integration algorithms commonly used in practice (e.g., trapezoidal rule, Simpson's rule, Gaussian quadrature, etc.). I maintain a numerical integration crate that implements several of these algorithms and would be happy to contribute examples illustrating their usage. These examples can demonstrate how to perform numerical integration effectively in Rust.

However, I want to emphasize that my intent is not to use the Cookbook as a platform to promote my crate. If there are other preferred libraries in the ecosystem, or if the Cookbook maintainers suggest a different approach, I’m more than willing to collaborate and adjust accordingly.

Would it be appropriate to include a dedicated page in the Rust Cookbook explaining all the numerical integration methods from my crate, or would that be considered excessive?

Thank you for considering this proposal. I look forward to hearing your thoughts and working together to make this addition beneficial to the Rust community!

Feel free to tweak this to reflect your personal tone or any additional points you'd like to make.

@AndyGauge
Copy link
Collaborator

I would love a contributor wanting to add content to the cookbook. Feel free to add crate content to a PR and we can get trough a review process. Now the intent of the cookbook is to be a curated collection of crates that do something a lot of mid level rust users would want to borrow from. I read the readme of that crate and realized I don't know if I would ever need to use those formulae. If you had a case that was real world that put light on why a person who doesn't understand integration would use the crate, yes. If it is a technical dive into a topic that most rust user's wouldn't find useful, no.

@mtantaoui
Copy link
Author

mtantaoui commented Nov 20, 2024

Thank you for your thoughtful response! I completely agree with your perspective.

I’ll consider how to frame the examples around real-world scenarios where numerical integration is useful, especially for developers who might not be deeply familiar with the underlying mathematics.

Would you be open to starting with two simple examples to demonstrate the basics? Specifically, how to numerically compute these two integrals:

$$\int_{a}^{b} f(x) dx \quad \text{and} \quad \int_{-\infty}^{+\infty} f(x) dx$$

These examples could serve as a foundation, and if they resonate, we can discuss adding more complex or real-world applications later.

Looking forward to hearing your thoughts!

@AndyGauge
Copy link
Collaborator

Completely aligned. Taking a fundamentals approach with an emphasis on application would really help curate a crate for a purpose.

@AndyGauge
Copy link
Collaborator

AndyGauge commented Nov 27, 2024

Actually reading the Contributing guide it recommends only foundational crates such as those represented in blessed.rs. I see kalker on awesome-rust. Is that similar to what you have here, or is that a list that you think this crate belongs on? https://github.com/rust-unofficial/awesome-rust?tab=readme-ov-file#computation

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

No branches or pull requests

2 participants