Legendre Two Point Formula)

123
Numerical Integration (Gauss- Legendre Two Point Formula) Compiled by Dr. Shyam Arjun Sonawane Associate Professor, Mechanical Engineering Government College of Engineering & Research, Avasari (Kh)

Transcript of Legendre Two Point Formula)

Page 1: Legendre Two Point Formula)

Numerical Integration (Gauss-Legendre Two Point Formula)

Compiled by

Dr. Shyam Arjun Sonawane

Associate Professor, Mechanical Engineering

Government College of Engineering & Research, Avasari (Kh)

Page 2: Legendre Two Point Formula)

What is Integration ?

• The process of measuring the area under a function plotted on agraph.

• Where:

• f(x) is the integrand

• a= lower limit of integration

• b= upper limit of integration

f(x)

a b

b

a

dx)x(f

y

x

=b

a

dx)x(fI

Page 3: Legendre Two Point Formula)

3

Limitations of Newton-Cotes Formula

• When we calculate integration by Newton-Cotes method, the area is dividedin number of strips with step size h.

• The formula includes y values (function values) at the corresponding xvalues.

• But for complicated equations it becomes difficult to find function values.• As more processing time is required, computer program also becomes

inefficient.• If we reduce the number of strips, number of function values will be less.

But, this affects the accuracy of the solution.• This limitation of Newton-Cotes equation is overcome by Gauss-Legendre

quadrature method.

Page 4: Legendre Two Point Formula)

Gauss-Legendre Quadrature Method

This method converts the function variable f(x) to a function variablef(u) such that the original limits x0 and xn gets changed to (-1) and(+1) respectively whereas the area under the curve f(x) and f(u)remains same. Refer figure (a) and (b)

Page 5: Legendre Two Point Formula)

Gauss-Legendre Quadrature Method …..Contd

Page 6: Legendre Two Point Formula)

Gauss-Legendre Quadrature Method …..Contd

Page 7: Legendre Two Point Formula)

Gauss-Legendre Two Point Formula

Page 8: Legendre Two Point Formula)

Gauss-Legendre Two Point Formula …..Contd

Page 9: Legendre Two Point Formula)

Gauss-Legendre Two Point Formula …..Contd

Page 10: Legendre Two Point Formula)

Gauss-Legendre Two Point Formula …..Contd

Page 11: Legendre Two Point Formula)

Gauss-Legendre Two Point Formula …..Contd

Page 12: Legendre Two Point Formula)

Gauss-Legendre Two Point Formula …..Contd

Page 13: Legendre Two Point Formula)

Problems on Gauss-Legendre two point formula

Page 14: Legendre Two Point Formula)

Problems on Gauss-Legendre two point formula …..Contd

Page 15: Legendre Two Point Formula)

Reference Books

1. Steven C. Chapra, Raymond P. Canale, Numerical Methods forEngineers, 4/e, Tata McGraw Hill Editions

2. Dr. B. S. Garewal, Numerical Methods in Engineering and Science,Khanna Publishers,.

3. Steven C. Chapra, Applied Numerical Methods with MATLAB forEngineers and Scientist, Tata Mc-Graw Hill Publishing Co-Ltd

4. Rao V. Dukkipati, Applied Numerical Methods using Matlab, NewAge International Publishers

Page 16: Legendre Two Point Formula)

Reference Books …Contd

5. Gerald and Wheatley, Applied Numerical Analysis, PearsonEducation Asia

6. E. Balagurusamy, Numerical Methods, Tata McGraw Hill

7. P. Thangaraj, Computer Oriented Numerical Methods, PHI

8. S. S. Sastry, Introductory Methods of Numerical Analysis, PHI.

Page 17: Legendre Two Point Formula)
Page 18: Legendre Two Point Formula)

Numerical Integration (Gauss-Legendre Three Point Formula)

Compiled by

Dr. Shyam Arjun Sonawane

Associate Professor, Mechanical Engineering

