Numerical Differentiation Methods

sec 4 1 n.w
1 / 22
Embed
Share

Learn about various numerical differentiation methods such as forward-difference and backward-difference formulas, as well as three-point and five-point approximation methods. Understand how to apply these formulas using given data and tables to compute results and actual errors accurately.

  • Numerical Methods
  • Differentiation
  • Approximation
  • Formulas
  • Error Calculation

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Sec:4.1 Numerical Differentiation

  2. Sec:4.1 Numerical Differentiation ? ?? Approximation Forward-difference Formula Backward-difference Formula ? ?? =? ??+ ? ?(??) ? ?? =? ?? ?(?? ?) + 2? (?) 2? (?) where ? between ??and ??+ ? where ? between ??and ?? ? ?? ?? ?? ? ??+ ? Two-Point Formula Example Use table 4.2 and forward-difference formula to approximate ? 2 with = 0.1 1 ? = ?.? ? (2) (0.1)? 2.1 ?(2) Use table 4.2 and backward-difference formula to approximate ? 2 with = 0.2 1 (0.2)? 2 ?(1.8) ? (2) ? = ?.?

  3. Sec:4.1 Numerical Differentiation ? ?? Approximation Three-Point Midpoint Formula Three-Point Endpoint Formula ?? ??+ ?? ??+ ? ?? ? ?? ??+ ? Five-Point Midpoint Formula Five-Point Endpoint Formula ??+ ?? ?? ??+ ?? ??+ ?? ??+ ? ?? ?? ?? ? ?? ??+ ?? ??+ ?

  4. Sec:4.1 Numerical Differentiation ? ?? Approximation Three-Point Midpoint Formula Three-Point Endpoint Formula ?? ??+ ?? ??+ ? ?? ? ?? ??+ ? Example Use table 4.2 and three-point endpoint formula to approximate ? 2 with = 0.1 ? (2) = = 22.032310

  5. Sec:4.1 Numerical Differentiation ? ?? Approximation Five-Point Midpoint Formula Five-Point Endpoint Formula ??+ ?? ?? ??+ ?? ??+ ?? ?? ?? ??+ ? ?? ? ?? ??+ ?? ??+ ? Example Use table 4.2 and five-point midpoint formula to approximate ? 2 with = 0.1 ? (2) The only five-point formula for which the table gives sufficient data is the midpoint formula = 22.166999

  6. Sec:4.1 Numerical Differentiation ? ?? Approximation Five-Point Midpoint Formula Five-Point Endpoint Formula ??+ ?? ?? ??+ ?? ??+ ?? ?? ?? ??+ ? ?? ? ?? ??+ ?? ??+ ? Example Use table 4.2 and five-point midpoint formula to approximate ? 2 with = 0.1 = 22.166999 ? (2) Compute the actual error The data given in Table 4.2 are taken from the function ? ? = ??? The actual error = 22.166999 ? (1.8) = 22.166999 16.9390129

  7. Sec:4.1 Numerical Differentiation ? ?? Approximation Five-Point Midpoint Formula Five-Point Endpoint Formula ??+ ?? ?? ??+ ?? ??+ ?? ?? ?? ??+ ? ?? ? ?? ??+ ?? ??+ ? Example Use table 4.2 and five-point midpoint formula to approximate ? 2 with = 0.1 = 22.166999 ? (2) Compute the actual error The data given in Table 4.2 are taken from the function ? ? = ??? The actual error = 22.166999 ? (1.8) = 22.166999 16.9390129

  8. Sec:4.1 Numerical Differentiation ? ?? Approximation Three-Point Midpoint Formula Three-Point Endpoint Formula ?? ??+ ?? ??+ ? ?? ? ?? ??+ ? Example Use table 4.2 and three-point midpoint formula to approximate ? 2 (consider all possible cases) 1 ? = ?.? ? (2) 2(0.1)? 2.1 ?(1.9) 1 2(0.2)? 2.2 ?(1.8) ? (2) ? = ?.?

  9. Sec:4.1 Numerical Differentiation ? ?? Approximation Three-Point Midpoint Formula Three-Point Endpoint Formula ?? ??+ ?? ??+ ? ?? ? ?? ??+ ? Example Use table 4.2 and three-point endpoint formula to approximate ? 2.2 (consider all possible cases) ? = ?.? 1 ? (2.2) 2( 0.1) 3? 2.2 + 4? 2.1 ?(2) ? = ?.? 1 2( 0.2) 3? 2.2 + 4? 2 ?(1.8) ? (2.2)

  10. Sec:4.1 Numerical Differentiation ? ?? Approximation Three-Point Midpoint Formula Three-Point Endpoint Formula ?? ??+ ?? ??+ ? ?? ? ?? ??+ ? Five-Point Midpoint Formula Five-Point Endpoint Formula ??+ ?? ?? ??+ ?? ??+ ?? ??+ ? ?? ?? ?? ? ?? ??+ ?? ??+ ?

  11. Sec:4.1 Numerical Differentiation Comparison Study Example True Error ? (2.0) The true value 22.167168 Three-point endpoint with h = 0.1 22.03231 1.35 e 1 Three-point endpoint with h = 0.1 22.054525 1.13 e 1 Three-point midpoint with h = 0.1 22.22879 6.16 e-2 Three-point midpoint with h = 0.2 22.414163 2.47 e-1 Five-point midpoint with h = 0.1 22.166999 1.69 e-4 Table 4.2 represents values of ? ? = ??? If we had no other information we would accept the five-point midpoint approximation using h = 0.1 as the most accurate, and expect the true value to be between that approximation and the three-point mid-point approximation that is in the interval [22.166, 22.229].

  12. Sec:4.1 Numerical Differentiation ? ?? Approximation Second Derivative Midpoint Formula ?? ? ?? ??+ ? Example Use table 4.2 and Second Derivative Midpoint Formula to approximate ? 2 with = 0.1,0.2 ? (2) ? (2) = = = 29.593200 = 29.704275 True Error ? (2.0) 29.556224 29.5932 29.704275 The true value midpoint with h = 0.1 midpoint with h = 0.2 3.70 e-2 1.48 e-1

  13. Sec:4.1 Numerical Differentiation ??????????? ???????? ????????????? ?????????? ??????????? ????? ???????? ?????? ?????? Product of two functions ? ? + ?? ???? = ? ?? + ? ?? ?? ? ?? ? ?? = Product of three functions ? ?? + ?? ? + ??? ????? = ? ?? ? ?? + ? ?? ? ?? + ? ?? ? ?? ?? ? ?? ? ?? ? ?? =

  14. Sec:4.1 Numerical Differentiation ??????????? Three-Point Midpoint Formula Three-Point Endpoint Formula ?? ??+ ?? ??+ ? ?? ? ?? ??+ ? the second Lagrange polynomial ? ?0 ? ?0 2 +? (?(?)) ? ?0+ ? ?0 ? ?0+ ? ?0 2 ? ? = ? ?0 + ? ?0 + ? ?0+ (? ??+ ?)(? ??)(? ?? ?) ?! Differentiate both sides ? ?0+ ? ?0 2 ? (? ??+ ?)(? ??)(? ?? ?) + ? ? ?0+ + ? ?0 ? ?0+ + ? ?0 2 (? ??+ ?)(? ??)(? ?? ?) ? ? = ? ?0 + ? ?0 + ? ?0+ ? (?(?)) +? (?(?)) ?! ?! ? (? ??+ ?)(? ??)(? ?? ?) = (? ??)(? ?? ?)+ (? ??+ ?)(? ?? ?)+ (? ??+ ?)(? ??) Set ? = ?0 + ? ?0 = ? ?0 2 + ? ?0 ( ??) + ? ?0+ 2 +? ? ? ?!

  15. Sec:4.1 Numerical Differentiation Three-Point Midpoint Formula Three-Point Endpoint Formula ?? ??+ ?? ??+ ? ?? ? ?? ??+ ? the second Lagrange polynomial ? ?0 ? ?0 2 2 ? ?0 ? ?0 2 ? ?0 ? ?0 2 ? ? = ? ?0 + ? ?0+ + ? ?0+ 2 +? ? ? (? ??)(? ?? ?)(? ?? ??) ?! Differentiate both sides ? ?0 + ? ?0 2 2 ? ?0 + ? ?0 2 ? ? ? ? ?0 + ? ?0 2 ? ? = ? ?0 + ? ?0+ + ? ?0+ 2 ? ? ? ?! +? (? ??)(? ?? ?)(? ?? ??) + ? (? ??)(? ?? ?)(? ?? ??) ?! ? (? ??)(? ?? ?)(? ?? ??) = (? ?? ?)(? ?? ??) + (? ??)(? ?? ??) + (? ??)(? ?? ?) Set ? = ?0 + 2 2 2 2 ? ?0 = ? ?0 + ? ?0+ + ? ?0+ 2 ? ? ? ?! +? (? ??)(? ?? ?)(? ?? ??)

  16. Sec:4.1 Numerical Differentiation ??????????? ???????? ????????????? ?????????? ??????????? ????? ???????? ?????? ?????? Use Lagrange polynomial and the given nodes to express ?(?) as ?(?) + ????? then differentiate both sides. Next set ? = ?0

  17. Sec:4.1 Numerical Differentiation ?????? ?????? ? ?0+ ? = ? ?0 + ?? ?0 +1 2?2? ?0 +1 1 6?3? ?0 + 24?4? ?0 + ??? ? = ? ? ?0+ = ? ?0 + ? ?0 +1 2 2? ?0 +1 1 6 3? ?0 + 24 4? ?0 + ??? ? = ?? ? ?0+ 2 = ? ?0 + 2 ? ?0 + 2 2? ?0 +4 3 3? ?0 +4 3 4? ?0 + ??? ? = ? ? ?0 = ? ?0 ? ?0 +1 2 2? ?0 1 1 6 3? ?0 + 24 4? ?0 + ??? ? = ?? ? ?0 2 = ? ?0 2 ? ?0 + 2 2? ?0 4 3 3? ?0 +4 3 4? ?0 +

  18. Sec:4.1 Numerical Differentiation Example Derive a three-point formula to approximate f (x0) that uses f (x0), f (x0 + h), f (x0 + 2h). Then find the error term [what is the order of the error O( ?) ] ? ?? = ? ? ?? + ?? ??+ ? + ?? ??+ ?? + ????? ? ?0 = ? ?0 ? ? +1 2 2? ?0 +1 ? ?0+ = ? ?0 + ? ?0 6 3? ?0 + ? ?0+ 2 = ? ?0 + 2 ? ?0 + 2 2? ?0 +4 ? 3 3? ?0 + + 21 ? ? ?? +?? ??+ ? +?? ??+ ?? ? + ? + ? ? ?0 + ? + 2? ? ?0 2? + 2? ? ?0 = +(1 6?? ?0 +4 3?? ?0) 3 We have 3 constants to determine (A, B, C). So we need three equations ? + ? + ? = 0 21 2? + 2? ? = ? ? =? ? = ? ?? ? ?? = 0 ? + 2? = 1 ??? ?? +? ? ? ? ?? ?? ??+ ? ??? ??+ ??

  19. Sec:4.1 Numerical Differentiation Example Derive a three-point formula to approximate f (x0) that uses f (x0), f (x0 + h), f (x0 + 2h). Then find the error term [what is the order of the error O( ?) ] ? ?? = ? ? ?? + ?? ??+ ? + ?? ??+ ?? + ????? ? ?0 = ? ?0 ? ? ? +1 2 2? ?0 +1 ? ?0+ = ? ?0 + ? ?0 ? ?0+ 2 = ? ?0 + 2 ? ?0 + 2 2? ?0 +4 6 3? ?0 + 3 3? ?0 + + 21 ? ? ?? +?? ??+ ? +?? ??+ ?? 2? + 2? ? ?0 ? + ? + ? ? ?0 + ? + 2? ? ?0 = +(1 6?? ?0 +4 3?? ?0) 3 ??? ?? +? ? ? ? = ? ? =? ? = ? find the error term ? ?? ?? ??+ ? ??? ??+ ?? ?? ? ?? = (1 6?? ?0 +4 = (? ? = ? Leading error term 3?? ?0) 3 ????? = ?(??) ??? ?? ??? ??)?? ?? ???? ? ?? = ? ??? ?? +? ??? ??+ ?? ? ? ?? ? ?? ?? ??+ ?

  20. Sec:4.1 Numerical Differentiation Example Derive a three-point formula to approximate f (x0) that uses f (x0), f (x0 + h), f (x0 + 2h). ? ?? = ? ? ?? + ?? ??+ ? + ?? ??+ ?? + ????? ? ?0 = ? ?0 ? ? +1 2 2? ?0 +1 ? ?0+ = ? ?0 + ? ?0 6 3? ?0 + ? ?0+ 2 = ? ?0 + 2 ? ?0 + 2 2? ?0 +4 ? 3 3? ?0 + + 21 ? ? ?? +?? ??+ ? +?? ??+ ?? 2? + 2? ? ?0 ? + ? + ? ? ?0 + ? + 2? ? ?0 = +(1 6?? ?0 +4 3?? ?0) 3 We have 3 constants to determine (A, B, C). So we need three equations ? + ? + ? = 0 21 2? + 2? = ? ? + 2? = ?

  21. Sec:4.1 Numerical Differentiation ? ?0 = ?? ?0 + ? ? ?0 + ?? ?0+ + ?? ?0+ 2 + ?? ?0+ 3 + ????? ? ?0 = ? ?0 ? ?0 +1 2 2? ?0 1 1 6 3? ?0 + 24 4? ?0 + ? ? ? ?0 = ? ?0 ? ?0+ = ? ?0 + ? ?0 +1 2 2? ?0 +1 1 6 3? ?0 + 3 3? ?0 +4 3 3? ?0 +4 24 4? ?0 + ? ? ?0+ 2 = ? ?0 + 2 ? ?0 + 2 2? ?0 +4 3 4? ?0 + ? ? ? ?0+ 2 = ? ?0 + 2 ? ?0 + 2 2? ?0 +4 3 4? ?0 + ??? = ? + ? + ? + ? + ? ? ?0 + ? ?0 + ? ?0 + ? ?0 + ? ?0 +

  22. Sec:4.1 Numerical Differentiation

More Related Content