MATH - 321: Numerical Methods: Topic 1
MATH - 321: Numerical Methods: Topic 1
Topic 1:
Introduction to Numerical Methods
Lectures 1-4:
1
Lecture 1
Introduction to Numerical
What are NUMERICAL METHODS?
Methods
Why do we need them?
Topics covered in MATH-321.
2
Numerical Methods
Numerical Methods:
Algorithms that are used to obtain numerical solutions of a
mathematical problem.
Why do we need them?
1. No analytical solution exists,
2. An analytical solution is difficult to obtain
or not practical.
3
What do we need?
Basic Needs in the Numerical Methods:
• Practical:
Can be computed in a reasonable amount of time.
• Accurate:
• Good approximate to the true value,
• Information about the approximation error (Bounds, error
order,… ).
4
Outlines of the Course
• Taylor Theorem • Solution of linear Equations
• Number Representation • Least Squares curve fitting
• Solution of nonlinear • Solution of ordinary
Equations differential equations
• Interpolation • Solution of Partial differential
• Numerical Differentiation equations
• Numerical Integration
5
Solution of Nonlinear Equations
• Some simple equations can be solved analytically:
x2 4x 3 0
4 4 2 4(1)(3)
Analytic solution roots
2(1)
x 1 and x 3
6
Methods for Solving Nonlinear
Equations
o Bisection Method
o Newton-Raphson Method
o Secant Method
7
Solution of Systems of Linear Equations
x1 x2 3
x1 2 x2 5
We can solve it as :
x1 3 x2 , 3 x2 2 x2 5
x2 2, x1 3 2 1
What to do if we have
1000 equations in 1000 unknowns.
8
Cramer’s Rule is Not Practical
Cramer' s Rule can be used to solve the system :
3 1 1 3
5 2 1 5
x1 1, x2 2
1 1 1 1
1 2 1 2
10
Curve Fitting
• Given a set of data:
x 0 1 2
y 0.5 10.3 21.3
• Select a curve that best fits the data. One choice is to find the curve
so that the sum of the square of the error is minimized.
11
Interpolation
• Given a set of data:
xi 0 1 2
yi 0.5 10.3 15.3
o Interpolation
o Newton Polynomial Interpolation
o Lagrange Interpolation
13
Integration
• Some functions can be integrated analytically:
3 3
1 2 9 1
1 xdx 2 x 1 2 2 4
But many functions have no analyticalsolutions :
a
e
x2
dx ?
0
14
Methods for Numerical Integration
o Upper and Lower Sums
o Trapezoid Method
o Romberg Method
o Gauss Quadrature
15
Solution of Ordinary Differential Equations
A solution t o the differenti al equation :
x(t ) 3 x (t ) 3 x(t ) 0
x (0) 1; x(0) 0
is a function x(t) that satisfies the equations.
16
Solution of Partial Differential Equations
2 2
u u
2
2
20
x t
u (0, t ) u (1, t ) 0, u ( x,0) sin(x)
17
Summary
Topics Covered in the Course
• Numerical Methods: • Solution of Nonlinear Equations
Algorithms that are used to • Solution of Linear Equations
obtain numerical solution of a
mathematical problem. • Curve Fitting
• We need them when • Least Squares
• Interpolation
No analytical solution exists
or it is difficult to obtain it. • Numerical Integration
• Numerical Differentiation
• Solution of Ordinary Differential
Equations
• Solution of Partial Differential Equations
18