SlideShare a Scribd company logo
Trapizoidal Rule
The basic working principle of the trapezoidal method c program is that trapezoidal
method splits the area under the curve into a number of trapeziums. Then, area of
each trapezium is calculated, and all the individual areas are summed up to give the
total area under the curve which is the value of definite integral.
In the figure, area under the curve between the points x0
and xn is to be determined. In order to determine the area,
we divide the total interval (xn– x0) into ‘n’ small interval
each of length ‘h’:
h=(xn– x0)/n
After that, the C source code for trapezoidal method uses
the following formula to calculate the value of definite
integral:
Steps
• 1. take n that is number of intervals
• 2. calculate h=(b-a)/n , a is lower limit and b is upper limit
• 3. find x0=a, x1=a+h, x2=a+2.h , …..
• 4. using y=f(x), Find y0,y1,y2….
• 5.
Example:
• ⌠1
4 (x2 +2X)dx with n=6
• ANSWER:
• n=6, h=(b-a)/n=3/6=0.5
•
• ⌠1
4 (x2 +2X)dx=h/2[(3+24)+ 2*(5.25+8+11.25+15+19.25)]=36.125
•
X 1 1.5 2 2.5 3 3.5 4
Y 3 5.25 8 11.25 15 19.25 24
Simpson’s 1/3rd Rule:
• Simpson’s Rule is a Numerical technique to find the definite
integral of a function within a given interval.
• The function is divided into many sub-intervals and each
interval is approximated by a quadratic curve. And the area is
then calculated to find the integral. The more is the number of
sub-intervals used, the better is the approximation.
•
NOTE: The no. of sub-intervals should be EVEN.
Integral = *((y0 + yn ) +4(y1 + y3 + ……….+ yn-1 )
+ 2(y2 + y4 +……….+ yn-2 ))
Numerical

More Related Content

PDF
Derivatives Lesson Oct 13
PPT
Lecture 16 graphing - section 4.3
DOC
Sketching a sinusoidal graph
PPT
Numerical integration
PPT
Period 4 Quadratic Funtions
PPT
4.5 tan and cot.ppt worked
PDF
Lsn 11-5: Law of Sines
PPTX
A1 3 linear fxns
Derivatives Lesson Oct 13
Lecture 16 graphing - section 4.3
Sketching a sinusoidal graph
Numerical integration
Period 4 Quadratic Funtions
4.5 tan and cot.ppt worked
Lsn 11-5: Law of Sines
A1 3 linear fxns

What's hot (20)

PPT
4.5 sec and csc worked 3rd
PPTX
A1 2 linear fxns
PPT
Transformations: Slots
PPT
EM integrations
PDF
Pre-Cal 40S February 17, 2009
PPT
Graphing day 1 worked
PPT
Lecture 15 section 5.4 graph of sin & cos
PDF
Day 1a examples
PDF
oct15/09dmciprecal30s
PPTX
Math12 lesson5
PPTX
9.3 graphing general rational functions
PDF
March 4 and 5, 2009
PPT
Lesson 11 plane areas area by integration
PDF
19 - Scala. Eliminators into dependent types (induction)
PDF
Eliminators into dependent types
PDF
De Bruijn Sequences for Fun and Profit
PPTX
Cyrus beck line clipping algorithm
PDF
Linear programming in computational geometry
PDF
Exercise #13 notes ~ equations
POTX
Ch 7 c volumes
4.5 sec and csc worked 3rd
A1 2 linear fxns
Transformations: Slots
EM integrations
Pre-Cal 40S February 17, 2009
Graphing day 1 worked
Lecture 15 section 5.4 graph of sin & cos
Day 1a examples
oct15/09dmciprecal30s
Math12 lesson5
9.3 graphing general rational functions
March 4 and 5, 2009
Lesson 11 plane areas area by integration
19 - Scala. Eliminators into dependent types (induction)
Eliminators into dependent types
De Bruijn Sequences for Fun and Profit
Cyrus beck line clipping algorithm
Linear programming in computational geometry
Exercise #13 notes ~ equations
Ch 7 c volumes
Ad

Similar to Numerical (20)

