https://github.com/mtantaoui/Integrate Skip to content Navigation Menu Toggle navigation Sign in * Product + GitHub Copilot Write better code with AI + Security Find and fix vulnerabilities + Actions Automate any workflow + Codespaces Instant dev environments + Issues Plan and track work + Code Review Manage code changes + Discussions Collaborate outside of code + Code Search Find more, search less Explore + All features + Documentation + GitHub Skills + Blog * Solutions By company size + Enterprises + Small and medium teams + Startups By use case + DevSecOps + DevOps + CI/CD + View all use cases By industry + Healthcare + Financial services + Manufacturing + Government + View all industries View all solutions * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} mtantaoui / Integrate Public * Notifications You must be signed in to change notification settings * Fork 0 * Star 54 a small, lightweight crate for numerical integration written in Rust. License MIT license 54 stars 0 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 1 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights mtantaoui/Integrate main BranchesTags [ ] Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 137 Commits .cargo .cargo .github/workflows .github/ workflows docs docs examples examples src src tests tests .gitignore .gitignore Cargo.toml Cargo.toml LICENSE LICENSE README.md README.md View all files Repository files navigation * README * MIT license Integrate Integrate crate Integrate documentation minimum rustc 1.63 build status Integrate is a small, lightweight Rust library for performing numerical integration of real-valued functions. It is designed to integrate functions, providing a simple and efficient way to approximate definite integrals using various numerical methods. Numerical integration is concerned with developing algorithms to approximate the integral of a function $f(x)$. The most commonly used algorithms are Newton-Cotes formulas, Romberg's method, Gaussian quadrature, and to lesser extents Hermite's formulas and certain adaptive techniques. Features Integrate supports a variety of numerical integration techniques: * Newton-Cotes methods: + Rectangle Rule. + Trapezoidal Rule. + Simpson's Rule. + Newton's 3/8 Rule. * Gauss quadrature methods: + Gauss-Legendre. + Gauss-Laguerre. + Gauss-Hermite. + Gauss-Chebyshev First Kind. + Gauss-Chebyshev Second Kind. * Adaptive Methods: + Adaptive Simpson's method * Romberg's method. Caveats All of the numerical integration techniques listed above assume that the integrand is continuous on the interval of integration. The error estimates generally require that the integrands are differentiable of whatever order is required so that the formula for the error estimate makes sense. Below is a check list which one should verify before using any of the numerical algorithms. Integrand check list * Are there any singularities of the integrand in the interval of integration? + If there are, then can they be removed? + A function which has jump discontinuities can be integrated by splitting the interval of integration into subintervals on which the function is continuous, and then numerically integrate over each subinterval and add the results. + Using integration by parts certain types of singular integrals can be expressed as the sum of a function and a non-singular integral. + In other cases, an approximation of the integral in a small neighborhood of the singularity can be obtained by hand and the interval of integration can be split into three intervals in which numerical integration can be used on two of them. * Does the function oscillate over the region of integration? If it does, then make sure that the step size is chosen to be smaller than the wave length of the function. The interval of integration can also be split into subintervals in which each subinterval is half a wave length and the algorithm is applied to each subinterval. Installation To use the Integrate crate in your Rust project, add the following line to your Cargo.toml: [dependencies] integrate = "0.1.0" Contribution Feel free to submit issues or pull requests for bug fixes, new features, or other improvements. Contributions are welcome! License This project is licensed under the MIT License - see the LICENSE file for details. Opening a pull request is assumed to signal agreement with these licensing terms. About a small, lightweight crate for numerical integration written in Rust. Resources Readme License MIT license Activity Stars 54 stars Watchers 1 watching Forks 0 forks Report repository Releases No releases published Packages 0 No packages published Languages * Rust 100.0% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.