Skip to content

Newton-Cotes formulae for finding the area under a curve

Notifications You must be signed in to change notification settings

paulsoper/area-under-a-curve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Numerical methods - at the moment all in c - for measuring the area under a curve.

Each method integrates the curve f(x) = 5x^3 - 12x^2 + 7x - 3, and the integration is carried out from x = 2 to x = 6.

The analytic answer is area = 868.00

The eight methods represented here are the eight Newton-Cotes formulae - four open and four closed.

The trapezoid rule is the first degree closed Newton-Cotes formula.

Simpson's rule is the second degree closed Newton-Cotes formula.

Simpson's 3/8 rule is the third degree closed Newton-Cotes formula.

Boole's rule is the fourth degree closed Newton-Cotes formula.

The rectangle rule is the second degree open Newton-Cotes formula.

The trapezoid method is the third degree open Newton-Cotes formula.

Milne's rule is the fourth degree open Newton-Cotes formula.

The fifth degree open Newton-Cotes formula has no name, and is in the program noname.c

About

Newton-Cotes formulae for finding the area under a curve

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages