Introduction To Numerical Methods: Grading System

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

Introduction to

Numerical Methods
•3 units
•2 hours lecture and 3 hours
laboratory per week
•Pre-requisites:
•CSC 101 - Introduction to Computer
Programming
•ES 81 - Mathematical Methods of
Engineering
•Text Book: Numerical Methods for
Engineers
by Chapra and Canale
Grading System
Lecture (2 units or 66.67% of the course):
• Exam 1 25%
• Exam 2 25%
• Exam 3 30%
• Quiz/Seatworks/Boardworks 15%
• Attendance 5%
Total = 100% Laboratory (1 unit or 33.33%
of the course):
• Laboratory/Machine Problems 75%
• Case Study 25% Total = 100% Passing
grade point: 60 = 3.00

Why numerical
methods?
•Analytical method have limitations in

case of nonlinear problem in such

cases numerical methods works very


well.
•Numerical method gives us
APPROXIMATE solution not EXACT

solution
• The analytic solution is to know absolutely
how the model will behave under any

circumstances. But it works only for simple

models.
• Many systems possess complex
functionality that it is hard to track the

system behaviour by formulas. We turn to

numerical methods for solving the equations

and a computer must be used to perform the

thousands of repetitive calculations to give


the solution.
Topics
• Roots of Equation
• Solution to Systems of Linear Equations
• Optimization
• Curve Fitting
• Differentation
• Integration

ROOTS OF
EQUATION
Roots of Equation
Bracketing Methods
•Bisection Method
•False Position Method
•Modified False Position Method
Open Methods
• Simple Fixed-point Iteration
• Newton-Raphson Mehtod
• Secant Method
• Bairstow's Method (Specific for
Polynomial)
Bisection Method
• Known as binary chopping
• incremental search method locates the

interval where the function changes sign

by dividing the interval into half.


• The method uses an initial bracket [ xl
xu] that contains the root x.
• By continuously bisecting the bracket,
the midpoint xr of the bisection

approximates the root x of the function.


Bisection Method
Example
2
f x = x − 3x + 1
Step 1: Make an initial guess of an interval
[xl xu] that necessarily contains the first root,
say, [0 1]
Step 2: Bisect the interval and locate the

midpoint, xr = (xl + xu)/2.

Step 3: Solve for f(xl), f(xu) and f(xr): (as

shown below)
xl xr xu f xl f xr f(xu)
1st iteration 0 0.5000 1.0000 1.0000
-0.2500 -1.0000
Example(cont.)
Step 4: We must choose the interval
for the next iteration from between the
two subintervals [xl xr] and [ xr xu ].
Example(cont.)
xl xr xu f xl f xr f(xu)
1st iteration 0 0.5000 1.0000 1.0000
-0.2500 -1.0000
2nd iteration 0 0.5000
Example(cont.)xl xr xu f xl f xr f(xu) 1st
iteration 0 0.5000 1.0000 1.0000 -0.2500
-1.0000
2nd iteration 0 0.2500 0.5000 1.0000
0.3125 -0.2500
3rd iteration 0.2500 0.3750 0.5000 0.3125
0.0156 -0.2500
4th iteration 0.3750 0.4375 0.5000 0.0156
-0.1211 -0.2500
5th iteration 0.3750 0.4063 0.4375 0.0156
-0.0537 -0.1211
When to stop?
Stopping Criterion and Error
Estimates
) ( s a ε ε < Stop if
xl xr xu f xl f xr f xu εa
0 0.5000 1.0000 1.0000 -0.2500 -1.0000
0 0.2500 0.5000 1.0000 0.3125 -0.2500 100%
0.2500 0.3750 0.5000 0.3125 0.0156 -0.2500
0.3750 0.4375 0.5000 0.0156 -0.1211 -0.2500
0.3750 0.4063 0.4375 0.0156 -0.0537 -0.1211
0.3750 0.3906 0.4063 0.0156 -0.0193 -0.0537
0.3750 0.3828 0.3906 0.0156 -0.0019 -0.0193
0.3750 0.3789 0.3828 0.0156 0.0069 -0.0019
0.3789 0.3809 0.3828 0.0069 0.0025 -0.0019
0.3809 0.3818 0.3828 0.0025 0.0003 -0.0019
0.3818 0.3823 0.3828 0.0003 -0.0008 -0.0019
0.3818 0.3821 0.3823 0.0003 -0.0003 -0.0008
0.3818 0.3820 0.3821 0.0003 0.0000 -0.0003

Example(cont.)xl xr xu f xl f xr f(xu) 1st


iteration 0 0.5000 1.0000 1.0000 -0.2500
-1.0000
2nd iteration 0 0.2500 0.5000 1.0000
0.3125 -0.2500
3rd iteration 0.2500 0.3750 0.5000 0.3125
0.0156 -0.2500
4th iteration 0.3750 0.4375 0.5000 0.0156
-0.1211 -0.2500
5th iteration 0.3750 0.4063 0.4375 0.0156
-0.0537 -0.1211
➢ After 5 iterations we will get: xr=0.4063 (5th
iteration) ➢ |f(x)|<0.1 we get: xr=0.3750 (3rd
iteration) ➢ we continue with more iterations, we
will reach xr=0.3820, which is the true value of
the
first root
ADVANTAGES
• Always convergent
• The root bracket gets halved with each iteration -
guaranteed.
25

Drawbacks∎ Slow convergence


∎If one of the initial guesses is
close to the
root, the convergence is slower
26

Drawbacks (continued)
• If a function f(x) is such that it just touches the x-

axis it will be unable to find the lower and upper

guesses.
f(x)

()2
x xxf =
27

Drawbacks (continued)
∎ Function changes sign but root
does not exist
f(x)

xf ( )=
1
x x

28

“Relay Race Games”


1. Group yourself into 5 2. Get 1⁄2 sheet of
paper and fill in the Team Member Details
Name of Team:
S/n Name Team Role

“Relay Race Games” (cont.) 3.


Group should fall in line. 4. Each member
will answer the problem in iterative manner
(as shown in figure). note: Each member
should have their own calculator. Borrowing of

calculator is prohibited.
1stiteration - member 1
2nd iteration - member 2
3rd iteration - member 3 4th iteration -
member 4
5th iteration - member 5
“Relay Race Games” (cont.)
5. Each member will only be given 60
seconds to solve and write his/her answer

on the board. 6. Group who got the correct


answer FIRST wins the game.

Iteration xl xr xu f xl f xr f xu 12..n
Question
2
•Solve for the root of f x = 3x + x
− 3.
•Assume that the root are
bounded by ± [0 1].
•Stopping criterion: f x = 0.1
Answer:
xl xr xu f xl f xr f(xu) 0.0000 0.5000
1.0000 -3.0000 -1.7500 1.0000
0.5000 0.7500 1.0000 -1.7500
-0.5625 1.0000 0.7500 0.8750
1.0000 -0.5625 0.1719 1.0000
0.7500 0.8125 0.8750 -0.5625
-0.2070 0.1719 0.8125 0.8438
0.8750 -0.2070 -0.0205 0.1719
False Position Method
False Position Method
• f(xu) and f(xl) is connected by a straight

line.

• The intersection of the line to the x-axis is

the “false position”. “regula falsi” in latin.


Using Similar triangles:

Example
2
f x = x − 3x + 1
Step 1: Make an initial guess of an interval
[xl xu] that necessarily contains the first root,
say, [0 1]
f(x )
Step 2: Locate the midpoint, xr = xu − u
(x −x )
l u f xl −f(xu)

Step 3: Solve for f(xl), f(xr) and f(xu): (as

shown below)
xl xr xu f xl f xr f(xu) 1st iteration 0
0.5000 1.0000 1.0000 -0.2500
-1.0000
Example(cont.)
Step 4: We must choose the interval
for the next iteration from between the

two subintervals [xl xr] and [ xr xu ].

Example(cont.)xl xr xu f xl f xr f(xu)
1st iteration 0 0.5000 1.0000 1.0000
-0.2500 -1.0000
2nd iteration 0 0.4000

Example(cont.)xl xr xu f xl f xr f(xu)
1st iteration 0 0.5000 1.0000 1.0000
-0.2500 -1.0000
2nd iteration 0 0.4000 0.5000 1.0000
-0.0400 -0.2500
3rd iteration 0 0.3846 0.4000 1.0000
-0.0059 -0.0400
4th iteration 0 0.3824 0.3846 1.0000
-0.0009 -0.0059
5th iteration 0 0.3820 0.3824 1.0000
-0.0001 -0.0009
➢ After 5 iterations we will get: xr= 0.3820 (5th
iteration) ➢ |f(x)|<0.1 we get: xr=0.4000 (2nd
iteration) ➢ we continue with more iterations, we
will reach xr=0.3820, which is the true value of
the
first root
“RELAY RACE GAME 2”
1. Group yourself into 5 2. Get 1⁄2 sheet of
paper and fill in the Team Member Details
Name of Team:
S/n Name Team Role

“RELAY RACE GAME 2”(cont.)


3. Group should fall in line. 4. Each member
will answer the problem in iterative manner
(as shown in figure). note: Each member
should have their own calculator. Borrowing of

calculator is prohibited.
1stiteration - member 1
2nd iteration - member 2
3rd iteration - member 3 4th iteration -
member 4
5th iteration - member 5
“RELAY RACE GAME 2”(cont.)
5. Each member will only be given 60
seconds to solve and write his/her answer

on the board. 6. Group who got the correct


answer FIRST wins the game.
Question
2
•Solve for the root of f x = 3x + x
− 3.
•Assume that the root are
bounded by ± [0 1].
•Stopping criterion: until
5thiteration.
Answer:
xl xr xu f xl f xr f(xu) 0.0000 0.7500
1.0000 -3.0000 -0.5625 1.0000
0.7500 0.8400 1.0000 -0.5625
-0.0432 1.0000 0.8400 0.8466
1.0000 -0.0432 -0.0030 1.0000
0.8466 0.8471 1.0000 -0.0030
-0.0002 1.0000 0.8471 0.8471
1.0000 -0.0002 -0.0000 1.0000
: Reflection Question
• What was the most important thing you learned
during this class today?
• What questions remained unanswered in your
mind today?
• Of the concepts we learned today, what would you
NOT like to have on the exam?
• The clearest point of today’s class was:
• Summarize the main point of today’s lecture in one
sentence.
• What was the most useful or meaningful thing you
learned from this assignment?
• How I prepared for class today:
• What I liked best that helped me learn:
• One thing that I wish had been discussed during
today’s class is:
• How do you think you will use what we learned
today in your everyday life?
FULL CUSTOM IC LAYOUT DESIGN
MSU - Iligan Institute of Technology

You might also like