Sie sind auf Seite 1von 38

CIVE 320

Numerical Methods
Department of Civil Engineering and Applied Mechanics

Solutions to Nonlinear Equations


References: Gilat and Subramaniam (2014); Chapra (2012)

2017-09- Numerical Methods 1


06
Solving nonlinear equations with
numerical methods

Bisection method Newton Raphson Method


False position method Secant Method
Fixed point iteration method

2017-09- Numerical Methods 2


18
Bracketing methods Open methods
An interval that includes the An initial estimate (one point) for the
solution is identified solution is assumed

2017-09- Numerical Methods 3


18
Solving nonlinear equations with
numerical methods

Bisection method Newton Raphson Method


False position method Secant Method
Fixed point iteration method

2017-09- Numerical Methods 4


18
Bisection Method
The bisection method is a root finding
algorithm, which repeatedly bisects an
interval, then selects a subinterval in
which a root must lie for further
processing.

Advantage: Very simple and robust

Disadvantage:
Relatively slow
May fail when the function is tangent
to the axis and does not cross the x-
axis at f(x)=0

2017-09- Numerical Methods 5


18
Solving nonlinear equations with
numerical methods

Bisection method Newton Raphson Method


False position method Secant Method
Fixed point iteration method

2017-09- Numerical Methods 6


18
False position method

The false position method is a root finding algorithm, which uses a


straight line to trace the solution of an equation within an interval

Advantage: Typically converges faster compared to bisection


method

2017-09- Numerical Methods 7


18
False position method

Point-slope form
y-y1=m(x-x1)

2017-09- Numerical Methods 8


18
False position method/steps

2017-09- Numerical Methods 9


18
False position method parachute problem
+1
. = 100

# c1 f(c1) c2 f(c2) c3 f(c3) Tolerance (%)


0 1 51.2349 20.0000 -8.3951 17.3251 -4.4964 -
1 1 51.2349 17.3251 -4.4964 16.0080 -2.2729 7.6023
2 1 51.2349 16.0080 -2.2729 15.3705 -1.1137 3.9824
3 1 51.2349 15.3705 -1.1137 15.0647 -0.5371 1.9890
4 1 51.2349 15.0647 -0.5371 14.9188 -0.2571 0.9686
5 1 51.2349 14.9188 -0.2571 14.8493 -0.1226 0.4658
6 1 51.2349 14.8493 -0.1226 14.8163 -0.0583 0.2226
7 1 51.2349 14.8163 -0.0583 14.8006 -0.0277 0.1061
8 1 51.2349 14.8006 -0.0277 14.7931 -0.0132 0.0505
9 1 51.2349 14.7931 -0.0132 14.7895 -0.0063 0.0240
10 1 51.2349 14.7895 -0.0063 14.7879 -0.0030 0.0114
11 1 51.2349 14.7879 -0.0030 14.7871 -0.0014 0.0054
12 1 51.2349 14.7871 -0.0014 14.7867 -0.0007 0.0026
13 1 51.2349 14.7867 -0.0007 14.7865 -0.0003 0.0012
14 1 51.2349 14.7865 -0.0003 14.7864 -0.0002 0.0006
2017-09- Numerical Methods 10
18
Bracketing methods - summary

2017-09- Numerical Methods 11


18
Solving nonlinear equations with
numerical methods

Bisection method Newton Raphson Method


False position method Secant Method
Fixed point iteration method

2017-09- Numerical Methods 12


18
Newton-Raphson Method

Slope

2017-09- Numerical Methods 13


18
Newton-Raphson - Method

When are the iterations stopped?

1. Estimated relative error is smaller than a specified


value

2. in f(x): When the absolute value of f(xi) is smaller than


some number

2017-09- Numerical Methods 14