PPTX
Newton cotes integration method
PPTX
Breshnam's circle drawing algorithm.pptx
PPTX
Breshnam's circle drawing algorithm.pptx
PPT
Areas and Definite Integrals.ppt
PPTX
Trapezoidal rule
PPTX
5 4 Notes
PDF
Test
PPTX
5. AREAS AND VOLUMES (SUR) 3140601 GTU
PPTX
CE324-Module-9-10-Week-5-1st-Session.pptx
PDF
Lectue 5-Area between two curves and arc length.pdf.pdf
PPTX
NUMERICAL METHOD'S
PPTX
chapter 3 , foley.pptxhuujjjjjjjkjmmmm. Ibibhvucufucuvivihohi
PDF
Raices de ecuaciones pdf
PPT
Graphics6 bresenham circlesandpolygons
PPT
Graphics6 bresenham circlesandpolygons
PPT
Chap6_Sec1.ppt
DOCX
Rasterisation of a circle by the bresenham algorithm
DOCX
Rasterisation of a circle by the bresenham algorithm
PDF
Tojo Sir Hash Tables.pdfsfdasdasv fdsfdfsdv
Newton cotes integration method
Breshnam's circle drawing algorithm.pptx
Breshnam's circle drawing algorithm.pptx
Areas and Definite Integrals.ppt
Trapezoidal rule
5 4 Notes
Test
5. AREAS AND VOLUMES (SUR) 3140601 GTU
CE324-Module-9-10-Week-5-1st-Session.pptx
Lectue 5-Area between two curves and arc length.pdf.pdf
NUMERICAL METHOD'S
chapter 3 , foley.pptxhuujjjjjjjkjmmmm. Ibibhvucufucuvivihohi
Raices de ecuaciones pdf
Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygons
Chap6_Sec1.ppt
Rasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithm
Tojo Sir Hash Tables.pdfsfdasdasv fdsfdfsdv
Ad

Recently uploaded (20)

PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
PPT on Performance Review to get promotions
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
composite construction of structures.pdf
PDF
Well-logging-methods_new................
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
UNIT 4 Total Quality Management .pptx
DOCX
573137875-Attendance-Management-System-original
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Digital Logic Computer Design lecture notes
PPTX
Lecture Notes Electrical Wiring System Components
Structs to JSON How Go Powers REST APIs.pdf
PPT on Performance Review to get promotions
Embodied AI: Ushering in the Next Era of Intelligent Systems
Internet of Things (IOT) - A guide to understanding
composite construction of structures.pdf
Well-logging-methods_new................
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Arduino robotics embedded978-1-4302-3184-4.pdf
bas. eng. economics group 4 presentation 1.pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
UNIT 4 Total Quality Management .pptx
573137875-Attendance-Management-System-original
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Digital Logic Computer Design lecture notes
Lecture Notes Electrical Wiring System Components

Numerical

  • 2. The basic working principle of the trapezoidal method c program is that trapezoidal method splits the area under the curve into a number of trapeziums. Then, area of each trapezium is calculated, and all the individual areas are summed up to give the total area under the curve which is the value of definite integral. In the figure, area under the curve between the points x0 and xn is to be determined. In order to determine the area, we divide the total interval (xn– x0) into ‘n’ small interval each of length ‘h’: h=(xn– x0)/n After that, the C source code for trapezoidal method uses the following formula to calculate the value of definite integral:
  • 3. Steps • 1. take n that is number of intervals • 2. calculate h=(b-a)/n , a is lower limit and b is upper limit • 3. find x0=a, x1=a+h, x2=a+2.h , ….. • 4. using y=f(x), Find y0,y1,y2…. • 5.
  • 4. Example: • ⌠1 4 (x2 +2X)dx with n=6 • ANSWER: • n=6, h=(b-a)/n=3/6=0.5 • • ⌠1 4 (x2 +2X)dx=h/2[(3+24)+ 2*(5.25+8+11.25+15+19.25)]=36.125 • X 1 1.5 2 2.5 3 3.5 4 Y 3 5.25 8 11.25 15 19.25 24
  • 5. Simpson’s 1/3rd Rule: • Simpson’s Rule is a Numerical technique to find the definite integral of a function within a given interval. • The function is divided into many sub-intervals and each interval is approximated by a quadratic curve. And the area is then calculated to find the integral. The more is the number of sub-intervals used, the better is the approximation. • NOTE: The no. of sub-intervals should be EVEN.
  • 6. Integral = *((y0 + yn ) +4(y1 + y3 + ……….+ yn-1 ) + 2(y2 + y4 +……….+ yn-2 ))