Government College of Engineering & Research, Avasari (Kh)

Page 19: Legendre Two Point Formula)

What is Integration ?

• The process of measuring the area under a function plotted on agraph.

• Where:

• f(x) is the integrand

• a= lower limit of integration

• b= upper limit of integration

f(x)

a b

b

a

dx)x(f

y

x

=b

a

dx)x(fI

Page 20: Legendre Two Point Formula)

3

Limitations of Newton-Cotes Formula

• When we calculate integration by Newton-Cotes method, the area is dividedin number of strips with step size h.

• The formula includes y values (function values) at the corresponding xvalues.

• But for complicated equations it becomes difficult to find function values.• As more processing time is required, computer program also becomes

inefficient.• If we reduce the number of strips, number of function values will be less.

But, this affects the accuracy of the solution.• This limitation of Newton-Cotes equation is overcome by Gauss-Legendre

quadrature method.

Page 21: Legendre Two Point Formula)

Gauss-Legendre Quadrature Method

This method converts the function variable f(x) to a function variablef(u) such that the original limits x0 and xn gets changed to (-1) and(+1) respectively whereas the area under the curve f(x) and f(u)remains same. Refer figure (a) and (b)

Page 22: Legendre Two Point Formula)

Gauss-Legendre Quadrature Method …..Contd

Page 23: Legendre Two Point Formula)

Gauss-Legendre Quadrature Method …..Contd

Page 24: Legendre Two Point Formula)

Gauss-Legendre Three Point Formula

Page 25: Legendre Two Point Formula)

Gauss-Legendre Three Point Formula ..Contd

Page 26: Legendre Two Point Formula)

Gauss-Legendre Three Point Formula ..Contd

Page 27: Legendre Two Point Formula)

Gauss-Legendre Three Point Formula ..Contd

Page 28: Legendre Two Point Formula)

Gauss-Legendre Three Point Formula ..Contd

Page 29: Legendre Two Point Formula)

Gauss-Legendre Three Point Formula ..Contd

Page 30: Legendre Two Point Formula)

Gauss-Legendre Three Point Formula ..Contd

Page 31: Legendre Two Point Formula)

Problems on Gauss-Legendre Three Point formula

Page 32: Legendre Two Point Formula)

Problems on Gauss-Legendre Three Point formula …..Contd

Page 33: Legendre Two Point Formula)

Reference Books

1. Steven C. Chapra, Raymond P. Canale, Numerical Methods forEngineers, 4/e, Tata McGraw Hill Editions

2. Dr. B. S. Garewal, Numerical Methods in Engineering and Science,Khanna Publishers,.

3. Steven C. Chapra, Applied Numerical Methods with MATLAB forEngineers and Scientist, Tata Mc-Graw Hill Publishing Co-Ltd

4. Rao V. Dukkipati, Applied Numerical Methods using Matlab, NewAge International Publishers

Page 34: Legendre Two Point Formula)

Reference Books …Contd

5. Gerald and Wheatley, Applied Numerical Analysis, PearsonEducation Asia

6. E. Balagurusamy, Numerical Methods, Tata McGraw Hill

7. P. Thangaraj, Computer Oriented Numerical Methods, PHI

8. S. S. Sastry, Introductory Methods of Numerical Analysis, PHI.

Page 35: Legendre Two Point Formula)
Page 36: Legendre Two Point Formula)

Numerical Double Integration(Simpson’s 1/3rd Rule)

Compiled by

Dr. Shyam Arjun Sonawane

Associate Professor, Mechanical Engineering

Government College of Engineering & Research, Avasari (Kh)

Page 37: Legendre Two Point Formula)

Double Integration

Page 38: Legendre Two Point Formula)

Simpson’s 1/3rd Rule

Page 39: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 40: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 41: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 42: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 43: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 44: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 45: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 46: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 47: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Step 3: Make a table for all values of f(x,y)

.

Page 48: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 49: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 50: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 51: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 52: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 53: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 54: Legendre Two Point Formula)

Problems on Simpson’s 1/3rd Rule

Page 55: Legendre Two Point Formula)

Reference Books

1. Steven C. Chapra, Raymond P. Canale, Numerical Methods forEngineers, 4/e, Tata McGraw Hill Editions

2. Dr. B. S. Garewal, Numerical Methods in Engineering and Science,Khanna Publishers,.

3. Steven C. Chapra, Applied Numerical Methods with MATLAB forEngineers and Scientist, Tata Mc-Graw Hill Publishing Co-Ltd

4. Rao V. Dukkipati, Applied Numerical Methods using Matlab, NewAge International Publishers

Page 56: Legendre Two Point Formula)

Reference Books …Contd

5. Gerald and Wheatley, Applied Numerical Analysis, PearsonEducation Asia

6. E. Balagurusamy, Numerical Methods, Tata McGraw Hill

7. P. Thangaraj, Computer Oriented Numerical Methods, PHI

8. S. S. Sastry, Introductory Methods of Numerical Analysis, PHI.

Page 57: Legendre Two Point Formula)
Page 58: Legendre Two Point Formula)

Numerical Integration (Simpson’s 1/3rd Rule)

Compiled by

Dr. Shyam Arjun Sonawane

Associate Professor, Mechanical Engineering

Government College of Engineering & Research, Avasari (Kh)

Page 59: Legendre Two Point Formula)

What is Integration ?

• The process of measuring the area under a function plotted on agraph.

• Where:

• f(x) is the integrand

• a= lower limit of integration

• b= upper limit of integration

f(x)

a b

b

a

dx)x(f

y

x

=b

a

dx)x(fI

Page 60: Legendre Two Point Formula)

3

Newton-Cotes Quadrature Formula

Page 61: Legendre Two Point Formula)

Simpson’s 1/3rd Rule

Page 62: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 63: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 64: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 65: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 66: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 67: Legendre Two Point Formula)

Simpson’s 1/3rd Rule …Contd

Page 68: Legendre Two Point Formula)

Problems on Simpson’s 1/3rd Rule

Time(min) 0 2 4 6 8 10 12

Velocity (km/hr) 0 22 30 27 18 7 0

Time(min) 2 4 6 8 10 12 14 16 18 20

V (km/hr) 10 18 25 29 32 20 11 5 2 0

Page 69: Legendre Two Point Formula)

Problems on Simpson’s 1/3rd Rule …Contd

x (m) 0 0.25 0.50 0.75 1.00

r (m) 1.00 0.9896 0.9589 0.9089 0.8415

t (hr) 0 1 2 3 4 6 8 11 14

q (N/cm2hr 0.05 1.72 5.23 6.38 7.86 8.05 8.03 5.82 0.24

Page 70: Legendre Two Point Formula)

Problems on Simpson’s 1/3rd Rule …Contd

x 1 1.1 1.2 1.4 1.6 1.9 2.2

3 4.2 5.8 10 14.5 25.1 40

Page 71: Legendre Two Point Formula)

Problems on Simpson’s 1/3rd Rule …Contd

Page 72: Legendre Two Point Formula)

Reference Books

1. Steven C. Chapra, Raymond P. Canale, Numerical Methods forEngineers, 4/e, Tata McGraw Hill Editions

2. Dr. B. S. Garewal, Numerical Methods in Engineering and Science,Khanna Publishers,.

3. Steven C. Chapra, Applied Numerical Methods with MATLAB forEngineers and Scientist, Tata Mc-Graw Hill Publishing Co-Ltd

4. Rao V. Dukkipati, Applied Numerical Methods using Matlab, NewAge International Publishers

Page 73: Legendre Two Point Formula)

Reference Books …Contd

5. Gerald and Wheatley, Applied Numerical Analysis, PearsonEducation Asia

6. E. Balagurusamy, Numerical Methods, Tata McGraw Hill

7. P. Thangaraj, Computer Oriented Numerical Methods, PHI

8. S. S. Sastry, Introductory Methods of Numerical Analysis, PHI.

Page 74: Legendre Two Point Formula)
Page 75: Legendre Two Point Formula)

Numerical Integration (Simpson’s 3/8th Rule)

Compiled by

Dr. Shyam Arjun Sonawane

Associate Professor, Mechanical Engineering

Government College of Engineering & Research, Avasari (Kh)

Page 76: Legendre Two Point Formula)

What is Integration ?

• The process of measuring the area under a function plotted on agraph.

• Where:

• f(x) is the integrand

• a= lower limit of integration

• b= upper limit of integration

f(x)

a b

b

a

dx)x(f

y

x

=b

a

dx)x(fI

Page 77: Legendre Two Point Formula)

3

Newton-Cotes Quadrature Formula

Page 78: Legendre Two Point Formula)

Simpson’s 3/8th Rule

Page 79: Legendre Two Point Formula)

Simpson’s 3/8th Rule …Contd

Page 80: Legendre Two Point Formula)

Simpson’s 3/8th Rule …Contd

Page 81: Legendre Two Point Formula)

Simpson’s 3/8th Rule …Contd

Page 82: Legendre Two Point Formula)

Simpson’s 3/8th Rule …Contd

Page 83: Legendre Two Point Formula)

Simpson’s 3/8th Rule …Contd

Page 84: Legendre Two Point Formula)

Simpson’s 3/8th Rule …Contd

Page 85: Legendre Two Point Formula)

Problems on Simpson’s 3/8th Rule

Page 86: Legendre Two Point Formula)

Problems on Simpson’s 3/8th Rule …Contd

x 0 2.5 5.0 7.5 10.0 12.5 15.0

D 5 5.5 6.0 6.75 6.25 5.5 4.0

t 1 2 3 4 5 6 7

T 81 75 80 83 78 70 60

Page 87: Legendre Two Point Formula)

Problems on Simpson’s 3/8th Rule …Contd

8. Using the following data calculate the work done by stretching thespring that has a spring constant of K=300 N/m from x=0 to x=0.3m. Use Simpson’s 1/3rd and 3/8th rule.

F(103 N) 0 0.01 0.028 0.046 0.063 0.082 0.11

x, m 0 0.05 0.10 0.15 0.20 0.25 0.30

Page 88: Legendre Two Point Formula)

Reference Books

1. Steven C. Chapra, Raymond P. Canale, Numerical Methods forEngineers, 4/e, Tata McGraw Hill Editions

2. Dr. B. S. Garewal, Numerical Methods in Engineering and Science,Khanna Publishers,.

3. Steven C. Chapra, Applied Numerical Methods with MATLAB forEngineers and Scientist, Tata Mc-Graw Hill Publishing Co-Ltd

4. Rao V. Dukkipati, Applied Numerical Methods using Matlab, NewAge International Publishers

Page 89: Legendre Two Point Formula)

Reference Books …Contd

5. Gerald and Wheatley, Applied Numerical Analysis, PearsonEducation Asia

6. E. Balagurusamy, Numerical Methods, Tata McGraw Hill

7. P. Thangaraj, Computer Oriented Numerical Methods, PHI

8. S. S. Sastry, Introductory Methods of Numerical Analysis, PHI.

Page 90: Legendre Two Point Formula)
Page 91: Legendre Two Point Formula)

Numerical Double Integration(Trapezoidal Rule)

Compiled by

Dr. Shyam Arjun Sonawane

Associate Professor, Mechanical Engineering

Government College of Engineering & Research, Avasari (Kh)

Page 92: Legendre Two Point Formula)

Double Integration

Page 93: Legendre Two Point Formula)

Trapezoidal Rule

Page 94: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Page 95: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Page 96: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Alternate Method:- Prepare a table for n number of strips asfollows:

