Numerical Methods for Engineering MECN 3500

Slides:



Advertisements
Similar presentations
Lecture 5 Newton-Raphson Method
Advertisements

Roundoff and truncation errors
CSE 330: Numerical Methods
Roots: Bracketing Methods
Roots of Equations Our first real numerical method – Root finding
Open Methods Chapter 6 The Islamic University of Gaza
ROOTS OF EQUATIONS Student Notes ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
Open Methods Chapter 6 The Islamic University of Gaza
Unit-I Roots of Equation
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 7 Roots of Equations Bracketing Methods.
Chapter 4 Roots of Equations
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 51.
Second Term 05/061 Roots of Equations Bracketing Methods.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 6 Roots of Equations Bracketing Methods.
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
Roots of Equations Bracketing Methods.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Martin Mendez UASLP Chapter 61 Unit II.
Open Methods Chapter 6 The Islamic University of Gaza
Dr. Marco A. Arocha Aug,  “Roots” problems occur when some function f can be written in terms of one or more dependent variables x, where the.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
NUMERICAL METHODS WITH C++ PROGRAMMING
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 8 Roots of Equations Open Methods.
Bracketing Methods Chapter 5 The Islamic University of Gaza
Roots of Equations Open Methods Second Term 05/06.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
MECN 3500 Inter - Bayamon Lecture Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Solving Non-Linear Equations (Root Finding)
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 Roots of Equations Why? But.
Chapter 6 Finding the Roots of Equations
Introduction This chapter gives you several methods which can be used to solve complicated equations to given levels of accuracy These are similar to.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
MECN 3500 Inter - Bayamon Lecture 7 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
MECN 3500 Lecture 4 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Part 2 Chapter 5 Roots: Bracketing Methods PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
Lecture 3 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
MECN 3500 Inter - Bayamon Lecture 3 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Lecture 6 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Lecture 2 Numerical Methods for Engineering MECN 3500 Department of Mechanical Engineering Inter American University of Puerto Rico Bayamon Campus Dr.
1 Solution of Nonlinear Equation Dr. Asaf Varol
Chapter 3 Roots of Equations. Objectives Understanding what roots problems are and where they occur in engineering and science Knowing how to determine.
Numerical Methods.
MECN 3500 Inter - Bayamon Lecture Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
MECN 3500 Inter - Bayamon Lecture 8 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Newton’s Method, Root Finding with MATLAB and Excel
Today’s class Roots of equation Finish up incremental search
MECN 3500 Inter - Bayamon Lecture 6 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Lecture 5 - Single Variable Problems CVEN 302 June 12, 2002.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 7 Roots of Polynomials.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 5 Bracketing Methods.
Solving Non-Linear Equations (Root Finding)
Numerical Methods Solution of Equation.
Today’s class Numerical differentiation Roots of equation Bracketing methods Numerical Methods, Lecture 4 1 Prof. Jinbo Bi CSE, UConn.
4 Numerical Methods Root Finding Secant Method Modified Secant
SOLVING NONLINEAR EQUATIONS. SECANT METHOD MATH-415 Numerical Analysis 1.
CSE 330: Numerical Methods. What is true error? True error is the difference between the true value (also called the exact value) and the approximate.
Lecture 4 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 / Chapter 5.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
MATH 2140 Numerical Methods
Part 2 / Chapter 5.
Numerical Analysis Lecture 7.
Computers in Civil Engineering 53:081 Spring 2003
Roots: Bracketing Methods
Roots: Bracketing Methods
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Presentation transcript:

Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo omeza@bayamon.inter.edu http://www.bc.inter.edu/facultad/omeza Department of Mechanical Engineering Inter American University of Puerto Rico Bayamon Campus

Tentative Lectures Schedule Topic Lecture Mathematical Modeling and Engineering Problem Solving 1 Introduction to Matlab 2 Numerical Error 3 Root Finding System of Linear Equations Least Square Curve Fitting Polynomial Interpolation Numerical Integration Ordinary Differential Equations

Roots of Equations Engineering Practice

Course Objectives To understand the use of Taylor Series in the study of numerical methods.

Introduction Years ago, you learned to use the quadratic formula The values calculated with the previous equation are called the “roots” of f(x). They represent the values of x that make f(x) equal to zero. For this reason, roots are sometimes called the zeros of the equation. There are many other functions for which the roots cannot be determined so easily.

Introduction

Bracketing Methods This chapter on roots of equations deals with methods that exploit the fact that a function typically changes sign in the vicinity of a root. These techniques are called Bracketing Methods (Or, two point methods for finding roots) because two initial guesses for the root are required. As the name implies, these guesses must “bracket”, or be on either side of, the root. Previous to discuss the techniques Bisection and False-Position, we will briefly discuss the Graphical Method.

Example 5.1- The Graphical Approach: Bracketing Methods Graphical Methods: A simple method for obtaining an estimate the root of the equation f(x)=0 is to make a plot of the function and observe where it crosses the x axis. This point, which represents the x value for which f(x)=0, provides a rough approximation of the root. Example 5.1- The Graphical Approach: Problem Statement. Use the graphical approach to determine the drag coefficient c needed for a parachutist of mass m=68 kg to have a velocity of 40 m/s after free-falling for time t=10s. Note: The acceleration due to gravity is 9.8 /s2. Solution. This problem can be solved by determining the root of parachutist equation using the parameters t=10, g=9.8, v=40 and m=68.1

Bracketing Methods (1) (2)

Bracketing Methods Various values of c can be substituted into the right-hand side of this equation to compute values shows in the table and resulting in the curve that crosses the c axis between 12 and 16. Visual inspection of the plot provides a rough estimate of the root of 14.75. Substituting this value in to equation (2) we get f(14.75)=0.059, which is close to zero. In order to check the root, substituting it into equation (1) v=40.059, which is close to 40m/s. c f(c) 4 34.115 8 17.653 12 6.067 16 -2.269 20 -8.401

Three roots( Might work for a while!!) Bracketing Methods Graphical techniques are of limited practical value because they are not precise. However, graphical methods can be utilized to obtain the rough estimates of roots. These estimates can be employed as starting guesses for numerical methods. No answer (No root) Nice case (one root) Oops!! (two roots!!) Three roots( Might work for a while!!)

Bracketing Methods Progressive Enlargement Two roots( Might work for a while!!) Discontinuous function. Need special method

Then there is at least one real root between xl and xu. Bracketing Methods The Bisection Method: When applying the graphical technique you have observed that f(x) changed sign on opposite side of the root. In general if f(x) is real and continuum in the interval from xl to xu and f(xl) and f(xu) have apposite signs, that is Then there is at least one real root between xl and xu. The methods that capitalize on this observation by locating an interval where the function change sign are called Incremental Search Methods.

The process is repeated to obtain refined estimates. Bracketing Methods The Bisection method also called binary chopping, interval halving, is one type of incremental search method in which the interval is always divided in half. If a function changes sign over an interval, the function value at the midpoint is evaluated. The location of the root is then determined as lying at the midpoint of the subinterval within which the sign change occurs. The process is repeated to obtain refined estimates. A simple algorithm for the bisection calculation is listed as follow:

Bracketing Methods For the arbitrary equation of one variable, f(x)=0 Pick xl and xu such that they bound the root of interest, check if f(xl).f(xu) <0. Estimate the root by evaluating xr =(xl+xu)/2 Find the pair If f(xl). f[(xl+xu)/2]<0, root lies in the lower interval, then xu=(xl+xu)/2 and go to step 2. If f(xl). f[(xl+xu)/2]>0, root lies in the upper interval, then xl= [(xl+xu)/2, go to step 2. If f(xl). f[(xl+xu)/2]=0, then root is (xl+xu)/2 and terminate. Compare es with ea If es<ea, stop. Otherwise repeat the process.

Application Problems

Bracketing Methods Example 5.3- Bisection Method: Problem Statement. Use the bisection to solve the same problem approached graphically in Example 5.1. Solution. The first step in bisection is to guess two values (12 and 16) of the unknown (in the present problem, c) that give values for f(c) with different signs. The initial estimate of the root xr lies at the midpoint of the interval Next we compute the product of the function value at the lower bound and at the midpoint:

Bracketing Methods Which value is greater than zero, and hence no sign change occurs between the lower bound and the midpoint. Consequently, the root must be located between 14 and 16. Therefore, we create a new interval by redefining the lower bound as 14 and determining a revised root estimate as: Compute the product of the function value at the lower bound and at the midpoint

Bracketing Methods Therefore, the root is between 14 and 15. The upper bound is redefined as 15, and the root estimate for the third iteration is calculated as The method can be repeated until the result is accurate enough to satisfy your needs.

Bracketing Methods Bisection Method

Termination Criteria and Error Estimates: Bracketing Methods Termination Criteria and Error Estimates: Error Estimation Example 5.3, for εs=0.5% Iteration Xl Xu Xr εa(%) εt(%) 1 12 16 14 5.279 2 15 6.667 1.487 3 14.5 3.448 1.896 4 14.75 1.695 0.204 5 14.875 0.840 0.641 6 14.8125 0.422 0.219

Bracketing Methods The False-Position Method: Although bisection is a perfectly valid technique for determining roots, its “brute-force” approach is relatively inefficient. False position is an alternative based on a graphical insight. This method that exploits this graphical insight is to joint f(xl) and f(xu) by a straight line. The fact that the replacement of the curve by a straight line gives a “false position” of the root is the origin of the name, method of false position, or in latin, regula falsi. It is also called the linear interpolation method. Using similar triangles, the intersection of the straight line with the x axis can be estimated as

Bracketing Methods Which can be solved for This is the false-position formula. The value of xr replaces whichever of the two initial guesses, xl or xu, yields a function value with the same sign as f(xr)

Bracketing Methods In this way, the values of xl and xu always bracket the true root. The process is repeated until the root is estimated adequately. The algorithm is presented as follow: Find a pair of values of x, xl and xu such that fl=f(xl) <0 and fu=f(xu) >0. Estimate the value of the root xr and evaluate f(xr). Use the new point to replace one of the original points, keeping the two points on opposite sides of the x axis. If f(xr)<0 then xl=xr == > fl=f(xr) If f(xr)>0 then xu=xr == > fu=f(xr) If f(xr)=0 then you have found the root and need go no further!

Bracketing Methods See if the new xl and xu are close enough for convergence to be declared. If they are not go back to step 2.

Application Problems

Bracketing Methods Example 5.5- False Position: Problem Statement. Use the false-position method to determine the root of the same equation investigated in example 5.1. Solution. As in example 5.3, initiate the computation with guesses of xl=12 and xu=16. First Iteration: Which has a true relative error of 0.89 percent.

Bracketing Methods Second Iteration: Therefore, the root lies in the first interval, and xr becomes the upper limit for the next iteration, xu=14.9113: Which has true and approximate relative error of 0.09 and 0.79 percent.

Homework4  www.bc.inter.edu/facultad/omeza Omar E. Meza Castillo Ph.D.