18
Newton-Raphson - Example
f (x) = 8 - 4.5(x - sin x)
f '(x) = -4.5(1- cos x)
# cx f(f(x)
c) f'f(x)
(c) x-f(x)/f(x)
c-f( c )/f'( c )
1 2.0000 3.0918 -6.3727 2.4852
2 2.4852 -0.4370 -8.0648 2.4310
3 2.4310 -0.0041 -7.9109 2.4305
4 2.4305 0.0000 -7.9093 2.4305
5 2.4305 0.0000 -7.9093 2.4305
6 2.4305 0.0000 -7.9093 2.4305
7 2.4305 0.0000 -7.9093 2.4305
8 2.4305 0.0000 -7.9093 2.4305
9 2.4305 0.0000 -7.9093 2.4305
10 2.4305 0.0000 -7.9093 2.4305

2017-09- Numerical Methods 15


18
Newton-Raphson Parachute problem

# c f( c ) f' ( c ) c-f( c )/f'( c )


1 1.0000 51.2349 -6.5415 8.8322
2 8.8322 14.9346 -3.1876 13.5175
3 13.5175 2.6029 -2.1567 14.7244
4 14.7244 0.1211 -1.9599 14.7862
5 14.7862 0.0003 -1.9504 14.7863
6 14.7863 0.0000 -1.9504 14.7863
7 14.7863 0.0000 -1.9504 14.7863
8 14.7863 0.0000 -1.9504 14.7863
9 14.7863 0.0000 -1.9504 14.7863
10 14.7863 0.0000 -1.9504 14.7863
2017-09- Numerical Methods 16
06 2017-09-
Newton-Raphson Method Parachute problem
Effect of initial value

# c f( c ) f' ( c ) c-f( c )/f'( c )


1 20.0000 -8.3951 -1.3209 13.6446
2 13.6446 2.3303 -2.1349 14.7361
3 14.7361 0.0982 -1.9581 14.7862
4 14.7862 0.0002 -1.9504 14.7863
5 14.7863 0.0000 -1.9504 14.7863
6 14.7863 0.0000 -1.9504 14.7863
7 14.7863 0.0000 -1.9504 14.7863
8 14.7863 0.0000 -1.9504 14.7863
9 14.7863 0.0000 -1.9504 14.7863
10 14.7863 0.0000 -1.9504 14.7863
2017-09- Numerical Methods 17
18
Newton-Raphson Method Parachute problem
Effect of initial value

2017-09- Numerical Methods 18


18
Newton-Raphson Method Examples that do
not work

2017-09- Numerical Methods 19


18
Newton-Raphson Method Examples that do
not work

x = 1.4 x = 1.0 x = 0.4

2017-09- Numerical Methods 20


18
Secant method

2017-09- Numerical Methods 21


06
Secant method - Steps

Slope of the secant line

2017-09- Numerical Methods 22


06
Secant method Parachute problem

2017-09- Numerical Methods 23


06
Secant method/Issues

2017-09- Numerical Methods 24


06
Multiple solutions

Two zero crossings

Multiple roots typical of nonlinear eqns

2017-09- Numerical Methods 25


06
Multiple solutions ways to find solutions

2017-09- Numerical Methods 26


06
Fixed-point iteration method

2017-09- Numerical Methods 27


06
Fixed-point iteration method - convergence

2017-09- Numerical Methods 28


06
Fixed-point iteration method - convergence

2017-09- Numerical Methods 29


06
Fixed-point iteration method - convergence

2017-09- Numerical Methods 30


06
Fixed-point iteration method - issues

2017-09- Numerical Methods 31


06
Fixed-point iteration method - issues

2017-09- Numerical Methods 32


06
Fixed-point iteration method - issues
Consider

2017-09-21 Numerical Methods 33


Fixed-point iteration method - issues

2017-09-21 Numerical Methods 34


Fixed-point iteration method - issues

2017-09-21 Numerical Methods 35


Fixed-point iteration method - issues

2017-09-21 Numerical Methods 36


Fixed-point iteration method - issues
x1=1

x1=1

2017-09-21 Numerical Methods 37


Open methods

2017-09- Numerical Methods 38


06

Das könnte Ihnen auch gefallen