Professional Documents
Culture Documents
Numerical Methods: Dr. Charisma Choudhury
Numerical Methods: Dr. Charisma Choudhury
Numerical Methods
Dr. Charisma Choudhury
Lecture 1
March 30, 2009
Objective
Some of the analysis methods you have
used so far..
Algebra
Calculus
Differential Equations etc.
1 + cos 2 ( x) dx
Large matrices
Practical considerations
Example: Length of a board derived by solving equation:
x 3 - x 2 - 3x + 3=0
How accurately can we measure for practical applications?
Course Outline
Numerical solution of algebraic and
transcendental equations
Solution of systems of linear equations
Linear and non-linear curve-fitting by least
square regression
Finite differences
Divided differences
Interpolation
Numerical differentiation and integration
Numerical solution of differential equations
Course Outline
Numerical solution of algebraic and
transcendental equations
Solution of systems of linear equations
Linear and non-linear curve-fitting by least
square regression
Finite differences
Divided differences
Interpolation
Numerical differentiation and integration
Numerical solution of differential equations
Lecture Plan
Algebraic and transcendental
equations
Curve-fitting
Differential equations
CE applications and review
5 classes
3 classes
4 classes
1 class
References
Any standard undergraduate textbook on
Numerical Methods
Some examples:
Grading Policy
3 quizzes
Tentatively on 5th, 9th and 12th class
Or maybe one computer programming
assignment?
The last one is only a make-up
quiz/assignment
Approach
Often multiple methods for solving same
problem
Which is the most relevant method?
Errors
Abs error = |true-apprx|
Relative= abs error /true
5000+/-0.10
0.005+/-0.1
Significant digits 4
Solution Methods
Background
Different variations (Examples shown
in next page)
Single root
Multiple roots
No root within specified range
1 root
no roots
3 roots
2 roots
Background
Observations
If f(xl) and f(xU) have opposite signs
Odd number of roots in between
Exceptions
Discontinuous function
Discontinuous Function
Deductions
If f(x) is
continuous between xL and xU and
f(xl) * f(xU) <0
(i.e. f(xl) and f(xU) have opposite signs)
There is at least 1 real root f(x)=0 between
xL and xU
10
Example
Tangential functions
can have any number of roots even
irrespective of sign change/unchange
Deductions
If f(x) is
continuous and strictly monotonic between
xL and xU and
f(xl) * f(xU) <0
(i.e. f(xl) and f(xU) have opposite signs)
There is atmost 1 real root f(x)=0 between
xL and xU
11
Steps
Choose xL and xL such that f(xL)*f(xU)<0
Initial estimate of root xR=(xL + xU)/2
f(xR)*f(xL)<0, root is in lower interval,
replace xU by xR
f(xR)*f(xL)>0, root is in upper interval,
replace xL by xR
Terminate when f(xR)=f(xL) or
f(xU)-f(xL)<tolerance
12
Example
f(x)=x3-x-1
x L =1,x U =2
x R=1.5
Solution: x=1.324
xL
xR
1.0000
1.0000
1.2500
1.2500
1.3125
1.3125
1.3125
1.3203
1.3242
xU
1.5000
1.2500
1.3750
1.3125
1.3438
1.3281
1.3203
1.3242
1.3262
2.0000
1.5000
1.5000
1.3750
1.3750
1.3438
1.3281
1.3281
1.3281
f(xL)
-ve
-ve
-ve
-ve
-ve
-ve
-ve
-ve
-ve
f(xR)
+ve
-ve
+ve
-ve
+ve
+ve
-ve
-ve
+ve
f(xU)
+ve
+ve
+ve
+ve
+ve
+ve
+ve
+ve
+ve
DifferenceRemark
1.0000 replace upper
0.5000 replace lower
0.2500 replace upper
0.1250 replace lower
0.0625 replace upper
0.0313 replace upper
0.0156 replace lower
0.0078 replace lower
0.0039 OK at 0.01 tolerance
Note:
OK at 0.01 tolerance. Not ok at 0.001 tolerance, need more iterations.
13
Practice Problems
Find roots of the following in bisection
method
a. e x = Sin(
x
2
b. xe x = 2
14