Skip to content

ryanlemes/SimpsonSecondRule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simpson Second Rule of integration

Math explanation

Simpson’s 3/8 rule or Second rule is completely based on the cubic interpolation rather than the quadratic interpolation. Simpson’s 3/8 or three-eight rule is given by:

∫ab f(x) dx = 3h/8[(y0+yn)+3(y1+y2+y4+y5+….+yn-1)+2(y3+y6+y9+…..+yn-3)]

This rule is more accurate than the standard method(Simpson first rule or 1/3 rule), as it uses one more functional value. For 3/8 rule, the composite Simpson’s 3/8 rule also exists which is similar to the generalized form.

Reference

How to Compile and Run the project

  • With GCC installed on your machine:
 gcc -o simpsonsecondrule main.c tinyexpr.c 

to run it:

./simpsonsecondrule
  • With docker
docker build -t simpson-second-rule-app .
docker run -it --rm --name simpson-second-rule simpson-second-rule-app

About

Implementation in C of Simpson Second Rule

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published