Numerical Integration * The problem in numerical integration is the numerical evaluation of integral. b I f x dx a * Geometrically, I is the area under the curve of f(x) between a and b.
Methods of solution
y f x 1- Trapezoidal Rule h y A f f f 2 1 0 1 f 2 1 h A f f f 2 1 2 0 2 h A f f 3 2 3 2 h h x x x x x 1 0 2 n a b h 2 .... A f f f f f 0 n 1 2 n 1 2 b a h n
Example 1 2 x e dx Approximate the value of , use n =5, then estimate the error. 0 1 0 2 x f x e h 0.2 5 x 0 0.2 0.4 0.6 0.8 1.0 2.2255 f(x) 1 1.4918 3.3201 4.9530 7.3890 1 0.2 e dx 2 x 1 7.3890 2 1.4918+2.2255+3.3201+4.9530 2 0 3.23698
Error Estimation 1 2 x I e dx Exact 0 1 2 x 1 1 e 2 x e 2 0 2 0 1 2 3.19453 2 e 1 I 3.23698 Trap . Error I I Exact Trap . 3.19453 3.23698 0.04245
Example 1 2 x e dx Approximate the value of , use n =10. 0 1 0 e 2 x h 0.1 f x 10 x 0 0.1 0.2 0.3 0.4 0.5 f(x) 1 0.99005 0.960789 0.913931 0.852144 0.778801 x 0.6 0.7 0.8 0.9 1.0 f(x) 0.697676 0.612626 0.527292 0.444858 0.367879 1 0.1[(1 2 x e dx 0.367879) 2 (0.99005+0.960789+0.913931+0.852144 2 0 +0.778801+0.697676+0.612626+0.527292+0.444 858)] 0.746211
2- Simpson ’ s Rule h A f 4 f f 1 0 1 2 3 h A f 4 f f 2 2 3 4 3 h A f 4 f f 3 4 5 6 3 h A f f 4 f f .... 0 n 1 3 3 2 .... f f 2 4 b a h n
Example 1 2 x e dx Approximate the value of , use n=10, then estimate the error. 0 1 0 2 x f x e h 0.1 10 x 0 0.1 0.2 0.3 0.4 0.5 f(x) 1 1.2214 1.4918 1.8221 2.2255 2.7183 x 0.6 0.7 0.8 0.9 1.0 4.9530 f(x) 3.3201 4.0552 6.0496 7.3890 1 0.1 e dx 2 x 1 7.3890 4 1.2214+1.8221+2.7183+4.0552+6.0496 3 0 3.19454 2 1.4918+2.2255+3.3201+4.95 30
Example 1 2 x I e dx Exact 0 1 2 x 1 1 e 2 x e 2 0 2 0 1 2 2 e 1 3.19453 I 3.19454 Simp . Error I I Exact Simp . 3.19453 3.19454 0.00001
Example 1 2 x e dx Approximate the value of , use n=10. 0 1 0 e 2 x f x h 0.1 10 x 0 0.1 0.2 0.3 0.4 0.5 f(x) 1 0.99005 0.960789 0.913931 0.852144 0.778801 x 0.6 0.7 0.8 0.9 1.0 f(x) 0.697676 0.612626 0.527292 0.444858 0.367879 1 0.1[(1 2 x e dx 0.367879) 4 (0.99005+0.913931+0.778801+0.612626+0.444858) 3 0 0.746825 + (0.960789+0.852144+0.697676)+0.527 2 29 2 ]
Recommend
More recommend