130 likes | 612 Views
ChE 250 Numeric Methods. Lecture #7, Chapra Chapter 7 20070202. Roots of Polynomials. We discussed on Wednesday Polynomial tricks and why we need the roots Iterative Methods Müller’s Method Bairstow’s Method Root location with Excel Matlab, Scilab. Roots of Polynomials. Why polynomials
E N D
ChE 250 Numeric Methods Lecture #7, Chapra Chapter 7 20070202
Roots of Polynomials • We discussed on Wednesday Polynomial tricks and why we need the roots • Iterative Methods • Müller’s Method • Bairstow’s Method • Root location with Excel • Matlab, Scilab
Roots of Polynomials • Why polynomials • There are many engineering models that use linear differential equations • The ODE then must be solved and polynomials come into play • Finding the roots of the characteristic equation is the first step in understanding the behavior of the system Review
Roots of Polynomials • Second order ODE example • We know from DiffEq that y=ert is the form of the solution • We solve for r, the value of the roots • The roots tells us the nature of the solution • Real or complex? • Positive or negative? Review
Roots of Polynomials • For a linear equation y=ax+b we have an analytical solution that is easy to calculate • For a quadratic equation, y=ax2+bx+c the solution is slightly more complex, but still easily calculated • But for higher order equations, the analytical solutions (if you can figure them out) are harder to calculate • But using numeric methods, the same algorithm can be used on any polynomial and the roots found with only a few iterations
Müller’s Method • This method is analogous to the secant method, but now use three points and a parabolic curve fit • Three initialization values are required • The quadratic equation is used to calculate x3 based on x0, x1, and x2
Müller’s Method • To solve for xi+1 first use three equations based on the known points • So we have constructed a parabola relative to position x2 • Which leaves two equations and two unknowns that are solved algebraically
Müller’s Method • After solving for a and b • Which can be shown using some difference equations
Müller’s Method • We now have the formula for the parabola, so we solve for the f(xi+1-xi)=0 • Use the quadratic equation (slightly different formulation to avoid round-off error) • Now we have our iteration method in terms of xi+1
Müller’s Method • So now we have two possible calculations, which do we use? • Choose the sign to be the same sign as b • This will make the denominator the largest absolute value and xi+1 closer to xi • What happens if the approximation is complex?
Müller’s Method • Now we have a new approximation, which of the previous three points do we toss out? • Two approaches for two objectives • To find only a real root • Throw out the furthest point • For any root • Just throw out the lowest index • Example 7.2 Excel • Questions??
Preparation for Feb 2nd • Reading • Chapra Chapter 7: Bairstow’s Method • Chapra Chapter 8: Case Studies: Roots of Equations • On Monday we will briefly go over Bairstow’s Method and do some examples from Chapter 8 to solidify your understanding of these methods