1.Bisection(二分法)
To find a solution to f (x) = 0 given the continuous function f on the interval [ a, b ], where f (a) and f (b) have opposite signs.
Input: endpoints a, b; tolerance TOL; maximum number of iterations Nmax.
Output: approximate solution p or message of failure.
Step 1 Set i = 1;FA = f (a) ;
Step 2 While ( i <= Nmax) do steps 3-6
Step 3 Set p = a + ( b – a ) / 2 ; /* compute pi */FP = f (p) ;
Step 4 If ( FP == 0 ) or ( b - a ) / 2 < TOL
then Output (p);
STOP; /* successful */
Step 5 Set i ++;
Step 6 If sign(FA) · sign(FP) > 0
then set a = p ; FA = FP ;
Else set b = p ; /* update ai, bi */
Step 7 Output (Method failed after Nmax iterations); /* unsuccessful */
STOP.
2.Fixed-Point Iteration
Fixed-Point Theorem:
如果g(x)在[a,b]上的导数为g'(x),若|g'(x)|<k,0<k<1,对于x都成立,
则存在
收敛于p,p在[a,b]区间中。
实际上k是等比数列的公比。公比小于1时可以收敛。
推论:收敛精度:
;收敛速度:
Algorithm: Fixed-Point Iteration
Find a solution to p = g(p) given an initial approximation p0.
Input: initial approximation p0; tolerance TOL; maximum number of iterations Nmax.
Output: approximate solution p or message of failure.
Step 1 Set i = 1;
Step 2 While ( i < Nmax) do steps 3-6
Step 3 Set p = g(p0); /* compute pi */
Step 4 If | p - p0 | < TOL then Output (p); /* successful */
STOP;
Step 5 Set i ++;
Step 6 Set p0 = p ; /* update p0 */
Step 7 Output (The method failed after Nmax iterations); /* unsuccessful */
STOP.
3.Newton’s Method (Newton-Raphson Method)
收敛定理
如果p属于[a,b],f(p)等于0,f'(p)不等于0
那么p收敛到p0
牛顿法:使用下式做逐次迭代。
1阶收敛。
优化牛顿法:将f/f'代入上式
1.可以保证重根的时候也有解
2.二阶收敛
4.Error Analysis for Iterative Methods
定义asymptotic error constant 为
如果 a =1, the sequence is linearly convergent.
如果 a =2, the sequence is quadratically convergent.
计算的时候,考虑
当几次导数不为0时,就是几次收敛。
5.Accelerating Convergence
Aitken’s Method:
Steffensen’s Method:
对于p=g(p),如果,以下的序列收敛到p,且g'(p)不为0,则二阶收敛
Algorithm: Steffensen’s Acceleration
Find a solution to x = g(x) given an initial approximation p0.
Input: initial approximation p0; tolerance TOL; maximum number of iterations Nmax.
Output: approximate solution x or message of failure.
Step 1 Set i = 1;
Step 2 While ( i <= Nmax) do steps 3-6
Step 3 Set p1 = g(p0) ;
p2 = g(p1) ;
p = p0 - ( p1 - p0 )^2 / ( p2 - 2p1 + p0 ) ;
Step 4 If | p - p0 | < TOL
then Output (p); /* successful */
STOP;
Step 5 Set i ++;
Step 6 Set p0 = p ; /* update p0 */
Step 7 Output (The method failed after Nmax iterations); /* unsuccessful */
STOP.