SlideShare a Scribd company logo
1 of 7
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

What's hot

A1 2 linear fxns
A1 2 linear fxnsA1 2 linear fxns
A1 2 linear fxns
vhiggins1
 
Lecture 15 section 5.4 graph of sin & cos
Lecture 15   section 5.4 graph of sin & cosLecture 15   section 5.4 graph of sin & cos
Lecture 15 section 5.4 graph of sin & cos
njit-ronbrown
 
oct15/09dmciprecal30s
oct15/09dmciprecal30soct15/09dmciprecal30s
oct15/09dmciprecal30s
RyanWatt
 
9.3 graphing general rational functions
9.3 graphing general rational functions9.3 graphing general rational functions
9.3 graphing general rational functions
hisema01
 
March 4 and 5, 2009
March 4 and 5, 2009March 4 and 5, 2009
March 4 and 5, 2009
Mr. Smith
 
Exercise #13 notes ~ equations
Exercise #13 notes ~ equationsExercise #13 notes ~ equations
Exercise #13 notes ~ equations
Kelly Scallion
 

What's hot (20)

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

Similar to Numerical

chapter 3 , foley.pptxhuujjjjjjjkjmmmm. Ibibhvucufucuvivihohi
chapter 3 , foley.pptxhuujjjjjjjkjmmmm.  Ibibhvucufucuvivihohichapter 3 , foley.pptxhuujjjjjjjkjmmmm.  Ibibhvucufucuvivihohi
chapter 3 , foley.pptxhuujjjjjjjkjmmmm. Ibibhvucufucuvivihohi
54MahakBansal
 
Raices de ecuaciones pdf
Raices de ecuaciones pdfRaices de ecuaciones pdf
Raices de ecuaciones pdf
DUBAN CASTRO
 
Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsGraphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygons
Thirunavukarasu Mani
 
Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsGraphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygons
Ketan Jani
 
Rasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithmRasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithm
KALAIRANJANI21
 
Rasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithmRasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithm
KALAIRANJANI21
 
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfCD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
RajJain516913
 
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdfMA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
vasusingh34
 

Similar to Numerical (20)

Newton cotes integration method
Newton cotes integration  methodNewton cotes integration  method
Newton cotes integration method
 
Areas and Definite Integrals.ppt
Areas and Definite Integrals.pptAreas and Definite Integrals.ppt
Areas and Definite Integrals.ppt
 
Trapezoidal rule
Trapezoidal ruleTrapezoidal rule
Trapezoidal rule
 
5 4 Notes
5 4 Notes5 4 Notes
5 4 Notes
 
Test
TestTest
Test
 
5. AREAS AND VOLUMES (SUR) 3140601 GTU
5. AREAS AND VOLUMES (SUR) 3140601 GTU5. AREAS AND VOLUMES (SUR) 3140601 GTU
5. AREAS AND VOLUMES (SUR) 3140601 GTU
 
Chapter 4 Integration
Chapter 4  IntegrationChapter 4  Integration
Chapter 4 Integration
 
NUMERICAL METHOD'S
NUMERICAL METHOD'SNUMERICAL METHOD'S
NUMERICAL METHOD'S
 
chapter 3 , foley.pptxhuujjjjjjjkjmmmm. Ibibhvucufucuvivihohi
chapter 3 , foley.pptxhuujjjjjjjkjmmmm.  Ibibhvucufucuvivihohichapter 3 , foley.pptxhuujjjjjjjkjmmmm.  Ibibhvucufucuvivihohi
chapter 3 , foley.pptxhuujjjjjjjkjmmmm. Ibibhvucufucuvivihohi
 
Raices de ecuaciones pdf
Raices de ecuaciones pdfRaices de ecuaciones pdf
Raices de ecuaciones pdf
 
Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsGraphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygons
 
Graphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygonsGraphics6 bresenham circlesandpolygons
Graphics6 bresenham circlesandpolygons
 
Chap6_Sec1.ppt
Chap6_Sec1.pptChap6_Sec1.ppt
Chap6_Sec1.ppt
 
Rasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithmRasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithm
 
Rasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithmRasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithm
 
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfCD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
 
Applications of integration
Applications of integrationApplications of integration
Applications of integration
 
unit-3.ppt
unit-3.pptunit-3.ppt
unit-3.ppt
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdfMA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
 

Recently uploaded

ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 

Recently uploaded (20)

Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
 
Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)Operating System chapter 9 (Virtual Memory)
Operating System chapter 9 (Virtual Memory)
 
Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
 
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdfBURGER ORDERING SYSYTEM PROJECT REPORT..pdf
BURGER ORDERING SYSYTEM PROJECT REPORT..pdf
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
Attraction and Repulsion type Moving Iron Instruments.pptx
Attraction and Repulsion type Moving Iron Instruments.pptxAttraction and Repulsion type Moving Iron Instruments.pptx
Attraction and Repulsion type Moving Iron Instruments.pptx
 
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdfRESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
RESORT MANAGEMENT AND RESERVATION SYSTEM PROJECT REPORT.pdf
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
Supermarket billing system project report..pdf
Supermarket billing system project report..pdfSupermarket billing system project report..pdf
Supermarket billing system project report..pdf
 
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdfONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
ONLINE VEHICLE RENTAL SYSTEM PROJECT REPORT.pdf
 
ROAD CONSTRUCTION PRESENTATION.PPTX.pptx
ROAD CONSTRUCTION PRESENTATION.PPTX.pptxROAD CONSTRUCTION PRESENTATION.PPTX.pptx
ROAD CONSTRUCTION PRESENTATION.PPTX.pptx
 
Multivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptxMultivibrator and its types defination and usges.pptx
Multivibrator and its types defination and usges.pptx
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdf
 
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...Software Engineering - Modelling Concepts + Class Modelling + Building the An...
Software Engineering - Modelling Concepts + Class Modelling + Building the An...
 
Artificial Intelligence Bayesian Reasoning
Artificial Intelligence Bayesian ReasoningArtificial Intelligence Bayesian Reasoning
Artificial Intelligence Bayesian Reasoning
 
Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2
 
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message QueuesLinux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
 
E-Commerce Shopping using MERN Stack where different modules are present
E-Commerce Shopping using MERN Stack where different modules are presentE-Commerce Shopping using MERN Stack where different modules are present
E-Commerce Shopping using MERN Stack where different modules are present
 

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 ))