28 aug 2007 kkkq 3013 pengiraan berangka week 8 – numerical derivatives & integrals 28 august...

10
28 Aug 2007 KKKQ 3013 KKKQ 3013 PENGIRAAN BERANGKA PENGIRAAN BERANGKA Week 8 – Numerical Derivatives & Integrals 28 August 2007 8.00 am – 9.00 am

Post on 22-Dec-2015

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 28 Aug 2007 KKKQ 3013 PENGIRAAN BERANGKA Week 8 – Numerical Derivatives & Integrals 28 August 2007 8.00 am – 9.00 am

28 Aug 2007

KKKQ 3013KKKQ 3013PENGIRAAN BERANGKAPENGIRAAN BERANGKA

Week 8 – Numerical Derivatives & Integrals28 August 2007

8.00 am – 9.00 am

Page 2: 28 Aug 2007 KKKQ 3013 PENGIRAAN BERANGKA Week 8 – Numerical Derivatives & Integrals 28 August 2007 8.00 am – 9.00 am

28 Aug 2007 Week 8 Page 2

Topics

Page 3: 28 Aug 2007 KKKQ 3013 PENGIRAAN BERANGKA Week 8 – Numerical Derivatives & Integrals 28 August 2007 8.00 am – 9.00 am

28 Aug 2007 Week 8 Page 3

Tutorial Example 1 (adapted courtesy of ref. [1])

[1] KQ3013 lecture notes

For the following function

f(x) = sin x

a) Apply the first, second and third order Taylor series to predict f(x) at x = /6 with x = 0 as base point. Use step sizes /6, /12 and /18. For each case, determine the true relative error.

b) Evaluate the forward, backward and centred finite divided difference of the function at x = /6 with step sizes /6, /12 and /18. Similarly, for each case, determine the true relative error.

c) Numerically evaluate the integration of the function between x = 0 and using

i. Trapezoidal rule with 4 segments

ii. 1/3-Simpson rule with 4 segments

Page 4: 28 Aug 2007 KKKQ 3013 PENGIRAAN BERANGKA Week 8 – Numerical Derivatives & Integrals 28 August 2007 8.00 am – 9.00 am

28 Aug 2007 Week 8 Page 4

Tutorial Example 1

Page 5: 28 Aug 2007 KKKQ 3013 PENGIRAAN BERANGKA Week 8 – Numerical Derivatives & Integrals 28 August 2007 8.00 am – 9.00 am

28 Aug 2007 Week 8 Page 5

Tutorial Example 1

Page 6: 28 Aug 2007 KKKQ 3013 PENGIRAAN BERANGKA Week 8 – Numerical Derivatives & Integrals 28 August 2007 8.00 am – 9.00 am

28 Aug 2007 Week 8 Page 6

Tutorial Example 1

Page 7: 28 Aug 2007 KKKQ 3013 PENGIRAAN BERANGKA Week 8 – Numerical Derivatives & Integrals 28 August 2007 8.00 am – 9.00 am

28 Aug 2007 Week 8 Page 7

Tutorial Example 1

Page 8: 28 Aug 2007 KKKQ 3013 PENGIRAAN BERANGKA Week 8 – Numerical Derivatives & Integrals 28 August 2007 8.00 am – 9.00 am

28 Aug 2007 Week 8 Page 8

Tutorial Example 1

Page 9: 28 Aug 2007 KKKQ 3013 PENGIRAAN BERANGKA Week 8 – Numerical Derivatives & Integrals 28 August 2007 8.00 am – 9.00 am

28 Aug 2007 Week 8 Page 9

Tutorial Example 1

Page 10: 28 Aug 2007 KKKQ 3013 PENGIRAAN BERANGKA Week 8 – Numerical Derivatives & Integrals 28 August 2007 8.00 am – 9.00 am

28 Aug 2007 Week 8 Page 10

Tutorial Example 1