1 / 55

Chem 302 Lab Assignment

Tuesday 2:30 – 4:00 Colin Chris M Johnathan P Craig Jonathan E Alex. Tuesday 4:00 – 5:30 Curtis Matt Chris L Janet Cory Kristen. Chem 302 Lab Assignment. Chem 302 - Math 252. Chapter 1 Solutions of nonlinear equations. Roots of Nonlinear Equations.

jalene
Download Presentation

Chem 302 Lab Assignment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tuesday 2:30 – 4:00ColinChris MJohnathan PCraigJonathan EAlex Tuesday 4:00 – 5:30CurtisMattChris LJanetCoryKristen Chem 302 Lab Assignment

  2. Chem 302 - Math 252 Chapter 1Solutions of nonlinear equations

  3. Roots of Nonlinear Equations • Many problems in chemistry involve nonlinear equations • Linear and quadratic equations are trivial, can be solved analytically • Cubic and higher order solve numerically • Present a overview of basic methods • Not a complete discussion

  4. Successive Approximations • Simplest method • Want to solvef(x)=0rearrange into the formx=g(x) • Use as iteration formulaxi+1=g(xi) • Use initial guess and iterate until self consistent

  5. Successive Approximations

  6. Successive Approximations Second root

  7. Successive Approximations Second root

  8. Successive Approximations Different formula Will find x=2, will not find x=1 Different formula – different results No one formula is best Slow to converge

  9. Successive Approximations How to find initial guesses? Grid search Course to start Get finer

  10. Analysis of Convergence • Each stage of iterationxi+1=g(xi) • For convergence • True root • Intersection of two functions: x & g(x)

  11. Analysis of Convergence

  12. Analysis of Convergence • Four possibilities • Monotonic convergence • Oscillating convergence • Monotonic divergence • Oscillating divergence

  13. Monotonic convergence

  14. Oscillating convergence

  15. Monotonic divergence

  16. Oscillating divergence

  17. Analysis of Convergence • Key is g(x) • Mean Value Theorem • If g(x) and g(x) are continuous on the interval [a,b] then there exists an e (a<e<b) such that

  18. Analysis of Convergence

  19. Analysis of Convergence If M < 1 guaranteed to converge Sufficient but not necessary To converge LHS → 0

  20. Speed of Convergence Taylor expansion about root For xi When close to convergence • Dominant term will be 1st nonzero derivative • Order of Convergence

  21. Newton-Raphson Method • One of most common methods • Usually 2nd order convergence • Generally superior to simple iteration • Uses function and 1st derivative to predict root (assume f is linear)

  22. Newton-Raphson Method

  23. Newton-Raphson Method • Fairly robust • Need analytic expressions for f(x) and f'(x) • May be complicated or not available • Need to evaluate f(x) and f'(x) many times • Maximum efficiency • f'(x) close to zero will cause problems • Especially important for multiple roots • Need to checks in program • Value of f'(x) • Max iterations

  24. Newton-Raphson Method • Test conditions Convergence

  25. Secant Method • NR but use numeric derivative • Need two points to start

  26. False-Position Method • Similar to Secant Method • Uses two points (one on each side of root) (need search) • Find where function would be zero if linear between two points • During each iteration one point is held fixed (pivot), other is moved • More stable but slower than NR • If pivot far from root then slow • If pivot close to root then denominator can be small

  27. False-Position Method • Algorithm • Pick xL & xR (xL < < xR) • Evaluate • Calculate • Calculate • If then xM is the root • Replace xL or xR with xM (depends on sign of ) xM xL xR Repeat

  28. False-Position Method

  29. Bisection Method • Same as FP Method but xM is average of xL & xR • Drawbacks of both FP & Bisection • Two initial guesses on opposite sides of root • Multiple or close roots a problem • f always same sign a problem • Round-off error as xM gets close to root • Secant, FP & Bisection methods do not require analtyic expression of f'(x)

  30. Roots of Polynomials • Want as efficient an algorithm as possible • Efficiency of operations • + • * • / • Power • Naive method (10 ×, 4 +) • Most efficient method for polynomial of order m requires m additionsand m multiplications • Nesting (Horner’s Method)

  31. Horner’s Method • For polynomial of degree m • Divide by (x-r) • b0 is f(r)

  32. Horner’s Method m×, m +

  33. Horner’s Method 1 is a root

  34. Horner’s Method 2 is a root

  35. Horner’s Method • If b0 = 0 (i.e. r is a root) • Have factored (x-r) from equation (i.e. reduced order, called deflating) • Continue to find roots of reduced equation

  36. Horner’s Method 2 is a root (i.e. a double root of original equation)

  37. Birge-Vieta Method • NR method with f(x) and f'(x) evaluated using Horner’s method • Once a root is found, reduce order of polynomial

  38. Birge-Vieta Method

  39. Birge-Vieta Method

  40. Birge-Vieta Method

  41. Birge-Vieta Method

  42. Birge-Vieta Method

  43. Example

  44. Example • NR • x0 4.33  3 • x0> 4.33  5 • Third root? Try it!!!

  45. BV

  46. Roots of Polynomials • What about complex roots? • Occur in pairs • Have form a+ ib & a – ib • Roots of quadratic equationf(x) = x2 – 2ax + a2 + b2 • BV method – we removed factors of x – r. • Quadratic can be solved analytically – therefore best to remove quadratic factors

  47. Lin-Bairstow Method

  48. Lin-Bairstow Method • Iteration Scheme

  49. Lin-Bairstow Method • Algorithm • m > 3: determine quadratic roots, reduce order of problem by 2 • m = 3: determine linear root then quadratic roots • m = 2: determine quadratic roots • m = 1: determine linear root

More Related