Upload
milton-weaver
View
239
Download
1
Embed Size (px)
Citation preview
Numerical AnalysisNumerical Analysis- - Root Finding IRoot Finding I--
Hanyang University
Jong-Il Park
Department of Computer Science and Engineering, Hanyang University
Root FindingRoot Finding
Analytic 하게 근을 구할 수 없을 때 수치해법 필요 eg. F(t) = e-t(3cos2t + 4sin2t)
F(t)
t
F(t)=0
Department of Computer Science and Engineering, Hanyang University
General procedure of root findingGeneral procedure of root finding
Step 1. 해의 근방을 찾는 과정 graphical method incremental search experience solution of a simplified model
Step 2. 정확한 해를 찾는 과정 Bracketing method Open method
Graphical method
Department of Computer Science and Engineering, Hanyang University
Bracketing methodBracketing method
구간 [a,b] 의 양끝점 사이에 근이 존재한다고 가정하고 , 구간의 폭을 체계적으로 좁혀감
정확한 근으로의 수렴성이 좋음
종류 bisection method linear interpolation method
Department of Computer Science and Engineering, Hanyang University
Open methodOpen method
임의의 시작점에서 시작 규칙적 반복계산으로 근을 구함 초기값에 따라 발산가능성 있음 bracketing method 보다 수렴속도 빠름 종류
fixed-point iteration Newton-Raphson method Secant method Muller method
Department of Computer Science and Engineering, Hanyang University
대략적 구간 찾기대략적 구간 찾기 Graphical method
Department of Computer Science and Engineering, Hanyang University
대략적 구간 찾기대략적 구간 찾기
Incremental search method
초기값 x 와 dx 사이의 함수값의 부호 조사 변화가 생기면 그 구간 안에 해가 존재 난점 :
dx 의 크기 • 작으면 긴 계산시간 , 크면 해를 놓침
중근일 경우 • 해를 놓칠 가능성 큼 양끝점의 도함수를 계산
if 서로 다른 부호 => 극소점 존재
정확한 해를 찾기 위해 반드시 프로그램의 앞부분에 있어야 함
Department of Computer Science and Engineering, Hanyang University
Bisection method(I)Bisection method(I)
=Half Interval method = Bolzano method
Department of Computer Science and Engineering, Hanyang University
Bisection method(II)Bisection method(II)
- 한번 반복할 때마다 구간이 1/2 로 감소 - 간단하고 , 오차범위의 확인이 용이 n 번 반복시 , 최대오차 < ( 초기구간간격 /2n) - 수렴속도가 느린 편임 - 다중근의 경우에 부호변화가 없으므로 적절치 못함
Department of Computer Science and Engineering, Hanyang University
Linear interpolation method(I)Linear interpolation method(I)
= False position method
Principle
Algorithm
Department of Computer Science and Engineering, Hanyang University
Linear interpolation method(II)Linear interpolation method(II)
Algorithm
Department of Computer Science and Engineering, Hanyang University
Convergence speedConvergence speed
Bisection 보다 대체로 빠른 수렴성
수렴 속도가 곡률에 의존( 경우에 따라 매우 느린 수렴 )
Modified linear interpolation method 제안됨
Department of Computer Science and Engineering, Hanyang University
Modified linear interpolation Modified linear interpolation
x2 x2
0.5f(x2 )
ModifiedLinearInterpolation
Slowconvergence
Fasterconvergence
Department of Computer Science and Engineering, Hanyang University
Open methodsOpen methods
Department of Computer Science and Engineering, Hanyang University
Newton-Raphson method(I)Newton-Raphson method(I)
원리
Department of Computer Science and Engineering, Hanyang University
Newton-Raphson method(II)Newton-Raphson method(II)
Fast convergence – quadratic convergence 도함수 계산이 복잡할 때는 비효율적 Initial guess 가 중요함 Troubles
Cycling Wandering Overshooting
Department of Computer Science and Engineering, Hanyang University
Secant method(I)Secant method(I)
Department of Computer Science and Engineering, Hanyang University
Secant method(IISecant method(II))
Linear interpolation 과 비슷한 복잡성 update rule 만 다름
Linear interpolation 보다 빠른 수렴성 Newton-Raphson method 보다 우수한 안정성
Department of Computer Science and Engineering, Hanyang University
Comparison: Convergence speedComparison: Convergence speed
Department of Computer Science and Engineering, Hanyang University
Fixed point iteration(I)Fixed point iteration(I)
원리f(x)=0 x=g(x)
Iteration rule
xk+1=g(xk)
Convergent
if contraction mapping
Department of Computer Science and Engineering, Hanyang University
Fixed point iteration(II)Fixed point iteration(II)
Department of Computer Science and Engineering, Hanyang University
Muller method(I)Muller method(I)
Generalization of the Secant method Fast convergence
Secant Muller
Department of Computer Science and Engineering, Hanyang University
Muller method(II)Muller method(II)
Algorithm
Department of Computer Science and Engineering, Hanyang University
Error analysisError analysis
Linear convergence
Quadratic convergence
Department of Computer Science and Engineering, Hanyang University
Accelerating convergenceAccelerating convergence
Aitken’s 2 method
Rapid convergence!
Department of Computer Science and Engineering, Hanyang University
Fail-safe methodsFail-safe methods
Combination of Newton and Bisection if(out of bound || small reduction of bracket)
update by Bisection method
rtsafe.c in NR in C
Ridder's method (good performance) zriddr.c in NR in C
Department of Computer Science and Engineering, Hanyang University
Homework #3 (I)Homework #3 (I)
Programming: Find the roots of the Bessel function Jo in the interval [1.0, 10.0] using the following methods: a) Bisection (rtbis.c)b) Linear interpolation (rtflsp.c)c) Secant (rtsec.c)d) Newton-Raphson (rtnewt.c)e) Newton with bracketing (rtsafe.c) Hint
First, use bracketing routine (zbrak.c). Then, call proper routines in NR in C. Set xacc=10-6 x Use “pointer to function” to write succinct source
codes
[Due: 9/26]
(Cont’)
Department of Computer Science and Engineering, Hanyang University
Homework #3 (II)Homework #3 (II)
Write source codes for Muller method (muller.c) and do the same job as above.
Discuss the convergence speed of the methods.
Solve the following problems using the routine of rtsafe.c in NR in C 10 e-x sin(2 x)-2= 0, on [0.1,1] x2 - 2xe-x + e-2x = 0, on [0,1] cos(x+sqrt(2))+x(x/2+sqrt(2)) = 0, on [-2,-1]