Lecture notes Numerical Methods

lecture notes numerical methods for partial differential equations and lecture notes on numerical methods in engineering and sciences, lecture notes for statistics and numerical methods pdf free download
Dr.TomHunt Profile Pic
Dr.TomHunt,United States,Teacher
Published Date:23-07-2017
Your Website URL(Optional)
Comment
MA6459 NUMERICAL METHODS Numerical Methods SCE 1 CIVIL ENGINEERING MA6459 NUMERICAL METHODS MA6459 NUMERICAL METHODS L T P C 3 1 0 4 OBJECTIVES: This course aims at providing the necessary basic concepts of a few numerical methods and give procedures for solving numerically different kinds of problems occurring in engineering and technology UNIT I SOLUTION OF EQUATIONS AND EIGENVALUE PROBLEMS 10+3 Solution of algebraic and transcendental equations - Fixed point iteration method – Newton Raphson method- Solution of linear system of equations - Gauss elimination method – Pivoting - Gauss Jordan method – Iterative methods of Gauss Jacobi and Gauss Seidel - Matrix Inversion by Gauss Jordan method - Eigen values of a matrix by Power method. UNIT II INTERPOLATION AND APPROXIMATION 8+3 Interpolation with unequal intervals - Lagrange's interpolation – Newton’s divided difference Interpolation – Cubic Splines - Interpolation with equal intervals - Newton’s forward and backward difference formulae. UNIT III NUMERICAL DIFFERENTIATION AND INTEGRATION 9+3 Approximation of derivatives using interpolation polynomials - Numerical integration using Trapezoidal, Simpson’s 1/3 rule – Romberg’s method - Two point and three point Gaussian Quadrature formulae – Evaluation of double integrals by Trapezoidal and Simpson’s 1/3 rules. UNIT IV INITIAL VALUE PROBLEMS FOR ORDINARY DIFFERENTIALEQUATIONS 9+3 Single Step methods - Taylor’s series method - Euler’s method - Modified Euler’s method – Fourth order Runge-Kutta method for solving first order equations - Multi step methods - Milne’s and Adams-Bash forth predictor corrector methods for solving first order equations. UNIT V BOUNDARY VALUE PROBLEMS IN ORDINARY AND PARTIAL DIFFERENTIAL EQUATIONS 9+3 Finite difference methods for solving two-point linear boundary value problems - Finite difference Techniques for the solution of two dimensional Laplace’s and Poisson’s equations on rectangular Domain – One dimensional heat flow equation by explicit and implicit (Crank Nicholson) methods – One dimensional wave equation by explicit method. TOTAL (L:45+T:15): 60 PERIODS OUTCOMES: The students will have a clear perception of the power of numerical techniques, ideas and would be able to demonstrate the applications of these techniques to problems drawn from industry, management and other engineering fields. TEXT BOOKS: 1. Grewal. B.S., and Grewal. J.S.,"Numerical methods in Engineering and Science", Khanna Publishers, 9th Edition, New Delhi, 2007. 2. Gerald. C. F., and Wheatley. P. O., "Applied Numerical Analysis", Pearson Education, Asia, 6th Edition, New Delhi, 2006. REFERENCES: 1. Chapra. S.C., and Canale.R.P., "Numerical Methods for Engineers, Tata McGraw Hill, 5th Edition, New Delhi, 20072. Brian Bradie. "A friendly introduction to Numerical analysis", Pearson Education, Asia,New Delhi, 2007.3. Sankara Rao. K., "Numerical methods for Scientists and Engineers", Prentice Hall of IndiaPrivate, 3rd Edition, New Delhi, 2007. Contents SCE 3 CIVIL ENGINEERING MA6459 NUMERICAL METHODS UNIT – I Solution of Equations & Eigen Value Problems 7 1.1 Numerical solution of Non-Linear Equations 7 Method of false position 8 Newton Raphson Method 9 Iteration Method 11 1.2 System of Linear Equations 13 Gauss Elimination Method 14 Gauss Jordan Method 15 Gauss Jacobi Method 17 Gauss Seidel Method 19 1.3 Matrix Inversion 20 Inversion by Gauss Jordan Method 21 1.4 Eigen Value of a Matrix 22 Von Mise`s power method 22 Tutorial Problems 24 Question Bank 26 UNIT- II Interpolation and approximation 30 2.1 Interpolation with Unequal Intervals 30 Lagrange`s Interpolation formula 31 Inverse Interpolation by Lagrange`s Interpolation Polynomial 32 2.2 Divided Differences-Newton Divided Difference Interpolation 34 Divided Differences 34 Newtons Divided Difference formula for unequal intervals 35 2.3 Interpolating with a cubic spline 37 Cubic spline interpolation 38 2.4 Interpolation with equals 40 SCE 4 CIVIL ENGINEERING MA6459 NUMERICAL METHODS Newtons` forward interpolation formula 41 Newtons` Backward interpolation formula 41 Tutorial Problems 44 Question Bank 46 UNIT- III Numerical Differentiation and Integration 50 3.1 Numerical Differentiation Derivatives using divided differences 50 Derivatives using finite Differences 51 Newton`s forward interpolation formula 51 Newton`s Backward interpolation formula 51 3.2 Numerical integration 53 Trapezoidal Rule 53 Simpson`s 1/3 Rule 54 Simpson`s 3/8 Rule 55 Romberg`s intergration 56 3.3 Gaussian quadrature 58 Two Point Gaussian formula & Three Point Gaussian formula 59 3.4 Double integrals 60 Trapezoidal Rule & Simpson`s Rule 61 Tutorial Problems 65 Question Bank 66 UNIT – IV Numerical solution of Ordinary Differential Equation 67 4.1 Taylor`s Series Method 67 Power Series Solution 67 Pointwise Solution 68 Taylor series method for Simultaneous first order Differential equations 70 SCE 5 CIVIL ENGINEERING MA6459 NUMERICAL METHODS 4.2 Euler Methods 72 Euler Method 73 Modified Euler Method 74 4.3 Runge – Kutta Method 74 Fourth order Runge-kutta Method 75 Runge-Kutta Method for second order differential equations 76 4.4 Multi-step Methods 78 Milne`s Method 79 Adam`s Method 80 Tutorial Problems 84 UNIT – V Boundary Value Problems in ODE & PDE 87 5.1 Solution of Boundary Value Problems in ODE 87 5.2 Solution of Laplace Equation and Poisson Equation 90 Solution of Laplace Equation – Leibmann`s iteration process 91 Solution of Poisson Equation 92 5.3 Solution of One Dimensional Heat Equation 95 Bender-Schmidt Method 96 Crank- Nicholson Method 97 5.4 Solution of One Dimensional Wave Equation 99 Tutorial Problems 101 Question Bank 106 Previous year University Question paper 107 SCE 6 CIVIL ENGINEERING MA6459 NUMERICAL METHODS CHAPTER -1 SOLUTION OF EQUATIONS AND EIGENVALUE PROBLEMS 1.1 Numerical solution of Non-Linear equations Introduction The problem of solving the equation is of great importance in science and Engineering. In this section, we deal with the various methods which give a solution for the equation Solution of Algebraic and transcendental equations The equation of the form f(x) =0 are called algebraic equations if f(x) is purely a polynomial in x.For example: are algebraic equations . If f(x) also contains trigonometric, logarithmic, exponential function etc. then the equation is known as transcendental equation. Methods for solving the equation The following result helps us to locate the interval in which the roots of Method of false position. Iteration method Newton-Raphson method Method of False position (Or) Regula-Falsi method (Or) Linear interpolation method In bisection method the interval is always divided into half. If a function changes sign over an interval, the function value at the mid-point is evaluated. In bisection method the interval from a to b into equal intervals ,no account is taken of the magnitude of .An alternative method that exploits this graphical insights is to join by a straight line.The intersection of this line with the X-axis represents an improved estimate of the root.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. Problems 1. Find a real root of that lies between 2 and 3 by the method of false position and correct to three decimal places. Sol: Let The root lies between 2.5 and 3. The approximations are given by af (b) bf (a) x f (b) f (a) Iteration(r) a b x f(x ) r r SCE 7 CIVIL ENGINEERING MA6459 NUMERICAL METHODS 2.5 3 2.9273 -0.2664 1 2.9273 3 2.9423 -0.0088 2 2.9423 3 3 2.9425 -0.0054 4 2.9425 3 2.9425 0.003 2. Obtain the real root of ,correct to four decimal places using the method of false position. Sol: Given Taking logarithmic on both sides, x log x 2 10 f (x) xlog x 2 10 f (3.5) 0.0958 0 and f (3.6) 0.00027 0 The roots lies between 3.5 and 3.6 af (b) bf (a) The approximation are given by x f (b) f (a) Iteration(r) a b x f(x ) r r 1 3.5 3.6 3.5973 0.000015 2 3.5 3.5973 3.5973 0 The required root is 3.5973 Exercise: 1. Determine the real root of correct to four decimal places by Regula-Falsi method. Ans: 1.0499 2. Find the positive real root of correct to four decimals by the method of False position . Ans: 1.8955 3.Solve the equation by Regula-Falsi method,correct to 4 decimal places. Ans: 2.7984 Newton’s method (or) Newton-Raphson method (Or) Method of tangents SCE 8 CIVIL ENGINEERING MA6459 NUMERICAL METHODS This method starts with an initial approximation to the root of an equation, a better and closer approximation to the root can be found by using an iterative process. Derivation of Newton-Raphson formula Let be the root of and x be an approximation to .If h x f (x) 0 0 0 Then by the Tayor’s series f (x ) i x x ,i=0,1,2,3,……… i 1 i f (x ) i Note: The error at any stage is proportional to the square of the error in the previous stage. The order of convergence of the Newton-Raphson method is at least 2 or the convergence of N.R method is Quadratic. Problems 1.Using Newton’s method ,find the root between 0 and 1 of correct five decimal places. Sol: Given 3 f (x) x 6x 4 2 f (x) 3x 6 By Newton-Raphson formula, we have approximation f (x ) i x x , n 0,1,2,3..... i 1 i f (x ) i x 0.5 The initial approximation is 0 First approximation: f (x ) 0 x x , 1 0 f (x ) 0 1.125 0.5 , 5.25 =0.71429 Second approximation: SCE 9 CIVIL ENGINEERING MA6459 NUMERICAL METHODS f (x ) 1 x x , 2 1 f (x ) 1 0.0787 0.71429 , 4.4694 =0.7319 Third approximation f (x ) 2 x x , 3 2 f (x ) 2 0.0006 0.73205 , 4.3923 =0.73205 Fourth approximation f (x ) 3 x x , 4 3 f (x ) 3 0.000003 0.73205 , 4.3923 =0.73205 The root is 0.73205, correct to five decimal places. 2. Find a real root of x=1/2+sinx near 1.5, correct to 3 decimal places by newton-Rapson method. Sol: 1 f (x) x sin x 2 Let f (x) 1 cosx By Newton-Raphson formula, we have approximation f (x ) i x x , n 0,1,2,3..... i 1 i f (x ) i sin x 0.5 x cos x n n n x ,n 0,1,2,3,.... n 1 1 cos x n Let x 1.5be the initial approximation 0 First approximation: SCE 10 CIVIL ENGINEERING MA6459 NUMERICAL METHODS (1.5 sin(1.5) 0.5) x 1.5 1 1 cos1.5 (0.0025 ) 1.5 (0.9293 ) =1.497 Second approximation: ( 0.00028) x 1.497 1 0.9263 =1.497. The required root is 1.497 Exercise: x 1. Find the real root of e 3x ,that lies between 1 and 2 by Newton’s method ,correct to 4 decimal places. Ans:1.5121 2.Use Newton-Raphson method to solve the equation 3x cosx 1 0 Ans:0.6071 3 2 3.Find the double root of the equation x x x 1 0 by Newton’s method. Ans: 0.03226 Iteration method (Or) Method of successive approximations(Or)Fixed point method For solving the equation by iteration method, we start with an approximation f (x) 0 value of the root.The equation f (x) 0 is expressed as x (x) .The equation x (x) is called fixed point equation.The iteration formula is given by x (x ), n 0,1,2,..... called fixed point iteration n 1 n formula. Theorem(Fixed point theorem) Let f (x) 0be the given equation whose exact root is . The equation f (x) 0 be rewritten as x . x (x) .Let I be the interval containing the root If (x) 1 for all x in I, then the sequence of Approximation x , x , x ,..... x will converges to . ,If the initial starting value x is chosen in I. 1 2 3 n 0 SCE 11 CIVIL ENGINEERING MA6459 NUMERICAL METHODS The order of convergence Theorem ( p 1) ( p) g ( ) 0, g ( ) 0,....... g ( ) 0andg ( ) 0 Let . be a root of the equation x g(x) .If .then the convergence of iteration x g(x ) is of order p. i 1 i Note The order of convergence in general is linear (i.e) =1 Problems 3 2 1.Solve the equation x x 1 0 or the positive root by iteration method ,correct to four decimal places. Sol: 3 2 f (x) x x 1 f (0) 1 0andf (1) 1 0 The root lies between 0 and 1. 3 2 2 x x 1 0 x (1 x) 1 1 x 1 x 1 The given equation can be expressed as (x) 1 x 1 (x) 3 2 2(1 x) 1 (x) 3 2 2(1 x) 1 1 (0) and (1) 1 2 4 2 1 (x) 3 2 2(1 x) (x) 1 x (0,1) Choosing x 0.75 ,the successive approximations are 0 SCE 12 CIVIL ENGINEERING MA6459 NUMERICAL METHODS 1 x 1 1 0.75 =0.75593 x 0.75465 2 x 0.75463 3 x 0.75487 4 x 0.75488 5 x 0.75488 6 Hence the root is 0.7549 Exercise: 1. Find the cube root of 15, correct to four decimal places, by iteration method Ans: 2.4662 1.2 System of linear equation Introduction Many problems in Engineering and science needs the solution of a system of simultaneous linear equations .The solution of a system of simultaneous linear equations is obtained by the following two types of methods Direct methods (Gauss elimination and Gauss Jordan method) Indirect methods or iterative methods (Gauss Jacobi and Gauss Seidel method) (a) Direct methods are those in which The computation can be completed in a finite number of steps resulting in the exact solution The amount of computation involved can be specified in advance. The method is independent of the accuracy desired. (b) Iterative methods (self correcting methods) are which Begin with an approximate solution and Obtain an improved solution with each step of iteration But would require an infinite number of steps to obtain an exact solution without round-off errors The accuracy of the solution depends on the number of iterations performed. SCE 13 CIVIL ENGINEERING MA6459 NUMERICAL METHODS Simultaneous linear equations x , x , x ,..... x The system of equations in n unknowns 1 2 3 n is given by a x a x .......... a x b 11 1 12 2 1n n 1 a x a x .......... a x b 21 1 22 2 2n n 2 ………………………………………………………… …………………………………………………………. …………………………………………………………. a x a x .......... a x b n1 1 n2 2 mn n n T T This can be written as where A a ; X x , x , x ,.....x ;B b ,b ,b ,....b . AX B ij 1 2 3 n 1 2 3 n n n This system of equations can be solved by using determinants (Cramer’s rule) or by means of matrices. These involve tedious calculations. These are other methods to solve such equations .In this chapter we will discuss four methods viz. (i) Gauss –Elimination method (ii) Gauss –Jordan method (iii) Gauss-Jacobi method (iv) Gauss seidel method  Gauss-Elimination method This is an Elimination method and it reduces the given system of equation to an equivalent upper triangular system which can be solved by Back substitution. Consider the system of equations a x a x a x b 11 1 12 2 13 3 1 a x a x a x b 21 1 22 2 23 3 2 a x a x a x b 31 1 32 2 33 3 3 Gauss-algorithm is explained below: Step 1. Elimination of x from the second and third equations .If a 0, the first equation is 1 11 used to eliminate x from the second and third equation. After elimination, the reduced system is 1 SCE 14 CIVIL ENGINEERING MA6459 NUMERICAL METHODS a x a x a x b 11 1 12 2 13 3 1 a x a x b 22 2 23 3 2 a x a x b 32 2 33 3 3 Step 2: x a 0, x Elimination of from the third equation. If We eliminate from third equation and 2 22 2 the reduced upper triangular system is a x a x a x b 11 1 12 2 13 3 1 a x a x b 22 2 23 3 2 a x b 33 3 3 Step 3: x x From third equation is known. Using in the second equation x is obtained. using both 3 3 2 x x x And in the first equation, the value of is obtained. 2 3 1 Thus the elimination method, we start with the augmented matrix (A/B) of the given system and transform it to (U/K) by eliminatory row operations. Finally the solution is obtained by back substitution process. Principle Gauss e lim ination (A/ B) (U / K) 2. Gauss –Jordan method This method is a modification of Gauss-Elimination method. Here the elimination of unknowns is performed not only in the equations below but also in the equations above. The co-efficient matrix A of the system AX=B is reduced into a diagonal or a unit matrix and the solution is obtained directly without back substitution process. Gauss Jordan (A/ B) (D / K)or(I / K) Examples 1.Solve the equations by (1)Gauss –Elimination 2x y 4z 12,8x 3y 2z 20,4x 11y z 33 method (2) Gauss –Jordan method Sol: SCE 15 CIVIL ENGINEERING MA6459 NUMERICAL METHODS (i)Gauss-Elimination method The given system is equivalent to AX B where and Principle. Reduce to = From this ,the equivalent upper triangular system of equations is 2x y 4z 12 7y 14z 28 27z 27 z=1,y=2,x=3 By back substitution. The solution is x=3,y=2,z=1 (ii)Gauss –Jordan method Principle. Reduce to SCE 16 CIVIL ENGINEERING MA6459 NUMERICAL METHODS From this ,we have y = 2 z=1 Exercise 1. Solve the system by Gauss –Elimination method5x y 2z 142, x 3y z 30,2x y 3z 5. Ans: x= 39.3345;y=16.793;z=18.966 2. Solve the equations x y z 9,2x 3y 4z 13,3x 4y 5z 40 by (1) Gauss –Elimination method (2) Gauss –Jordan method Ans: x=1; y=3; z=5 Iterative method These methods are used to solve a special of linear equations in which each equation must possess one large coefficient and the large coefficient must be attached to a different unknown in that equation.Further in each equation, the absolute value of the large coefficient of the unknown is greater than the sum of the absolute values of the other coefficients of the other unknowns. Such type of simultaneous linear equations can be solved by the following iterative methods. Gauss-Jacobi method Gauss seidel method SCE 17 CIVIL ENGINEERING MA6459 NUMERICAL METHODS a x b y c z d 1 1 1 1 a x b y c z d 2 2 2 2 a x b y c z d 3 3 3 3 i.e., the co-efficient matrix is diagonally dominant. Solving the given system for x,y,z (whose diagonals are the largest values),we have 1 x d b y c z 1 1 1 a 1 1 y d a x c z 2 2 2 b 2 1 z d a x b y 3 3 3 c 3 Gauss-Jacobi method (r) (r) (r) th If the r iterates are x , y , z ,then the iteration scheme for this method is 1 (r 1) (r) (r) x (d b y c z ) 1 1 1 a 1 1 (r 1) (r) (r) y (d a x c z ) 2 2 2 b 2 1 (r 1) (r) (r) z (d a x b y ) 3 3 3 c 3 The iteration is stopped when the values x, y, z start repeating with the desired degree of accuracy. Gauss-Seidel method This method is only a refinement of Gauss-Jacobi method .In this method ,once a new value for a unknown is found ,it is used immediately for computing the new values of the unknowns. th If the r iterates are, then the iteration scheme for this method is 1 (r 1) (r ) (r) x (d b y c z ) 1 1 1 a 1 1 (r 1) (r 1) (r) y (d a x c z ) 2 2 2 b 2 1 (r 1) (r 1) (r 1) z (d a x b y ) 3 3 3 c 3 Hence finding the values of the unknowns, we use the latest available values on the R.H.S The process of iteration is continued until the convergence is obtained with desired accuracy. SCE 18 CIVIL ENGINEERING MA6459 NUMERICAL METHODS Conditions for convergence Gauss-seidel method will converge if in each equation of the given system ,the absolute values o the largest coefficient is greater than the absolute values of all the remaining coefficients n a a i 1,2,3......... n ii ij j 1, j 1 This is the sufficient condition for convergence of both Gauss-Jacobi and Gauss-seidel iteration methods. Rate of convergence The rate of convergence of gauss-seidel method is roughly two times that of Gauss-Jacobi method. Further the convergences in Gauss-Seidel method is very fast in gauss-Jacobi .Since the current values of the unknowns are used immediately in each stage of iteration for getting the values of the unknowns. Problems 1.Solve by Gauss-Jacobi method, the following system 28x 4y z 32, x 3y 10z 24,2x 17y 4z 35 Sol: Rearranging the given system as 28x 4y z 32 2x 17y 4z 35 x 3y 10z 24 The coefficient matrix is is diagonally dominant. Solving for x,y,z ,we have We start with initial values = The successive iteration values are tabulated as follows SCE 19 CIVIL ENGINEERING MA6459 NUMERICAL METHODS Iteration X Y Z 1 1.143 2.059 2.400 2 0.934 1.360 1.566 3 1.004 1.580 1.887 4 0.983 1.508 1.826 5 0.993 1.513 1.849 6 0.993 1.507 1.847 7 0.993 1.507 1.847 X=0.993;y=1.507;z=1.847 2.Solve by Gauss-Seidel method, the following system 27x 6y z 85;6x 15y 2z 72, x y 54z 110 Sol: The given system is diagonally dominant. Solving for x,y,z, we get We start with initial values = The successive iteration values are tabulated as follows Iteration X Y Z 1 3.148 3.541 1.913 2 2.432 3.572 1.926 3 2.426 3.573 1.926 4 2.425 3.573 1.926 5 2.425 3.573 1.926 X=2.425;y=3.573;z=1.926 Exercise: 1.Solve by Gauss-Seidel method, the following system 10x 2y z 9;2x 30 y 2z 44, 2x 3y 10z 22 Ans : x 0.89; y 1.341; z 2.780 SCE 20 CIVIL ENGINEERING MA6459 NUMERICAL METHODS 2.Solve by Gauss-Seidel method and Gauss-Jacobi method, the following system 30x 2y 3z 75;2x 2y 18z 30, x 17 y 2z 48 Ans : (i)x 1.321; y 1.522; z 3.541(ii)x 2.580; y 2.798; z 1.069 1.3 Matrix inversion Introduction A square matrix whose determinant value is not zero is called a non-singular matrix. Every non- singular square matrix has an inverse matrix. In this chapter we shall find the inverse of the non-singular square matrix A of order three. If X is the inverse of A, Then Inversion by Gauss-Jordan method By Gauss Jordan method, the inverse matrix X is obtained by the following steps:  Step 1: First consider the augmented matrix  Step 2: Reduce the matrix A in to the identity matrix I by employing row transformations. -1 The row transformations used in step 2 transform I to A -1 -1 Finally write the inverse matrix A .so the principle involved for finding A is as shown below Note The answer can be checked using the result Problems 1.Find the inverse of by Gauss-Jordan method. Sol: SCE 21 CIVIL ENGINEERING

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.