Presentation is loading. Please wait. # ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 6 Roots of Equations Bracketing Methods.

## Presentation on theme: "ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 6 Roots of Equations Bracketing Methods."— Presentation transcript:

ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 6 Roots of Equations Bracketing Methods

Last Time - Accuracy and Precision Accuracy Precision

Last Time - Truncation Errors vivi titi t i+1 v i+1 True Slope Approximate Slope Truncation errors due to using approximation in place of exact solution

Last Time - Roundoff Errors A=  d 2

Last Time - Error Definition E t =true value - approximation True Error  t = (E t /True Value)100% Relative True Error

Last Time - Error Definition Approximate Relative Error Iteration Relative Error

Last Time - The Taylor Series Predict value of a function at one point in terms of the function value and its derivatives at another point

Last Time - Taylor’s Theorem Error of Order (x i+1 – x i ) n+1

Last Time - Numerical Differentiation Forward DifferenceBackward DifferenceCentral Difference

The Problem Analytic Solution

The Problem To design the parachute: v=10 m/s t=3 sec m=64 kg g=9.81 c=? CANNOT rearrange to solve for c

The Problem Define Function c must satisfy c is the ROOT of the equation

Objectives Master methods to compute roots of equations Assess reliability of each method Choose best method for a specific problem

Classification Methods BracketingOpen Graphical Bisection Method False Position Fixed Point Iteration Newton-Raphson Secand

Graphical Methods c f(c) v=10 m/s t=3 sec m=65 kg g=9.81

Graphical Methods No Roots Even Number of Roots Lower and Upper Bounds of interval yield values of same sign

Graphical Methods Lower and Upper Bounds of interval yield values of opposite sign Odd number of Roots

Bisection Method Choose Lower, x l and Upper x u guesses that bracket the root xlxl xuxu

Bisection Method Calculate New Estimate x r and f(x r ) xlxl xuxu x r =0.5(x l +x u )

Bisection Method Check Convergence Root = If Error

Bisection Method Define New Interval that Brackets the Root Check sign of f(x l )*f(x r ) and f(x u )*f(x r ) xlxl xuxu Previous Guess xuxu

Bisection Method Repeat until convergence xlxl xuxu Previous Guess x r =0.5(x l +x u )

Bisection - Flowchart Loop x old =x x=(x l +x u )/2 Error=100*abs(x-x old )/x Sign=f(x l )*f(x r ) Sign x u =xx l =xError=0 Error<E all ROOT=x FALSE <0>0

Pseudo Code

Download ppt "ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 6 Roots of Equations Bracketing Methods."

Similar presentations

Ads by Google