Your SlideShare is downloading. ×
  • Like
Computational mathematic
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Computational mathematic

  • 159 views
Published

 

Published in Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
159
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
5
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    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• 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• CLT said that if f(a) and f(b) have opposite sign (one is –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 – 3x2 + 8x - 5 c = (a + b) / 2 [0,1] ℇ=0.005 i a b f(a) f(b) c f(c) 0 0 1 -5 1 0.5 -1.625 1These f(c) > ℇ then, 0.5are from 1the -1.625 given Calculated from this stop! 1 Is this < ℇ? 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) < ℇ 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 – 3x2 + 8x - 5 c = [af(b) - bf(a)] / [f(b) – f(a)] [0,1] ℇ=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 < ℇ? 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 – e3 xi+2 = [xif(xi+1) – xi+1f(xi)] / [f(xi+1) – f(xi)] x0 = 1 , x1 = 0 ℇ=0.0005 i xi xi+1 xi+2 f(xi+2) 0 1 0 0.4710 0.2652 1 0 0.4710 ℇ? Yes, stop! These are from the given Is this <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) < ℇ This is the root!! Prepared by Dr. Suhaila Mohamad Yusuf
  • 7. Newton’s Methodf(x) = x3 – sin x Xn+1 = xn – [f(xn) / f’(xn)] x0 = 1 ℇ=0.0005 n xn f(xn) f’(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 | < ℇ? Yes, stop! 0 derivative of f(x) Is |xn+1 – xn0.92862Calculated from this 3 -0.00001 1.98807 No, next iteration! 4 0.92862 equation Continue iteration This < ℇ until |xn+1 – xn|is the root!! Prepared by Dr. Suhaila Mohamad Yusuf
  • 8. CHAPTER 7EIGENVALUE PROBLEM Prepared by Dr. Suhaila Mohamad Yusuf
  • 9. Characteristic Polynomial• p(λ) = det (A –λI) 3 2 A 1 5 3 2 1 0 3 2A I 1 5 0 1 1 5• p(λ) = det (A –λI) = [(3- λ)(5- λ)] – [(-2)(-1)] = λ2 - 8λ + 13 Prepared by Dr. Suhaila Mohamad Yusuf
  • 10. Gerschgorin’s Circle Theorem 3 2 1 Row 1: Row 2: Row 3: |λ – 3| < |–2| + |1| |λ – 3| < |–1| + |1| |λ – (-4)| < |1| + |–2|A 1 3 1 |λ – 3| < 3 |λ – 3| < 2 |λ – 4| < 3 1 2 4 0<λ<6 1<λ<5 -7 < λ < -1 λ ϵ (0,6) λ ϵ (1,5) λ ϵ (-7,-1) radius = 3 radius = 3 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 radius = 2 λ ϵ (-7,6) Prepared by Dr. Suhaila Mohamad Yusuf
  • 11. Power Method• Aims to find dominant eigenvalue (largest value of eigenvalue) 1 2 1 v(0) = (0,0,1)T A 1 0 1 ε = 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 ε = 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 ǁv(k+1)-v(k)ǁ < ε ? 2 -0.235 0.235 1 0.765 -0.7653.12 Note that ǁv(k+1)-0.755 is a 3.04 v(k)ǁ 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• Aims to find smallest eigenvalue and intermediate eigenvalue 1 2 1 v(0) = (0,1,0)T A 1 0 1 ε = 0.001 4 4 5 λ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 ε = 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 ǁv(k+1)-v(k)ǁ < ε ? 0.517 3 -0.5 Note that ǁv(k+1)-v(k)ǁ 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• λshifted = -2.0• λ3 = λshifted + λ1 = -2.0 + 3.0 = 1.0 1 2 1• Intermediate λ2 A 1 0 1  λ1 + λ2 + λ3 = a11 + a22 + a33  3.0 + λ2 + 1.0 = 1 + 0 + 5 4 4 5  λ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 ∆yk ∆2yk ∆3yk ∆4yk ∆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• h = 1.2 – 1.0 = 0.2 and r = (x – x0) / h = (1.1 – 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 ∇yk ∇2yk ∇3yk ∇4yk ∇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• h = 1.2 – 1.0 = 0.2 and r = (x – x0) / h = (1.9 – 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 ‘divide know that lower value – upper value with what?’ Prepared by Dr. Suhaila Mohamad Yusuf
  • 24. Newton Divided Difference• 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 )• 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)• Re-arrange the table then do as previous• 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• 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• 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• Determine the appropriate linear polynomial expression, p(x) = a0 + a1x based on the following data:• 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• Solution, a0 = 0.01 dan a1 = 0.63• Therefore, the polynomial expression is p(x) = 0.01x + 0.63• 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‘(x) SECOND DERIVATIVE f‘’(x) NUMERICAL INTEGRATION 3-point Formula 5-point Formula Central Difference Central Difference Prepared by Dr. Suhaila Mohamad Yusuf
  • 34. SORRY!!! I DIDN’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• Interval / scale, h b a h N Prepared by Dr. Suhaila Mohamad Yusuf
  • 37. Trapezoidal Rule• 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’s 1/3 Rule• 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’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’s 3/8 Rule• 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’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 ‘Ganda 1st and Remaining 3’ (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• Use Romberg integration to approximate 4 x dx 1 x 4• Compute the Romberg table until |Ri,j Ri,j-1|<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’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• Calculate R2,2 using another formula 4 R2,1 R1,1 4 2.8670 2.7921 R2 , 2 2.8920 3 3• Is |Ri,j Ri,j-1|<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’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• Calculate R3,2 using another formula 4 R3,1 R2,1 4 2.8861 2.8670 R3, 2 2.8925 3 3• Is |Ri,j Ri,j-1|<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• Calculate R3,3 using another formula 4 R3, 2 R2, 2 16 2.8925 2.8920 R3,3 2.8925 15 15• Is |Ri,j Ri,j-1|<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’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’ve got previously Prepared by Dr. Suhaila Mohamad Yusuf
  • 54. ALL THE BEST! Prepared by Dr. Suhaila Mohamad Yusuf