0
Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Standard text messaging rates apply

# Computational mathematic

223

Published on

Published in: Education
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total Views
223
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
7
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Transcript

• 1. Summary of Lectures Just click to see next animation Prepared by: Dr. Suhaila Mohamad Yusuf suhailamy@utm.my Prepared by Dr. Suhaila Mohamad Yusuf
• 2. CHAPTER 6NON-LINEAR EQUATIONS Prepared by Dr. Suhaila Mohamad Yusuf
• 3. Centre Limit Theorem&#x2022; Given an equation of f(x) with an interval of [a,b], you need to determine whether there exist at least a real root in that interval&#x2022; CLT said that if f(a) and f(b) have opposite sign (one is &#x2013;ve and another is +ve) then there exist at least a real root in that interval a b f(a) +ve f(b) -ve Prepared by Dr. Suhaila Mohamad Yusuf
• 4. Bisection Methodf(x) = x3 &#x2013; 3x2 + 8x - 5 c = (a + b) / 2 [0,1] &#x2107;=0.005 i a b f(a) f(b) c f(c) 0 0 1 -5 1 0.5 -1.625 1These f(c) &gt; &#x2107; then, 0.5are from 1the -1.625 given Calculated from this stop! 1 Is this &lt; &#x2107;? Yes, 0.75 -0.266 2 new interval! 0.75 interval 1 -0.266 No, next iteration! 1 equation 0.875 0.373 3 0.75 0.875 -0.266 0.373 0.8125 0.056 4 0.75 0.813How to choose 0.056new 0.7815 -0.266 the -0.103 5 0.782 0.813 interval? -0.103 0.056 0.7975 -0.021 6 0.798 0.813 -0.021 0.056 0.8055 0.020 7 0.798 0.806 -0.021 0.02 0.802 0.002Make sure these parts 0 Repeat all the steps 0.5 1 This is the CAREFULLY until f(c) &lt; &#x2107; have opposite sign! -ve f(x) -ve f(x) +ve f(x) root!! We need to take this c value. CLT said that f(a) and f(b) How about another one? should have opposite sign! Prepared by Dr. Suhaila Mohamad Yusuf
• 5. False Position Methodf(x) = x3 &#x2013; 3x2 + 8x - 5 c = [af(b) - bf(a)] / [f(b) &#x2013; f(a)] [0,1] &#x2107;=0.005 i a b f(a) f(b) c f(c) 0 0 1 -5 1 0.833 -1.625 1 0 0.8333 -5 These are from the given 0.162 Is this &lt; &#x2107;? Yes, 0.807 Calculated from this0.029 stop! 2 0 0.807 interval -5 0.029 No, next iteration! 0.802 equation 0.004 This is the Remember how to choose the root!! interval value? What does the CLT said about interval? Prepared by Dr. Suhaila Mohamad Yusuf
• 6. Secant Methodf(x) = sin (x) + 3x &#x2013; e3 xi+2 = [xif(xi+1) &#x2013; xi+1f(xi)] / [f(xi+1) &#x2013; f(xi)] x0 = 1 , x1 = 0 &#x2107;=0.0005 i xi xi+1 xi+2 f(xi+2) 0 1 0 0.4710 0.2652 1 0 0.4710 &#x2107;? Yes, stop! These are from the given Is this &lt;0.0295 0.3723 Calculated from this -0.0012 2 0.4710 0.3723 No, next iteration! 0.3599 values of x0 and x1 equation 3 0.3723 interval. Take the latest 2 New 0.3599 0.3604 0.0000 values as next interval Continue iteration until f(xi+2) &lt; &#x2107; This is the root!! Prepared by Dr. Suhaila Mohamad Yusuf
• 7. Newton&#x2019;s Methodf(x) = x3 &#x2013; sin x Xn+1 = xn &#x2013; [f(xn) / f&#x2019;(xn)] x0 = 1 &#x2107;=0.0005 n xn f(xn) f&#x2019;(xn) 0 1 0.15853 2.45970 1 0.93555 0.01392 2.03239 This is from the given Calculated from the 2 values of x 0.92870 0.00015 1.98858 | &lt; &#x2107;? Yes, stop! 0 derivative of f(x) Is |xn+1 &#x2013; xn0.92862Calculated from this 3 -0.00001 1.98807 No, next iteration! 4 0.92862 equation Continue iteration This &lt; &#x2107; until |xn+1 &#x2013; xn|is the root!! Prepared by Dr. Suhaila Mohamad Yusuf
• 8. CHAPTER 7EIGENVALUE PROBLEM Prepared by Dr. Suhaila Mohamad Yusuf
• 9. Characteristic Polynomial&#x2022; p(&#x3BB;) = det (A &#x2013;&#x3BB;I) 3 2 A 1 5 3 2 1 0 3 2A I 1 5 0 1 1 5&#x2022; p(&#x3BB;) = det (A &#x2013;&#x3BB;I) = [(3- &#x3BB;)(5- &#x3BB;)] &#x2013; [(-2)(-1)] = &#x3BB;2 - 8&#x3BB; + 13 Prepared by Dr. Suhaila Mohamad Yusuf
• 10. Gerschgorin&#x2019;s Circle Theorem 3 2 1 Row 1: Row 2: Row 3: |&#x3BB; &#x2013; 3| &lt; |&#x2013;2| + |1| |&#x3BB; &#x2013; 3| &lt; |&#x2013;1| + |1| |&#x3BB; &#x2013; (-4)| &lt; |1| + |&#x2013;2|A 1 3 1 |&#x3BB; &#x2013; 3| &lt; 3 |&#x3BB; &#x2013; 3| &lt; 2 |&#x3BB; &#x2013; 4| &lt; 3 1 2 4 0&lt;&#x3BB;&lt;6 1&lt;&#x3BB;&lt;5 -7 &lt; &#x3BB; &lt; -1 &#x3BB; &#x3F5; (0,6) &#x3BB; &#x3F5; (1,5) &#x3BB; &#x3F5; (-7,-1) radius = 3 radius = 3 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 radius = 2 &#x3BB; &#x3F5; (-7,6) Prepared by Dr. Suhaila Mohamad Yusuf
• 11. Power Method&#x2022; Aims to find dominant eigenvalue (largest value of eigenvalue) 1 2 1 v(0) = (0,0,1)T A 1 0 1 &#x3B5; = 0.001 4 4 5 Prepared by Dr. Suhaila Mohamad Yusuf
• 12. Power Method 1 2 1 v(0) = (0,0,1)T A * v Abs max A 1 0 1 between &#x3B5; = 0.001 4 4 5 these values k (v(k))T (Av(k))T mk+1 0 0 0 1 -1 1 5 5 1 -0.2 0.2 1 -0.8 0.8 3.4 3.4 These values &#x1C1;v(k+1)-v(k)&#x1C1; &lt; &#x3B5; ? 2 -0.235 0.235 1 0.765 -0.7653.12 Note that &#x1C1;v(k+1)-0.755 is a 3.04 v(k)&#x1C1; 3.12 3 -0.245 0.245 1 -0.755 3.04 No, next iteration 4 -0.248 0.248 1 -0.752 divided by difference of two vectors.3.016 0.752 3.016 that value 5 -0.249 0.2492 1 2-0.751 0.751 2 3.008 3.008 v u (v1 u1 ) (v2 u2 ) ... (vn un ) 6 -0.250 0.250 1 -0.750 to have 3.000 0.750 3.000v (1) 7 v ( 0) -0.250( 0.0.250 ) 2 (1 .2 0) 2 (1 1) 2 values 2 0 0 these Eigenvector Eigenvalue Prepared by Dr. Suhaila Mohamad Yusuf
• 13. Shifted Power Method&#x2022; Aims to find smallest eigenvalue and intermediate eigenvalue 1 2 1 v(0) = (0,1,0)T A 1 0 1 &#x3B5; = 0.001 4 4 5 &#x3BB;1 = 3.0 Prepared by Dr. Suhaila Mohamad Yusuf
• 14. Shifted Power Method B A I A 3 .0 I 1 2 1 1 0 0 1 0 1 3.0 0 1 0 4 4 5 0 0 1 1 2 1 3. 0 0 0 1 0 1 0 3. 0 0 4 4 5 0 0 3 .0 2 2 1 1 3 1 4 4 2 Prepared by Dr. Suhaila Mohamad Yusuf
• 15. Shifted Power Method 2 2 1 v(0) = (0,1,0)T B * v Abs max B 1 3 1 between &#x3B5; = 0.001 4 4 2 these values k (v(k))T (Bv(k))T mk+1 0 0 1 0 2 -3 -4 -4 1 -0.5 0.75 1 1.5 -1.75 -3 -3 2 -0.5 0.583 1.166 1 These values -1.249 -2.332 -2.332 &#x1C1;v(k+1)-v(k)&#x1C1; &lt; &#x3B5; ? 0.517 3 -0.5 Note that &#x1C1;v(k+1)-v(k)&#x1C1; is a 1 1.072 -1.108 -2.144 -2.144No, 4next iteration -0.5 0.508 differencedivided by 1 of two vectors. 1.034 -1.051 -2.068 -2.068 5 -0.5 0.504 1 that value 1.016 -1.024 -2.032 -2.032v u6 (v1 u1 ) 2 0.502 u2 )1 ... tovhave n-1.012 -0.5 (v2 2 1.008 u ) ( n 2 -2.016 -2.016 7 -0.5 0.501 1 these values 1.004 -1.006 -2.008 -2.008 8 -0.5 0.5 1 1.002 -1.003 -2.004 -2.004 9 -0.5 0.5 1 1.000 -1.000 -2.000 -2.000 10 -0.5 10 1 Eigenvector Prepared by Dr. Suhaila Mohamad Yusuf Shifted Eigenvalue
• 16. Shifted Power Method&#x2022; &#x3BB;shifted = -2.0&#x2022; &#x3BB;3 = &#x3BB;shifted + &#x3BB;1 = -2.0 + 3.0 = 1.0 1 2 1&#x2022; Intermediate &#x3BB;2 A 1 0 1 &#xF0A7; &#x3BB;1 + &#x3BB;2 + &#x3BB;3 = a11 + a22 + a33 &#xF0A7; 3.0 + &#x3BB;2 + 1.0 = 1 + 0 + 5 4 4 5 &#xF0A7; &#x3BB;2 = 2.0 Caution!!! Use the original matrix, A. Not the shifted Prepared by Dr. Suhaila Mohamad Yusuf matrix, B.
• 17. CHAPTER 8INTERPOLATION Prepared by Dr. Suhaila Mohamad Yusuf
• 18. Interpolation Approximation Least Square Newton Forward Difference Newton Backward Difference Newton Divided Difference May need table re-arrangement Langrage Prepared by Dr. Suhaila Mohamad Yusuf
• 19. Newton Forward Difference k 0 1 2 3 4 5 xk 1.0 1.2 1.4 1.6 1.8 2.0 yk 0.5000 0.4545 0.4167 0.3846 0.3571 0.3333 Find y(1.1) k xk yk &#x2206;yk &#x2206;2yk &#x2206;3yk &#x2206;4yk &#x2206;5yk x=1.0 is x=1.1 0 1.0 0.5000 -0.0455 0.0077 -0.0020 0.0009 -0.0007 chosenlocated as ref. 1 1.2 0.4545 -0.0378 0.0057 value This -0.0011 0.0002 here point 2 1.4 0.4167 -0.0321 0.0046 -0.0009 Repeat until because 3 1.6 0.3846 -0.0275 0.0037 this minus last column of higher value degree 4 1.8 0.3571 -0.0238 5 2.0 0.3333 To get this value Prepared by Dr. Suhaila Mohamad Yusuf
• 20. Newton Forward Difference&#x2022; h = 1.2 &#x2013; 1.0 = 0.2 and r = (x &#x2013; x0) / h = (1.1 &#x2013; 1.0) / 0.2 = 0.5 r( r 1) 2 r( r 1)( r 2 ) 3 p5 ( x ) y 0 r y0 y0 y0 2! 3! r( r 1)( r 2 )( r 3) 4 r( r 1)( r 2 )( r 3)( r 4 ) 5 y0 y0 4! 5! ( 0.5 )( 0.5 1) p5 (1.1) 0.5000 ( 0.5 )( 0.0455) ( 0.0077) 2 ( 0.5 )( 0.5 1)( 0.5 2 ) ( 0.5 )( 0.5 1)( 0.5 2 )( 0.5 3) ( 0.0020) ( 0.0009) 6 24 ( 0.5 )( 0.5 1)( 0.5 2 )( 0.5 3)( 0.5 4 ) ( 0.0007) 120 0.5000 0.02275 0.0009625 0.000125 0.0000352 0.0000191 0.4761 Prepared by Dr. Suhaila Mohamad Yusuf
• 21. Newton Backward Difference k 0 1 2 3 4 5 xk 1.0 1.2 1.4 1.6 1.8 2.0 yk 0.5000 0.4545 0.4167 0.3846 0.3571 0.3333 Find y(1.9) k xk yk &#x2207;yk &#x2207;2yk &#x2207;3yk &#x2207;4yk &#x2207;5yk x=2.0 is 0 1.0 0.5000 chosen This value as ref. 1 1.2 0.4545 -0.0455 point 2 1.4 0.4167 -0.0378 0.0077 this minus because 3 1.6 0.3846 value -0.0321 0.0057 -0.0020 of higher To get this degree x=1.9 4 1.8 0.3571 -0.0275 0.0046 -0.0011 0.0009located 5 2.0 0.3333 value -0.0238 0.0037 -0.0009 0.0002 -0.0007 here Repeat until last column Prepared by Dr. Suhaila Mohamad Yusuf
• 22. Newton Backward Difference&#x2022; h = 1.2 &#x2013; 1.0 = 0.2 and r = (x &#x2013; x0) / h = (1.9 &#x2013; 2.0) / 0.2 = -0.5 r (r 1) 2 r (r 1)(r 2) 3 p5 ( x) y5 r y5 y5 y5 2! 3! r (r 1)(r 2)(r 3) 4 r (r 1)(r 2)(r 3)(r 4) 5 y5 y5 4! 5! ( 0.5)( 0.5 1) p5 (1.9) 0.3333 ( 0.5)( 0.0238) (0.0037) 2 ( 0.5)( 0.5 1)( 0.5 2) ( 0.5)( 0.5 1)( 0.5 2)( 0.5 3) ( 0.0009) (0.0002) 6 24 ( 0.5)( 0.5 1)( 0.5 2)( 0.5 3)( 0.5 4) ( 0.0007) 120 0.3333 0.0119 0.0004625 0.00005625 0.000007869 0.0000191 0.3448 Prepared by Dr. Suhaila Mohamad Yusuf
• 23. Newton Divided Difference 1st step, k 0 1 2 3 4 mark the See this col like xk 1.0 1.6 2.5 3.0 3.2 number? this start yk 0.5000 0.3846 0.2857 0.2500 0.2381 from Find y(1.3) f[xk]. 1 2 3 4 5 k xk f[xk] f1[xk] f2[xk] f3[xk] f4[xk] Go to col xk and 5000 00..3846 (0.0.1923)01099 1 1.0 0.5000 -0.1923 0.0549 -0.0137 0.0032 count down the 1.6 1.0 25 col according to 1 2 1.6 1 0.3846 -0.1099 0.0275 -0.00660.2857 0.3846 number on top of 2.5 1.6 2 2 2.5 3 0.2857 -0.0714 0.0170 the col. Then the 3 3.0 0.2500 last value of x -0.0595 minus with the 4 3.2 0.2381 first value of x. To fill in this col, we Big problem is &#x2018;divide know that lower value &#x2013; upper value with what?&#x2019; Prepared by Dr. Suhaila Mohamad Yusuf
• 24. Newton Divided Difference&#x2022; Interpolation Polynomial expression p4 ( x ) y 0 f [ x 0 , x1 ]( x x 0 ) f [ x 0 , x1 , x 2 ]( x x 0 )( x x1 ) f [ x 0 , x1 , x 2 , x 3 ]( x x 0 )( x x1 )( x x 2 ) f [ x 0 , x1 , x 2 , x 3 , x 4 ]( x x 0 )( x x1 )( x x 2 )( x x 3 )&#x2022; Assign the value into the polynomial expression p 4 (1.3 ) 0.5 ( 0.1923)(1.3 1.0 ) 0.0549(1.3 1.0 )(1.3 1.6 ) ( 0.0137)(1.3 1.0 )(1.3 1.6 )(1.3 2.5 ) 0.0032(1.3 1.0 )(1.3 1.6 )(1.3 2.5 )(1.3 3.0 ) 0.5 0.05769 0.004941 0.0014796 0.00058752 0.4353 Prepared by Dr. Suhaila Mohamad Yusuf
• 25. Newton Divided Difference k 0 1 2 3 4 xk 1.0 1.6 2.5 3.0 3.2 yk 0.5000 0.3846 0.2857 0.2500 0.2381 Find y(2.8)&#x2022; Re-arrange the table then do as previous&#x2022; How to re-arrange table? 2.8 is in here k 0 1 Value of x before 2Decending value of 4 3 xk and after 2.8 1.6 1.0 2.5 3.0 remaining x 3.2 yk 0.5000 0.3846 0.2857 0.2500 0.2381 k 0 1 2 3 4 xk yk Prepared by Dr. Suhaila Mohamad Yusuf
• 26. Langrage k 0 1 2 3 4 xk 1.0 1.6 2.5 3.0 3.2 yk 0.5000 0.3846 0.2857 0.2500 0.2381 Find y(1.3) npn ( x ) L 0 ( x )y 0 L1( x )y 1 .......L n ( x )y n L i ( x )y i i 0 4p4 ( x ) L i ( x )y i i 0p4 ( x ) L 0 ( x )y 0 L 1( x )y 1 L 2 ( x )y 2 L 3 ( x )y 3 L 4 ( x )y 4 Prepared by Dr. Suhaila Mohamad Yusuf
• 27. Langrage Because it is L0, x0 is nowhere to&#x2022; Calculate L0 be found up here (1.3 x1 )(1.3 x 2 )(1.3 x 3 )(1.3 x 4 ) L 0 ( 1.3 ) ( x 0 x1 )( x 0 x 2 )( x 0 x 3 )( x 0 x 4 ) (1.3 1.6 )(1.3 2.5 )(1.3 3.0 )(1.3 3.2 ) 0.2936 (1.0 1.6 )(1.0 2.5 )(1.0 3.0 )(1.0 3.2 ) Because it is L0, x0 is deducted&#x2022; With the same with other x method, calculate L1, L2 ,L3 ,L4 Prepared by Dr. Suhaila Mohamad Yusuf
• 28. Langrage 4p 4 (1.3 ) L i (1.3 )y i i 0 0.2936( 0.5000) 0.9613 0.3846) 0.6152( 0.2857) ( 0.7329( 0.2500) 0.3726( 0.2381) 0.4353 Prepared by Dr. Suhaila Mohamad Yusuf
• 29. Least Square&#x2022; Determine the appropriate linear polynomial expression, p(x) = a0 + a1x based on the following data:&#x2022; Determine f(2.3) x 1 2 3 4 5 f(x) 0.50 1.40 2.00 2.50 3.10 s 0 s1 a 0 v0 s1 s 2 a 1 v1 Prepared by Dr. Suhaila Mohamad Yusuf
• 30. Least Squarexk 0 xk 1 xk 2 fk xk 0 f k xk 1 f k 1 1 1 0.5 0.5 0.5 1 2 4 1.4 1.4 2.8 1 3 9 2.0 2.0 6.0 1 4 16 2.5 2.5 10.0 1 5 25 3.1 3.1 15.5 5 15 55 - 9.5 34.8s 0 s1 a 0 v0 5 15 a 0 9.5s1 s 2 a 1 v1 15 55 a 1 34.8 Prepared by Dr. Suhaila Mohamad Yusuf
• 31. Least Square 5 15 a 0 9.5 15 55 a 1 34.8&#x2022; Solution, a0 = 0.01 dan a1 = 0.63&#x2022; Therefore, the polynomial expression is p(x) = 0.01x + 0.63&#x2022; To determine f(2.3): p( 2.3) 0.01( 2.3) 0.63 0.653 f ( 2.3) p( 2.3) 0.653 Prepared by Dr. Suhaila Mohamad Yusuf
• 32. CHAPTER 9 NUMERICALDIFFERENTIATION Prepared by Dr. Suhaila Mohamad Yusuf
• 33. Forward Backward Forward Backward Central Forward CentralDifference Difference Difference Difference Difference Difference Difference 2-point 3-point 5-point Formula Formula Formula FIRST DERIVATIVE f&#x2018;(x) SECOND DERIVATIVE f&#x2018;&#x2019;(x) NUMERICAL INTEGRATION 3-point Formula 5-point Formula Central Difference Central Difference Prepared by Dr. Suhaila Mohamad Yusuf
• 34. SORRY!!! I DIDN&#x2019;T PREPAREANYTHING. THIS CHAPTER IS TOO EASY. MAKE SURE YOU KNOW WHICH FORMULA TO USE.. Prepared by Dr. Suhaila Mohamad Yusuf
• 35. CHAPTER 10 NUMERICAL INTEGRATION Prepared by Dr. Suhaila Mohamad Yusuf
• 36. Numerical Integration&#x2022; Interval / scale, h b a h N Prepared by Dr. Suhaila Mohamad Yusuf
• 37. Trapezoidal Rule&#x2022; Approximate the following integral using the Trapezoidal rule with h=0.5 4 x dx 1 x 4 b a 4 1 N 6 h 05 . Prepared by Dr. Suhaila Mohamad Yusuf
• 38. Trapezoidal Rule 4 x 4 xi dx f ( x) dxi xi f ( xi ) 1 x 4 1 xi 4 h f f6 2 f1 f2 f3 f4 f50 1.0 0.4472 2 01 1.5 0.6396 0.5 1.8614 2 4.84862 2.0 0.8165 23 2.5 0.9806 2.88964 3.0 1.13395 3.5 1.27806 4.0 1.4142 Total 1.8614 4.8486 prepared by Razana Alwee 1st and last In-between values values Prepared by Dr. Suhaila Mohamad Yusuf
• 39. Simpson&#x2019;s 1/3 Rule&#x2022; Approximate the following integral using the Trapezoidal rule with h=0.5 4 x dx 1 x 4 b a 4 1 N 6 h 05 . Prepared by Dr. Suhaila Mohamad Yusuf
• 40. Simpson&#x2019;s 1/3 Rule 3 2 4 x h dx f0 f6 4 f 2i 1 2 f 2i 1 x 4 3 i 1 i 1 0.5 xi 1.8614 4(2.8982) 2(1.9504)i xi fi f ( xi ) 3 xi 40 1.0 0.4472 2.89251 1.5 0.63962 2.0 0.81653 2.5 0.98064 3.0 1.13395 3.5 1.27806 4.0 1.4142 Total 1.8614 2.8982 1.9504 1st and last Odd Even Prepared by Dr. Suhaila Mohamad Yusuf values column column
• 41. Simpson&#x2019;s 3/8 Rule&#x2022; Approximate the following integral using the Trapezoidal rule with h=0.25 4 x dx 1 x 4 b a 4 1 N 12 h 0.25 Prepared by Dr. Suhaila Mohamad Yusuf
• 42. Simpson&#x2019;s 3/8 Rule 4 3 4 x 3h dx f0 f12 3 f 3i 2 f 3i 1 2 f 3i 1 x 4 8 i 1 i 1 xii xi fi f ( xi ) xi 4 3(0.25)0 1.00 0.4472 1.8614 3(7.7191) 2(2.9174) 81 1.25 0.54552 1.50 0.6396 2.89253 1.75 0.72984 2.00 0.81655 2.25 0.90006 2.50 0.98067 2.75 1.05868 3.00 1.13399 3.25 1.207010 3.50 1.278011 3.75 1.347012 4.00 1.4142 Total 1.8614 7.7191 2.9174 &#x2018;Ganda 1st and Remaining 3&#x2019; (3,6,9) last values values Prepared by Dr. Suhaila Mohamad Yusuf
• 43. Romberg Integration Formula for Romberg Tablei hi Ri,1 Ri,2 Ri,31 b a h1 R1,1 f0 f1 22 1 h1 23 1 h2 2 1 2 i 2 4 j 1 Ri , j 1 Ri 1, j 1 Ri ,1 Ri hi f 2k Ri , j 2 1,1 1 k 1 1 4j 1 1 Prepared by Dr. Suhaila Mohamad Yusuf
• 44. Romberg Integration&#x2022; Use Romberg integration to approximate 4 x dx 1 x 4&#x2022; Compute the Romberg table until |Ri,j Ri,j-1|&lt;0.0005 Prepared by Dr. Suhaila Mohamad Yusuf
• 45. Romberg Integration How to calculate 4 x these? dx b a 4 11 N 1 x 4 From the h here, we h 3 can know the Nh1 b a 4 1 3 (number of segments) Integration starts from Therefore, we only have 1 to 4 and only has 1 f0 and f1, the first node h1 and the last nodeR1,1 f 0 f1 segment 2 1 4 h=3 3 0.4472 1.4142 f1 2 f0 4 1 4 4 2.7921. 1 1 4 0.4772 1 4 4 1.4142 Find the f0 = f(1) and f1 = f(4) using this f(x)by Dr. Suhaila Mohamad Yusuf Prepared
• 46. Romberg Integrationi hi Ri,1 Ri,2 Ri,31 3 2.79212 1.5 h2 is half of h1 Now we need3 to fill in the 2nd row This value needs to be Fill in the Rombergcalculated using other Table with answers that you&#x2019;ve got previously formula Prepared by Dr. Suhaila Mohamad Yusuf
• 47. Romberg Integration How to calculate 4 x this? dx Remember!! b a 4 1 1 N 2 x Every time you calculatewe R , 4 From the h here, h 1.5 can know the N new xx 1 your f , f , ...(number ofbe changed!! fx will segments) h2 h1 1.5 0 1 2 Draw diagram to be safe!! , we have three Integration starts from Therefore 1 1 1 to 4 and has 2 nodes f0 ,f1, and f2,R2,1 R1,1 h1 f 2k 2 k 1 1 segments 1 R1,1 h1 ( f1 ) 1 h = 1.5 2.5 4 2 1 f0 f1 f2 R1,1 h1 ( f (2.5)) 2 4 2 .5 1 0.9806 1 2.7921 3 0.9806 2 .5 4 2 2.8670 Find the f1 = f(2.5) using Prepared by Dr. Suhaila Mohamad Yusuf this f(x)
• 48. Romberg Integration&#x2022; Calculate R2,2 using another formula 4 R2,1 R1,1 4 2.8670 2.7921 R2 , 2 2.8920 3 3&#x2022; Is |Ri,j Ri,j-1|&lt;0.0005? Only compare with R in the same row, not the same column R2, 2 R2,1 2.8920 2.8670 0.025 0.0005 Prepared by Dr. Suhaila Mohamad Yusuf
• 49. Romberg Integrationi hi Ri,1 Ri,2 Ri,31 3 2.79212 1.5 2.8670 2.89203 Fill in0.75Romberg half ofwith answers that the h3 is Table h2 you&#x2019;ve got previously Now we need to fill in the 3rd This value row to be needs calculated using other formula Prepared by Dr. Suhaila Mohamad Yusuf
• 50. Romberg Integration How to calculate 4 x this? dx b a 4 1 1 N 4 x 4 From the h here, we h 0.75 can know the N 1 (number of segments) h3 h2 0.75 2 Integration starts from Therefore, we have five 1 2 1 to 4 and has 4 nodes f0 ,f1, f2 ,f3 and f4,R3,1 R2,1 h2 f 2 k 1 segments 2 k 1 1 1 1.75 2.5 3.25 4 R2,1 h2 ( f1 f 3 ) 2 h = 0.75 1 f0 f1 f2 f3 f4 R2,1 h2 ( f (1.75) f (3.25)) 4 1.75 2 0.7298 4 3.25 1 1.2070 1 1.75 4 1 3.25 4 2.8670 1.5 0.7298 1.2070 2 Find the f1 = f(1.75) and 2.8861 Prepared by Dr. Suhaila Mohamad Yusuf f3 = f(3.25) using this f(x)
• 51. Romberg Integration&#x2022; Calculate R3,2 using another formula 4 R3,1 R2,1 4 2.8861 2.8670 R3, 2 2.8925 3 3&#x2022; Is |Ri,j Ri,j-1|&lt;0.0005? Only compare with R in the same row, not the same column R3, 2 R3,1 2.8925 2.8861 0.0064 0.0005 Prepared by Dr. Suhaila Mohamad Yusuf
• 52. Romberg Integration&#x2022; Calculate R3,3 using another formula 4 R3, 2 R2, 2 16 2.8925 2.8920 R3,3 2.8925 15 15&#x2022; Is |Ri,j Ri,j-1|&lt;0.0005? Only compare with R in the same row, not the same column R3,3 R3, 2 2.8925 2.8925 0.0000 0.0005 Stop Iteration!! Prepared by Dr. Suhaila Mohamad Yusuf
• 53. Romberg Integrationi hi Ri,1 Ri,2 Ri,31 3 2.79212 You 1.5 don&#x2019;t need to generate 2.8670 2.8920 Trapezoidal Table!3 0.75 2.8861 2.8925 2.8925 Just follow my way.. The solution of Fill in the Romberg Table with answers that integration is here you&#x2019;ve got previously Prepared by Dr. Suhaila Mohamad Yusuf
• 54. ALL THE BEST! Prepared by Dr. Suhaila Mohamad Yusuf