-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
760 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Simpson's rule - a method for numerical integration. | ||
==================================================== | ||
|
||
|
||
Just playing with requirjs/bootstrap for learning purposes. Feel free to use it on your as or as | ||
a library in your project. | ||
|
||
|
||
js/simpson.js | ||
------------- | ||
|
||
*** Requires math.js module (http://www.mathjs.org) *** | ||
|
||
A javascript module, that implements Simpson's rule. There are two public functions: | ||
|
||
* integrate: function(expression, b, a, N) | ||
* inaccuracy: function(expression, b, a, N) | ||
|
||
They have same parameters list: | ||
|
||
* expression --- a function, dependant on x (and only on x) variable. | ||
* b --- Upper domain bound. | ||
* a --- Lower domain bound. | ||
* N --- Number of steps to calculate. The bigger the number, the slower calculations is, but the | ||
results will be more precise. | ||
|
||
integrate function calculates value of a definite integral expression(x) dx in a reange [a;b]. | ||
|
||
inaccuracy function estimates integral's value inaccuracy using Runge rule. Please note, that this function | ||
recalculates value of the integral two time with different number of steps. | ||
|
||
|
||
(C) Denis V Chapligin, 2013. Released under terms of GPLv3. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters