- Information
- AI Chat
Dr ST-BS401-Numerical Methods-Module-4&5
Civil Engineering (CE)
Anna University
Recommended for you
Preview text
BS4 01 - MODULE – IV & V
NUMERICAL METHODS
Dr. S
Professor
Engineering Mathematics
Faculty of Engineering and Technology
Annamalai University
Annamalai Nagar
Dr S Tamilselvan
NOTES FOR
NUMERICAL
METHODS
Dr S Tamilselvan Dr. S
Annamalai University
####### CONVERGENCE CRITERIA
No. of iterations needed in the bisection method to achieve certain accuracy Consider the interval [a 0 ,b 0 ] ,, c 0 = and let r (a 0 ,b 0 ) be a root then the error is 0 = |r-c 0 |≤ Denote the further intervals as [an,bn] for iteration number “n” then n=|r-cn|≤ ≤ = If the error tolerance is “ ” we require “ n≤ ” then ≤ After taking logarithm log (b 0 -a 0 ) – nlog2 ≤ log (2 ) ( ) – ( ) ≤ n ( ) – ≤ n (which is required)
####### MERITS OF BISECTION METHOD
- The iteration using bisection method always produces a root, since the method brackets the root between two values.
- As iterations are conducted, the length of the interval gets halved. So one can guarantee the convergence in case of the solution of the equation.
- Bisection method is simple to program in a computer.
####### DEMERITS OF BISECTION METHOD
- The convergence of bisection method is slow as it is simply based on halving the interval.
- Cannot be applied over an interval where there is discontinuity.
- Cannot be applied over an interval where the function takes always value of the same sign.
- Method fails to determine complex roots (give only real roots)
- If one of the initial guesses “a 0 ” or “b 0 ” is closer to the exact solution, it will take larger number of iterations to reach the root. Dr S Tamilselvan Annamalai University
EXAMPLE Solve x 3 -9x+1 for roots between x=2 and x= SOLUTION X 2 4 f(x) -9 29 Since f (2). f (4) <0 therefore root lies between 2 and 4 (1) xr = = 3 so f(3) = 1 (+ve) (2) For interval [2,3] ; xr = = 2. f (2) = -5 (-ve) (3) For interval [2,3]; xr = (2+3)/2 = 2. f (2) = -2 (-ve) (4) For interval [2,3]; xr = (2+3)/2 = 2. f (2) = -1 (-ve) (5) For interval [2,3]; xr = (2+3)/2 = 2. f (2) = -0 (-ve) (6) For interval [2,3]; xr = (2+3)/2 = 2. f (2) = +0 (+ve) (7) For interval [2,2]; xr = (2+2)/2 = 2. f (2) = +0 (+ve) (8) For interval [2,2]; xr = (2+2)/2 = 2. f (2) = 0. Hence root is 2. 9453 because roots are repeated. Dr S Tamilselvan Annamalai University
FALSE POSITION METHOD
This method also known as REGULA FALSI METHOD,, CHORD METHOD ,, LINEAR INTERPOLATION and method is one of the bracketing methods and based on intermediate value theorem. This method is different from bisection method. Like the bisection method we are not taking the mid-point of the given interval to determine the next interval and converge faster than bisection method.
####### ALGORITHM
Given a function f(x) continuous on an interval [a 0 ,b 0 ] and satisfying f(a 0 ).f(b 0 )<0 for all n = 0,1,2,3.............. then Use following formula to next root = ( ) ( ) f(xf) We can also use xr = xn+1 ,,, xf = xn ,,, xi = xn-
####### STOPING CRITERIA
- Interval small enough.
- |f(cn)| almost zero
- Maximum number of iteration reached
- Same answer.
- Any combination of previous ones Dr S Tamilselvan Annamalai University
EXAMPLE Using Regula Falsi method Solve x 3 -9x+1 for roots between x=2 and x= SOLUTION X 2 4 f(x) -9 29 Since f(2).f(4)<0 therefore root lies between 2 and 4 Using formula = xf - ( ) ( ) f(xf) For interval [2,4] we have xr ( ) 29 Which implies ( ) (-ve) Similarly, other terms are given below Interval xr F(xr) [2,4] 2 -3. [2,4] 2 -1. [2,4] 2 -0. [2,4] 2 -0. [2,4] 2 -0. [2,4] 2 -0. [2,4] 2 -0. [2,4] 2 -0. [2,4] 2 0. [2,2] 2 -0. [2,2] 2 -0. Dr S Tamilselvan Annamalai University
####### GENERAL FORMULA FOR REGULA FALSI USING LINE EQUATION
Equation of line is ( ) ( ) ( ) Put (x,0) i. y= ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) Hence first approximation to the root of f(x) =0 is given by ( ) ( ) ( ) ( ) We observe that f(xn-1), f(xn+1) are of opposite sign so, we can apply the above procedure to successive approximations. Dr S Tamilselvan Annamalai University
NEWTON RAPHSON METHOD
The Newton Raphson method is a powerful technique for solving equations numerically. It is based on the idea of linear approximation. Usually converges much faster than the linearly convergent methods.
####### ALGORITHM
The steps of Newton Raphson method to find the root of an equation “f(x) =0” are Evaluate ( ) Use an initial guess (value on which f(x) and ( ) becomes (+ve) of the roots “xn” to estimate the new value of the root “xn+1” as
####### ( )
####### ( )
####### STOPING CRITERIA
- Find the absolute relative approximate error as
- Compare the absolute error with the pre-specified relative error tolerance “ s”.
- If | a|> s then go to next approximation. Else stop the algorithm.
- Maximum number of iterations reached.
- Repeated answer.
####### CONVERGENCE CRITERIA
Newton method will generate a sequence of numbers (xn) ; n 0, that converges to the zero “x” of “f” if “f” is continuous. “x” is a simple zero of “f”. “x 0 ” is close enough to “x*” Dr S Tamilselvan Annamalai University
####### INFLECTION POINT
For a function “f(x)” the point where the concavity changes from up-to-down or down-to-up is called its Inflection point. e. f(x) = (x-1) 3 changes concavity at x=1,, Hence (1,0) is an Inflection point.
####### DRAWBACKS OF NEWTON’S RAPHSON METHOD
Method diverges at inflection point. For f(x)=0 Newton Raphson method reduce. So one must be avoid division by zero. Rather method not converges. Root jumping is another drawback. Results obtained from Newton Raphson method may oscillate about the Local Maximum or Minimum without converging on a root but converging on the Local Maximum or minimum. Eventually, it may lead to division by a number close to zero and may diverge. The requirement of finding the value of the derivatives of f(x) at each approximation is either extremely difficult (if not possible) or time consuming. Dr S Tamilselvan Annamalai University
####### FORMULA DARIVATION FOR NR-METHOD
Given an equation “f(x) = 0” suppose “x 0 ” is an approximate root of “f(x) = 0” Let ( ) Where “h” is the small; exact root of f(x)= Then ( ) ( ) By Taylor theorem ( ) ( ) ( ) ( ) Since “h” is small therefore neglecting higher terms we get ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) Similarly ( ) ( ) ( ) ( ) ( ) ( ) This is required Newton’s Raphson Formula. Dr S Tamilselvan Annamalai University
####### EXAMPLE
Apply Newton’s Raphson method for correct to two decimal places.
####### SOLUTION
( ) ( ) ( ) ( ) ( ) For interval X 0 1 2 3 4 5 6 7 f(x) -4 -4 -4 -3 -2 -1 -0 1. Root lies between 6 and 7 and let x 0 = Using formula ( ) ( ) Thus ( ) ( ) ( ) ( ) Similarly n ( ) ( ) 2 6 0 0. Hence root is “6” Dr S Tamilselvan Annamalai University
####### GEOMETRICAL INTERPRETATION (GRAPHICS) OF NEWTON RAPHSON FORMULA
Suppose the graph of function “y=f(x)” crosses x-axis at then is the root of equation ( ).
####### CONDITION
Choose “x 0 ” such that ( ) and ( ) have same sign. If ( ( )) is a point then slope of tangent at ( ( )) ( ( )) ( ) Now equation of tangent is ( ) ( ) ( )( ) .................................................... (i) Since ( ( ) ) as we take x 1 as exact root (i) ( ) ( )( ) ( ) ( ) ( ) ( ) Which is first approximation to the root. If “P 1 ” is a point on the curve corresponding to “x 1 ” then tangent at “P 1 ” cuts x-axis at P 1 (x 2 , 0) which is still closer to “ ” than “x 1 ”. Therefore “x 2 ” is a 2nd approximation to the root. Continuing this process, we arrivDr S Tamilselvane at the root “ ”. Annamalai University
NEWTON SCHEME OF ITERATION FOR FINDING THE “pth” ROOT OF POSITION NUMBER “N” Consider Here ( ) ( ) ( ) ( ) Since by Newton Raphson formula ( ) ( ) ( ) . / [ ]
####### [( ) ] ,
( ) - Required formula for pth root.
####### QUESTION
Obtain the cube root of 12 using Newton Raphson iteration.
####### SOLUTION
Consider Here ( ) and ( ) ( ) For interval X 0 1 2 3 F(x) -12 -11 -4 15 Root lies between 2 and 3 and x 0 = Since by Newton Raphson formula for pth root. , ( ) - 0 ( ) 1 , - Put n=0 [ ] 0 ( ) ( ) 1 Similarly Hence √ Dr S Tamilselvan Annamalai University
THE SOLUTION OF LINEAR SYSTEM OF EQUATIONS
A system of “m” linear equations in “n” unknowns “ ” is a set of the equations of the form .............................................................................................. .............................................................................................. Where the coefficients “ ” and “ ” are given numbers. The system is said to be homogeneous if all the “ ” are zero. Otherwise it is said to be non-homogeneous.
####### SOLUTION OF LINEAR SYSTEM EQUATIONS
A solution of system is a set of numbers “ ” which satisfy all the “m” equations.
####### PIVOTING: Changing the order of equations is called pivoting.
We are interested in following types of Pivoting 1. PARTIAL PIVOTING 2. TOTAL PIVOTING
####### PARTIAL PIVOTING
In partial pivoting we interchange rows where pivotal element is zero. In Partial Pivoting if the pivotal coefficient “ ” happens to be zero or near to zero, the ith column elements are searched for the numerically largest element. Let the jth row (j>i) contains this element, then we interchange the “ith” equation with the “jth” equation and proceed for elimination. This process is continued whenever pivotal coefficients become zero during elimination. Dr S Tamilselvan Annamalai University
Dr ST-BS401-Numerical Methods-Module-4&5
Course: Civil Engineering (CE)
University: Anna University
- Discover more from: