Lecture 2
Lecture 2
b b 2
4ac
ax bx c 0 x
2
Known 2a
But
ax5 bx4 cx 3 dx2 ex f 0 x ?
sin x x 0 x ?
2
Nonlinear Equation
Solvers
All Iterative
3
BRACKETING METHODS
4
GRAPHICAL METHOD: EXAMPLE 1
Use the graphical approach to determine the drag coefficient needed for a
parachutist with mass m = 68.1 kg to have a velocity of 40 m/s after the free-
falling for t = 10 s. The acceleration due to gravity is 9.81 m/s2. Show step where
you check the answer by substituting c into the original equation.
𝑔𝑚
𝑓 𝑐 = 1−𝑒 −𝑣
𝑐
5
6
THE BISECTION METHOD
For the arbitrary equation of one variable, f(x)=0
1. Pick xl and xu such that they bound the root of interest, check if f(xl).f(xu)
<0.
2. Estimate the root by evaluating f[(xl+xu)/2].
3. Find the pair
• If f(xl). f[(xl+xu)/2]<0, root lies in the lower interval, then xu=(xl+xu)/2 and
go to step 2.
7
• If f(xl). f[(xl+xu)/2]>0, root lies in the upper
interval, then xl= [(xl+xu)/2, go to step 2.
4. Compare s with a
8
EVALUATION OF METHOD
Pros Cons
• Easy • Slow
• Always find root • Know a and b that bound root
• Multiple roots
9
TERMINATION CRITERIA
𝑥 −𝑥
𝜀 = 100%
𝑥
𝑥 = root for the present iteration
𝑥 = root for previous iteration
10
11
EXERCISE 1
1. Determine the root of:
𝑓 𝑥 = −0.5𝑥 + 2.5𝑥 + 4.5
(a) Graphically
(b) Using quadratic formula
(c) Using three iteration of the bisection method. Employ initial guesses of xl=5 and xu=10. Compute the
approximate relative error after each iteration.
12