Giter Site home page Giter Site logo

integrals's Introduction

Integrals

author contributions welcome

header image

A Python project to compute integrals:

  • symbolically with SymPy
  • numerically through Riemann sums

The project aims to be educational, showing how numerical integration works through animations like the one at the beginning. There are more animations in the images folder. Yes, you can do such calculations with SciPy but without the nice animations :-)

Usage

  1. clone the repo, not a package yet :-(
  2. create a virtual environment with Python 3.8+
  3. activate the virtual environment
  4. install dependencies
  5. run the scripts
git clone https://github.com/chicolucio/integrals
cd integrals
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python animation.py
python integral.py
python antiderivatives.py

animation.py shows how more Riemann rectangles make the approximation better. integral.py has examples of how to use the other methods. Both files have more examples that can be uncommented in the code as instructed in them. antiderivatives.py just plots a family of functions that are antiderivatives of 2x.

Testing

Tests can be run in the top-level directory with the command pytest -v tests/.

Contributing

All contributions are welcome.

Issues

Feel free to submit issues regarding:

  • recommendations
  • more animations or examples
  • enhancement requests and new useful features
  • code bugs

There are some open issues waiting for your help, see here.

Pull requests

  • before starting to work on your pull request, please submit an issue first
  • fork the repo
  • clone the project to your own machine
  • commit changes to your own branch
  • push your work back up to your fork
  • submit a pull request so that your changes can be reviewed

License

MIT, see LICENSE

Citing

If you use this project in a scientific publication or in classes, please consider citing as

F. L. S. Bustamante, Integrals, 2022 - Available at: https://github.com/chicolucio/integrals

More

integrals's People

Contributors

chicolucio avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

integrals's Issues

Add trapezoid rule

Add methods to compute and plot using the trapezoidal rule.

Hint: "The trapezoidal rule may be viewed as the result obtained by averaging the left and right Riemann sums, and is sometimes defined this way."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.