Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chipbell4/simpsons-rule

A helpful function in node for numerical integration with simpson's rule.
https://github.com/chipbell4/simpsons-rule

Last synced: 9 days ago
JSON representation

A helpful function in node for numerical integration with simpson's rule.

Awesome Lists containing this project

README

        

# Simpson's Rule

A handy function for numerically integrating a function via simpson's rule. Here's an example:
`
var simpsons = require('simpsons-rule');

var F = function(x) {
return 2 * x;
};

var result = simpsons(F, 0, 1); // integrate from 0 to 1. Should be close to 0.5

// Or provide a step count
result = simpsons(F, 0, 1, 1000);
`