Download presentation
Presentation is loading. Please wait.
1
MATH 2140 Numerical Methods
Faculty of Engineering Mechanical Engineering Department MATH Numerical Methods Instructor: Dr. Phillips Agboola
2
1.Topics to be covered Topics No of Weeks Contacthours
Number Representation and base Number, Error,Sources of Errors 1 3 Nonlinear equations, Simple and Multiple roots of nonlinear equations, numerical methods for simple root (bisection, fixed-point, Newton’s, scant) and multiple (modified) root 2 6 Convergence of iterative methods for nonlinear equations, System of nonlinear equations (Newton’s method) Linear systems, special matrices, direct methods (Gauss-elimination and its variants), LU decomposition) for linear system, norms, iterative methods (Jacobi and Gauss-Seidel), error in linear systems Approximating functions, polynomial interpolation (Lagrange and Newton’s divided differences) formulas, error approximations Numerical differentiations, approximation of first derivative of a function using numerical formulas (two-point and three-point), approximating second derivative of a function using three point formula Numerical integration, using closed Newton’s cotes formula (Trapezoidal and Simpson’s rules) Solution of ordinary differential equations by Taylorand Runge-Kutta method of order 2 Total number of weeks and contact hours per semester 14 42 11/19/2018 Dr. Mohamed Elshazly
3
Proportio n of Final Assessme nt
5. Schedule of Assessment Tasks for Students During the Semester Assessment Assessment task (eg. essay, test, group project, examination etc.) Week due Proportio n of Final Assessme nt 1 Homework Every Week 10% 2 Quizzes Alternatin g 20% 3 Midterm Exam After 7th week 25% 4 Class Participation 5% 5 Final Exam End of Semester 40% 6 11/19/2018 Dr. Mohamed Elshazly
4
1. Required Text(s) Numerical Analysis By R.L.Burden, J.D.Faires (7thedition), Thomos Learning 11/19/2018 Dr. Mohamed Elshazly
5
Introduction 1.1 BACKGROUND
Numerical methods are mathematical techniques used for solving mathematical problems that cannot be solved or are difficult to solve analytically. An analytical solution is an exact answer in the form of a mathematical expression in terms of the variables associated with the problem that is being solved. A numerical solution is an approximate numerical value (a number) for the solution. Although numerical solutions are an approximation, they can be very accurate. In many numerical methods, the calculations are executed in an iterative manner until a desired accuracy is achieved. 11/19/2018 Dr. Mohamed Elshazly
6
For example, Fig. 1-1 shows a block of mass m being pulled by a force F applied at an angle θ By applying equations of equilibrium, the relationship between the force and the angle is given by: 11/19/2018 Dr. Mohamed Elshazly
7
Solving Nonlinear Equations
3.1 BACKGROUND Equations need to be solved in all areas of science and engineering. An equation of one variable can be written in the form: A solution to the equation (also called a root of the equation) is a numerical value of x that satisfies the equation. Graphically, as shown in Fig. 3-1, the solution is the point where the function f(x) crosses or touches the x-axis. An equation might have no solution or can have one or several (possibly many) roots. 11/19/2018 Dr. Mohamed Elshazly
8
To determine the angle θ if As and r are given, Eq. (3.2) has to be
For example, the area of a segment As of a circle with radius r (shaded area in Fig. 3-2) is given by: To determine the angle θ if As and r are given, Eq. (3.2) has to be solved for θ. Obviously, θ cannot be written explicitly in terms of As and r, and the equation cannot be solved analytically. 11/19/2018 Dr. Mohamed Elshazly
9
A numerical solution of an equation f(x) = 0 is a value of x that satisfies the equation approximately. This means that when x is substituted in the equation, the value of f(x) is close to zero, but not exactly zero. For example, to determine the angle θ for a circle with r = 3 m and As = 8 m2, Eq. (3.2) can be written in the form: 11/19/2018 Dr. Mohamed Elshazly
10
A plot of f(θ) (Fig. 3-3) shows that the solution is between 2 and 3.
Substituting θ = 2.4 rad in Eq. (3.3) gives f(θ) = , and the solution θ= 2.43 rad gives f(θ) = Obviously, the latter is a more accurate, but not an exact, solution. It is possible to determine values of θ that give values of f(θ) that are closer to zero, but it is impossible to determine a numerical value of e for which f(θ) is exactly zero. When solving an equation numerically, one has to select the desired accuracy of the solution. 11/19/2018 Dr. Mohamed Elshazly
11
3.3 BISECTION METHOD The bisection method is a bracketing method for finding a numerical solution of an equation of the form f(x) = 0 when it is known that within a given interval [a, b], f(x) is continuous and the equation has a solution. When this is the case, f(x) will have opposite signs at the endpoints of the interval. As shown in Fig. 3-6, if f(x) is continuous and has a solution between the points x = a and x = b , then either f(a) > 0 and f(b) < 0 or f(a) < 0 and f(b) > 0. In other words, if there is a solution between x =a and x = b, then f(a)f(b) < 0 11/19/2018 Dr. Mohamed Elshazly
12
11/19/2018 Dr. Mohamed Elshazly
13
Algorithm for the bisection method
1. Choose the first interval by finding points a and b such that a solution exists between them. This means that f(a) and f(b) have different signs such that f(a)f(b) < 0. The points can be determined by examining the plot of f(x) versus x. 2. Calculate the first estimate of the numerical solution xNs1 by: 3. Determine whether the true solution is between a and xNS1, or between xNs1 and b. This is done by checking the sign of the product f(a) · f(xNsi) : If f(a) · f(xNsi) < 0, the true solution is between a and xNsi· If f(a) · f(xNsi) > 0, the true solution is between xNsi and b. 4. Select the subinterval that contains the true solution (a to x NSI, or xNsi to b) as the new interval [a, b], and go back to step 2. Steps 2 through 4 are repeated until a specified tolerance or error bound is attained. 11/19/2018 Dr. Mohamed Elshazly
14
11/19/2018 Dr. Mohamed Elshazly
15
SOLUTION To find the approximate location of the solution, a plot of the function: f(x) = 8-4.5(x- sinx) is made by using the fplot command of MATLAB. The plot (Fig. 3-8), shows that the solution is between x = 2 and x = 3. The initial interval is chosen as a = 2 and b = 3 . 11/19/2018 Dr. Mohamed Elshazly
16
11/19/2018 Dr. Mohamed Elshazly
17
11/19/2018 Example-1 Find the root of: CISE301_Topic2
18
11/19/2018 Example-1 Iteration a b c= (a+b) 2 f(c) (b-a) 1 0.5 -0.375 0.25 0.266 3 .375 -7.23E-3 0.125 4 0.375 0.3125 9.30E-2 0.0625 5 9.37E-3 CISE301_Topic2
19
EXAMPLE-2
20
EXAMPLE -3
21
EXAMPLE-3
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.