Numerical Integration
Numerical Integration Numerical Integration
Trapezoidal Rule • Substituting the trapezoidal rule for each integral yields: f ( x ) + f ( x ) f ( x ) + f ( x ) I ≅ h 0 1 + h 1 2 + 2 2 f ( x L+ + h n− ) + f ( x 1 n 2 ) © 2003-2006 Roberto Muscedere 10
• Grouping the terms: Trapezoidal Rule I ≅ h ⎡ ⎢ ⎣ f n−1 ⎤ ( x ) + 2∑ f ( x ) + f ( x ) 0 i n ⎥ i=11 ⎦ 2 i I ≅ x − x n −1 n 0 f ∑ 2n i ⎡ ⎢ ⎣ ⎤ ( x ) + 2∑ f ( x ) + f ( x ) 0 i n ⎥ =1 ⎦ © 2003-2006 Roberto Muscedere 11
- Page 1 and 2: Numerical Integration • Newton-Co
- Page 3 and 4: Trapezoidal Rule • Trapezoidal Ru
- Page 5 and 6: Trapezoidal Rule • Same result if
- Page 7 and 8: Trapezoidal Rule: Example f (0) = 0
- Page 9: Trapezoidal Rule • Add a series o
- Page 13 and 14: Trapezoidal Rule: Example f (0) = 0
- Page 15 and 16: Trapezoidal Code (p.2) double Integ
- Page 17 and 18: Trapezoidal Code -Output n=1, I=0.1
- Page 19 and 20: Simpson’s 1/3 Rule ( x − x1 )(
- Page 21 and 22: Simpson’s 1/3 Rule: Example • N
- Page 23 and 24: Simpson’s 1/3 Rule • Add a seri
- Page 25 and 26: Simpson’s 1/3 Rule • Grouping t
- Page 27 and 28: I f Simpson’s 1/3 Rule: Example (
- Page 29 and 30: Simpson’s 1/3 Code (p.2) double I
- Page 31 and 32: Simpson’s 1/3 Code (p.4) double F
Trapezoidal Rule<br />
• Substituting the trapezoidal rule for each<br />
integral yields:<br />
f<br />
( x<br />
) +<br />
f<br />
( x<br />
)<br />
f<br />
( x<br />
) +<br />
f<br />
( x<br />
)<br />
I ≅ h<br />
0 1<br />
+ h<br />
1 2<br />
+<br />
2<br />
2<br />
f ( x<br />
L+ + h<br />
n−<br />
)<br />
+<br />
f<br />
( x<br />
1 n<br />
2<br />
)<br />
© 2003-2006 Roberto Muscedere 10