6. numerical integration - inflibnet...

18
6. Numerical Integration 6.1 Definition of numerical integration. 6.2 Reasons to use numerical integration. 6.3 Formulas of numerical Integration. 6.4 Applications of numerical integration.

Upload: others

Post on 20-Jul-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

6. Numerical Integration

6.1 Definition of numerical integration. 6.2 Reasons to use numerical integration.

6.3 Formulas of numerical Integration. 6.4 Applications of numerical integration.

Page 2: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

6.1 Numerical Integration

• Definition:-To find out the approximate value of a definite integral is known as Numerical Integration. Let �� � � � ���

� , where f(x) is integrand, a= lower limit of the integration, b= upper limit of the integration.

Page 3: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

Degree of Precision

• A numerical method is said to have degree of precision m if it gives exact value (Rn = 0) of integral for all polynomials of degree � m. Rn denotes the remainder.

Page 4: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

6.2 Reasons to use numerical integration

• Form of the function is not known. • Integrand is not known clearly. • Integrand is known but it is difficult or

impossible to find antiderivative.

Page 5: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

6.3 Quadrature formula

• Here we consider the function f(x), which is known at equidistant values of x. The values y0, y1, y2,…..,yn are the corresponding values of yi of xi ( i = 0,1,2,……,n). Here x0 =a & xn = a + nh =b respectively. We therefore have

• I = � � � ����

Page 6: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

Continued.. � ����� �

��

2 ∆�� � ��

3 � ��

2∆���

2! � ��

4 � �� � �� ∆���

3!

� ��

5 �3��

2 �11��

3 � 3�� ∆���

4!

� ��

6 � 2�� �35��

4 �50��

3 � 12�� ∆���

5!

� ��

7 �15��

6 � 17�� �225��

4 �274��

3 � 60�� ∆���

6! � ⋯�

Page 7: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

Trapezoidal Rule

• I=� � � ���������

• � ��

� �� � �� � 2 �� � �� � ⋯ … ���� � • = (h/2)[( sum of 1st and last term ordinate)+2(

sum of all the remaining ordinates)]. Trapezoidal rule can be applied to any number of subintervals even or odd. In Trapezoidal rule we consider the polynomial of 1st degree and its geometrical significance is that the and curve y =f(x) is replaced by n straight lines joining the points (x0,y0), (x1,y1), (x2,y2), ………..,(xn,yn) and area of each strip is found separately and added.

Page 8: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

Continued..

• The error in Trapezoidal formula is given by

� � ����

����� � ,

where � � �� � � � �� � �. ��� � is the largest value of the 2nd derivative. The degree of precision of Trapezoidal formula is 1 means it will give exact value of the integration when the integrand will be linear and in that case ��� � ≡ 0.

Page 9: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

Simpson’s 1/3rd Rule

• I=� � � ���������

� ��

� �� � �� � 4 �� � �� � ⋯ … ���� •

�2 �� � �� � ⋯ … ���� �

• = (h/3)[( sum of 1st and last term ordinate)+4( sum of the odd ordinates) +2(sum of the even terms)]

Simpson’s 1/3rd rule can be applied when the given interval is subdivided into even number of subintervals. In this method we consider that the integrand is approximated by the polynomial of 2nd degree as its differences of higher than two will vanish. Simpson’s 1/3rd rule is extension of Trapezoidal rule.

Page 10: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

Continued..

• The error in Simpson’s 1/3 formula is given by

� � ����

������ � ,

where � � �� � � � �� � �. ��� � is the largest value of the 4th derivative. The degree of precision of Simpson’s 1/3 formula is 3 means it will give exact value of the integration when the integrand will be a polynomial of order � 3 and in that case ��� � ≡ 0

Page 11: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

Simpson’s 3/8th Rule

• I=� � � ���������

� ���

� �� � �� � 3 �� � �� � �� � �� … … ���� �2 �� � �� � ⋯ … ���� �

• Simpson’s 3/8th rule can be applied when the range is

divided into a number of subintervals, which must be a multiple of 3. In Simpson’s 3/8th rule the function f(x) over any three consecutive subintervals is replaced by a polynomial of degree three because its differences of order higher than three will vanish.

Page 12: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

Continued..

• The error in Simpson’s 3/8 th formula is given

by � � ����

����� � , where � � �� � � �

�� � �. ��� � is the largest value of the 4th derivative. The degree of precision of Simpson’s 3/8 formula is 3 means it will give exact value of the integration when the integrand will be a polynomial of order � 3 and in that case ��� � ≡ 0.

Page 13: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

Example

• A solid of revolution is formed by rotating about the x-axis, the lines x = 0 and x = 1.5 , and a curve through the points with the following coordinates

Estimate the volume of the solid formed, giving the answer to four decimal places by Trapezoidal rule, Simpson’s ⅓ and Simpson’s ⅜ rule of integra�on.

x 0.00 0.25 0.50 0.75 1.00 1.25 1.50

y 1.0000 0.9896 0.9589 0.9089 0.8415 0.7735 0.7068

Page 14: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

Solution • If V is the of the solid formed, then we know that V = � � �����.�

� . Hence we need the values of �� and these are tabulated below, correct to four decimal places.

With h = 0.25, Trapezoidal rule gives V = �.��

��1.0 � 0.4996 �

2 0.9793 � 0.9195 � 0.8261 � 0.7081 � 0.5984 � = 3.7567

X 0.00 0.25 0.50 0.75 1.00 1.25 1.50

�� 1.0000 0.9793 0.9195 0.8261 0.7081 0.5984 0.4996

Page 15: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

Continued • Simpson’s ⅓ rule gives

• V = � �.��

�� 1.0 � 0.4996 � 4 0.9793 � 0.8261 � 0.5984

+ 2�0.9195 � 0.7081�� = 3.7636 • Simpson’s ⅜ rule gives

• V = � �.��

��1.0 � 0.4996 �

• 3 0.9793 � 0.9195 � 0.7081 � 0.5984 � 2�0.8261�� = 3.7619

Page 16: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

Error

• Then the absolute relative approximate error obtained between the results from Trapezoidal rule and Simpson’s ⅓ rule is 0.18334 and the absolute relative approximate error obtained between the results from Simpson’s ⅓ rule and Simpson’s ⅜ rule is 0.04519

Page 17: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

Comparison table

• Table:-Comparison of results of different methods of numerical Integration. Method of Integration Trapezoidal rule Simpson’s ⅓ rule Simpson’s ⅜ rule

Volume 3.7567 3.7636 3.7619

Absolute relative Approximate error

--------------- 0.18334 0.04519

Page 18: 6. Numerical Integration - INFLIBNET Centrecontent.inflibnet.ac.in/data-server/eacharya-documents/...6.1 Numerical Integration • Definition:-To find out the approximate value of

Applications of numerical integration.

• Numerical integration is specially used in statistics in maximum likelihood & normal distribution. It is also used in cloud computing and to find out the definite integral when we are not knowing the form of the function etc.