Fixed-Point Iteration 原理

BB: 本文主要内容来自于对 Numerical Analysis, Richard L. Burden, J. Douglas Faires 一书 CHAPTER 2 Fixed-Point Iteration的归纳与思考。

关于fixed-point

1. 什么是fixed point?

定义

The number p is a fixed-point for a given function g if g( p ) = p

可以看到,fixed-point 是自变量与函数取值相同的点的横(纵)坐标,也可以看作是函数g( p ) 和函数y = f( x ) 的交点横(纵)坐标。

2. 推出该概念有什么用?

可以将求根问题转化为 fixed-point 求解问题,从而起到简化作用。两种问题在下面两种情况下可以相互转换。

(i) Given a root-finding problem f( p ) = 0, we can define functions g with a fixed point at p in a number of ways, e.g.
g( x ) = x - f( x ) , or as g( x ) = x +kf( x ), where k is a constant
(ii) If the function g has a fixed point at p, then the function defined by f( x ) = x - g( x ) has a zero at p.

3. 怎么判断函数是否存在fixed point?

下面给出fixed point 的存在性和唯一性定理,两者可以分别用中值定理和拉格朗日均值定理证明。需要注意的是,该定理为fixed point 存在的充分不必要条件。例如函数 f( x ) = 3 − x 3^{-x} 3x 在区间[0,1]上存在唯一不动点,但是却不满足唯一性条件(g’(0) = -1.0986)。
存在性

If g ∈ \in

Fixed Point Continuation(FPC)是一种用于非线性方程求解的迭代算法。FPC算法是一种二分法的变种,可以用来求解非线性方程组,函数最小值以及非线性最小二乘等问题。 下面是一个用matlab实现Fixed Point Continuation算法的例子: ```matlab function [x, fval, iter] = FPC(f, dfdx, x0, alpha, beta, tol, maxiter) % Fixed Point Continuation algorithm for solving nonlinear equations % f: function handle of the nonlinear equation % dfdx: function handle of the derivative of f % x0: initial guess % alpha, beta: continuation parameters % tol: tolerance for stopping criterion % maxiter: maximum number of iterations % initialization iter = 0; x = x0; fval = f(x); while abs(fval) > tol && iter < maxiter % compute new guess using Fixed Point Iteration x_new = x - alpha*fval / dfdx(x) + beta*(x - x0); fval_new = f(x_new); if abs(fval_new) < abs(fval) % accept new guess x = x_new; fval = fval_new; else % decrease alpha and beta and try again alpha = alpha / 2; beta = beta / 2; end iter = iter + 1; end if iter == maxiter warning('FPC algorithm did not converge within maximum number of iterations'); end end ``` 该函数接受以下输入参数: - `f`: 非线性方程的函数句柄 - `dfdx`: 非线性方程的导数函数句柄 - `x0`: 初始猜测 - `alpha` 和 `beta`: continuation参数,用于控制迭代步长和收敛速度 - `tol`: 停止迭代的容差 - `maxiter`: 最大迭代次数 该函数返回以下输出参数: - `x`: 迭代收敛的解 - `fval`: `x`处的函数值 - `iter`: 迭代次数 该算法使用Fixed Point Iteration来计算新的猜测,如果新的猜测的函数值比旧的猜测更接近于零,则接受新的猜测。否则,将减小`alpha`和`beta`并重试。因此,该算法可以自适应地调整迭代步长和收敛速度,以便在最小的迭代次数内找到解。 下面是一个使用上述函数来解决非线性方程的例子: ```matlab % define the nonlinear equation f = @(x) x^3 - x^2 - 1; dfdx = @(x) 3*x^2 - 2*x; % set initial guess and continuation parameters x0 = 1; alpha = 1; beta = 0; % set stopping criterion and maximum number of iterations tol = 1e-6; maxiter = 100; % solve the nonlinear equation using FPC algorithm [x, fval, iter] = FPC(f, dfdx, x0, alpha, beta, tol, maxiter); % display the solution and number of iterations fprintf('Solution: x = %f\n', x); fprintf('Number of iterations: %d\n', iter); ``` 该程序将输出以下结果: ``` Solution: x = 1.465571 Number of iterations: 26 ``` 该算法收敛于非线性方程的解,并且只需要26次迭代即可达到所需的精度。
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值