Page 97: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Page 98: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Page 99: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Page 100: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Page 101: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Page 102: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Page 103: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Page 104: Legendre Two Point Formula)

Problems on Trapezoidal Rule

Page 105: Legendre Two Point Formula)

Reference Books

1. Steven C. Chapra, Raymond P. Canale, Numerical Methods forEngineers, 4/e, Tata McGraw Hill Editions

2. Dr. B. S. Garewal, Numerical Methods in Engineering and Science,Khanna Publishers,.

3. Steven C. Chapra, Applied Numerical Methods with MATLAB forEngineers and Scientist, Tata Mc-Graw Hill Publishing Co-Ltd

4. Rao V. Dukkipati, Applied Numerical Methods using Matlab, NewAge International Publishers

Page 106: Legendre Two Point Formula)

Reference Books …Contd

5. Gerald and Wheatley, Applied Numerical Analysis, PearsonEducation Asia

6. E. Balagurusamy, Numerical Methods, Tata McGraw Hill

7. P. Thangaraj, Computer Oriented Numerical Methods, PHI

8. S. S. Sastry, Introductory Methods of Numerical Analysis, PHI.

Page 107: Legendre Two Point Formula)
Page 108: Legendre Two Point Formula)

Numerical Integration (Trapezoidal Rule)

Compiled by

Dr. Shyam Arjun Sonawane

Associate Professor, Mechanical Engineering

Government College of Engineering & Research, Avasari (Kh)

Page 109: Legendre Two Point Formula)

What is Integration ?

• The process of measuring the area under a function plotted on agraph.

• Where:

• f(x) is the integrand

• a= lower limit of integration

• b= upper limit of integration

f(x)

a b

b

a

dx)x(f

y

x

=b

a

dx)x(fI

Page 110: Legendre Two Point Formula)

3

Newton-Cotes Quadrature Formula

Page 111: Legendre Two Point Formula)

Trapezoidal Rule

Page 112: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Page 113: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Page 114: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Page 115: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Page 116: Legendre Two Point Formula)

Trapezoidal Rule …Contd

Page 117: Legendre Two Point Formula)

Problems on Trapezoidal Rule

Page 118: Legendre Two Point Formula)

Problems on Trapezoidal Rule …..Contd

x 1 1.1 1.2 1.4 1.6 1.9 2.2

F(x) 3.123 4.247 5.635 9.299 14.303 24.759 39.319

x 1 1.2 1.4 1.6 1.8 2

y 2 2.2 2.7 2.8 3 2.6

Page 119: Legendre Two Point Formula)

Problems on Trapezoidal Rule …..Contd

x, m 0 2 3 4 6 8 10

P g/cm2 4.00 3.95 3.89 3.80 3.60 3.41 3.30

100 103 106 110 120 133 150

Page 120: Legendre Two Point Formula)

Problems on Trapezoidal Rule …..Contd

Page 121: Legendre Two Point Formula)

Reference Books

1. Steven C. Chapra, Raymond P. Canale, Numerical Methods forEngineers, 4/e, Tata McGraw Hill Editions

2. Dr. B. S. Garewal, Numerical Methods in Engineering and Science,Khanna Publishers,.

3. Steven C. Chapra, Applied Numerical Methods with MATLAB forEngineers and Scientist, Tata Mc-Graw Hill Publishing Co-Ltd

4. Rao V. Dukkipati, Applied Numerical Methods using Matlab, NewAge International Publishers

Page 122: Legendre Two Point Formula)

Reference Books …Contd

5. Gerald and Wheatley, Applied Numerical Analysis, PearsonEducation Asia

6. E. Balagurusamy, Numerical Methods, Tata McGraw Hill

7. P. Thangaraj, Computer Oriented Numerical Methods, PHI

8. S. S. Sastry, Introductory Methods of Numerical Analysis, PHI.

Page 123: Legendre Two Point Formula)