Nonlinear Equations
How can we solve these equations? π = 40 π/π β’ Spring force: πΊ = π π¦ What is the displacement when πΊ = 2N?
How can we solve these equations? β’ Drag force: π ! = 0.5 ππ‘/π πΊ = 0.5 π· ( π π΅ π€ ) = π ( π€ ) What is the velocity when πΊ = 20N ?
π ! = 0.5 ππ‘/π π π€ = π ( π€ ) βπΊ = 0 Find the root (zero) of the nonlinear equation π π€ Nonlinear Equations in 1D Goal: Solve π π¦ = 0 for π: β β β Often called Root Finding
Bisection method
Bisection method
Convergence An iterative method converges with rate π if: ||2 !"# || lim ||2 ! || $ = π·, 0 < π· < β π = 1: linear convergence .β0 Linear convergence gains a constant number of accurate digits each step (and π· < 1 matters!) For example: Power Iteration
Convergence An iterative method converges with rate π if: ||π .34 || lim ||π . || 5 = π·, 0 < π· < β .β0 π = 1: linear convergence π > 1: superlinear convergence π = 2: quadratic convergence Linear convergence gains a constant number of accurate digits each step (and π· < 1 matters!) Quadratic convergence doubles the number of accurate digits in each step (however it only starts making sense once ||π . || is small (and π· does not matter much)
Convergence β’ The bisection method does not estimate π¦ . , the approximation of the desired root π¦. It instead finds an interval smaller than a given tolerance that contains the root.
Example: Consider the nonlinear equation π π¦ = 0.5π¦ ) β 2 and solving f x = 0 using the Bisection Method. For each of the initial intervals below, how many iterations are required to ensure the root is accurate within 2 67 ? A) [β10, β1.8] B) [β3, β2.1] C) [β4, 1.9]
Bisection method Algorithm: 1.Take two points, π and π , on each side of the root such that π(π) and π(π) have opposite signs. 2.Calculate the midpoint π = !"# $ 3. Evaluate π(π) and use π to replace either π or π , keeping the signs of the endpoints opposite.
Bisection Method - summary q The function must be continuous with a root in the interval π, π q Requires only one function evaluations for each iteration! o The first iteration requires two function evaluations. q Given the initial internal [π, π] , the length of the interval after π iterations is 869 ) ! q Has linear convergence
Newtonβs method β’ Recall we want to solve π π¦ = 0 for π: β β β β’ The Taylor expansion: π π¦ ! + β β π π¦ ! + πβ² π¦ ! β gives a linear approximation for the nonlinear function π near π¦ ! .
Newtonβs method π¦ "
Example Consider solving the nonlinear equation 5 = 2.0 π " + π¦ # What is the result of applying one iteration of Newtonβs method for solving nonlinear equations with initial starting guess π¦ $ = 0, i.e. what is π¦ % ? A) β2 B) 0.75 C) β1.5 D) 1.5 E) 3.0
Newtonβs Method - summary q Must be started with initial guess close enough to root (convergence is only local). Otherwise it may not converge at all. q Requires function and first derivative evaluation at each iteration (think about two function evaluations) q Typically has quadratic convergence ||π .34 || lim ||π . || ) = π·, 0 < π· < β .β0 q What can we do when the derivative evaluation is too costly (or difficult to evaluate)?
Secant method Also derived from Taylor expansion, but instead of using πβ² π¦ . , it approximates the tangent with the secant line: π¦ .34 = π¦ . β π π¦ . /πβ² π¦ .
Secant Method - summary q Still local convergence q Requires only one function evaluation per iteration (only the first iteration requires two function evaluations) q Needs two starting guesses q Has slower convergence than Newtonβs Method β superlinear convergence ||π .34 || lim ||π . || 5 = π·, 1 < π < 2 .β0
1D methods for root finding: Method Update Convergence Cost Check signs of π π and Linear (π = 1 and c = 0.5) Bisection One function evaluation per π π iteration, no need to compute derivatives π’ ! = |π β π| 2 ! Superlinear π = 1.618 , Secant π¦ !"# = π¦ ! + β One function evaluation per local convergence properties, iteration (two evaluations for β = βπ π¦ ! /πππ convergence depends on the the initial guesses only), no initial guess need to compute derivatives πππ = π π¦ ! β π π¦ !$# π¦ ! β π¦ !$# Quadratic π = 2 , local π¦ !"# = π¦ ! + β Newton Two function evaluations per convergence properties, iteration, requires first order β = βπ π¦ ! /πβ² π¦ ! convergence depends on the derivatives initial guess
Recommend
More recommend