数值分析(二)

解线性代数方程组的迭代法

向量序列和矩阵序列的极限

见矩阵论部分

迭代法的基本理论

简单迭代及其收敛性

A x = b    ⟺    x = B x + g ⟹ x ( k + 1 ) = B x ( k ) + g \begin{aligned} Ax = b &\iff x = Bx+g \\ &\Longrightarrow x^{(k+1)} = Bx^{(k)} + g \end{aligned} Ax=bx=Bx+gx(k+1)=Bx(k)+g

  • { x ( k ) } k = 0 ∞ → x ‾ \{x^{(k)}\}_{k=0}^\infty \rightarrow \overline x {x(k)}k=0x,则 x ‾ \overline x x是方程的解
  • ∀ x ( 0 ) , x ( k ) → x ‾    ⟺    ρ ( B ) < 1 \forall x^{(0)},x^{(k)} \rightarrow \overline x \iff \rho(B) <1 x(0),x(k)xρ(B)<1
  • 收敛速度: η = − ln ⁡ ρ ( B ) \eta = -\ln \rho(B) η=lnρ(B)
    ∥ x ( k ) − x ‾ ∥ ≤ ∥ B ∥ 1 − ∥ B ∥ ∥ x ( k ) − x ( k − 1 ) ∥ ∥ x ( k ) − x ‾ ∥ ≤ ∥ B ∥ k 1 − ∥ B ∥ ∥ x ( 1 ) − x ( 0 ) ∥ \begin{aligned} &\parallel x^{(k)} - \overline x \parallel \leq \frac{\parallel B \parallel}{1- \parallel B \parallel } \parallel x^{(k)} - x^{(k-1)} \parallel \\ &\parallel x^{(k)} - \overline x \parallel \leq \frac{\parallel B \parallel^k}{1- \parallel B \parallel } \parallel x^{(1)} - x^{(0)} \parallel \\ \end{aligned} x(k)x∥≤1BBx(k)x(k1)x(k)x∥≤1BBkx(1)x(0)

Gauss-Seidel迭代及其收敛性

x ( k + 1 ) = B x ( k ) + g    ⟺    x ( k + 1 ) = ( B 1 + B 2 ) x ( k ) + g ⟹ x ( k + 1 ) = B 1 x ( k + 1 ) + B 2 x ( k ) + g    ⟺    x ( k + 1 ) = ( I − B 1 ) − 1 B 2 x ( k ) + ( I − B 1 ) − 1 g \begin{aligned} x^{(k+1)} = B x^{(k)} + g &\iff x^{(k+1)} = (B_1+B_2)x^{(k)} + g \\ &\Longrightarrow x^{(k+1)} = B_1x^{(k+1)} + B_2x^{(k)} + g \\ &\iff x^{(k+1)} = (I-B_1)^{-1}B_2 x^{(k)} + (I-B_1)^{-1}g \end{aligned} x(k+1)=Bx(k)+gx(k+1)=(B1+B2)x(k)+gx(k+1)=B1x(k+1)+B2x(k)+gx(k+1)=(IB1)1B2x(k)+(IB1)1g

  • B 1 B_1 B1是严格下三角, B 2 B_2 B2是上三角
  • 计算 x i ( k + 1 ) x_i^{(k+1)} xi(k+1)时,前 i − 1 i-1 i1个分量用新值,后面的用旧值
  • ∥ B ∥ 1 < 1  or  ∥ B ∥ ∞ < 1 \parallel B \parallel_1 <1 \text{ or } \parallel B \parallel_\infty <1 B1<1 or B<1 Gauss-Seidel \text{Gauss-Seidel} Gauss-Seidel收敛

几种常用的迭代法

Jacobi迭代

A x = b , A = L + D + U    ⟺    x = − D − 1 ( L + U ) x + D − 1 b ⟹ x ( k + 1 ) = B J x ( k ) + g , B J = − D − 1 ( L + U ) , g = D − 1 b \begin{aligned} Ax = b,A = L+D+U &\iff x = -D^{-1}(L+U)x+D^{-1}b \\ &\Longrightarrow x^{(k+1)} = B_Jx^{(k)} +g,B_J = -D^{-1}(L+U),g = D^{-1}b \end{aligned} Ax=b,A=L+D+Ux=D1(L+U)x+D1bx(k+1)=BJx(k)+g,BJ=D1(L+U),g=D1b
x i ( k + 1 ) = 1 a i i ( b i − ∑ j = 1 , j ≠ i n a i j x j ( k ) ) x_i^{(k+1)} = \frac{1}{a_{ii}}(b_i-\sum_{j=1,j\neq i}^n a_{ij}x_j^{(k)}) xi(k+1)=aii1(bij=1,j=inaijxj(k))

收敛的充分条件

  • ρ ( B J ) < 1 \rho(B_J)<1 ρ(BJ)<1
  • 严格对角占优

基于Jacobi迭代的Gauss-Seidel迭代

x ( k + 1 ) = − D − 1 ( L + U ) x ( k ) + D − 1 b    ⟺    x ( k + 1 ) = − D − 1 L x ( k ) − D − 1 U x ( k ) + D − 1 b ⟹ x ( k + 1 ) = − D − 1 L x ( k + 1 ) − D − 1 U x ( k ) + D − 1 b    ⟺    x ( k + 1 ) = − ( L + D ) − 1 U x ( k ) + ( L + D ) − 1 b ⟹ B s = − ( L + D ) − 1 U \begin{aligned} &x^{(k+1)} = - D^{-1}(L+U)x^{(k)} +D^{-1}b \\ \iff &x^{(k+1)} = -D^{-1}Lx^{(k)} - D^{-1}Ux^{(k)} +D^{-1}b \\ \Longrightarrow &x^{(k+1)} = -D^{-1}Lx^{(k+1)} - D^{-1}Ux^{(k)} +D^{-1}b\\ \iff & x^{(k+1)} = -(L+D)^{-1}Ux^{(k)} + (L+D)^{-1}b \\ \Longrightarrow &B_s = -(L+D)^{-1}U \end{aligned} x(k+1)=D1(L+U)x(k)+D1bx(k+1)=D1Lx(k)D1Ux(k)+D1bx(k+1)=D1Lx(k+1)D1Ux(k)+D1bx(k+1)=(L+D)1Ux(k)+(L+D)1bBs=(L+D)1U
x i ( k + 1 ) = 1 a i i ( b i − ∑ j = 1 i − 1 a i j x j ( k + 1 ) − ∑ j = i n a i j x j ( k ) ) x_i^{(k+1)} = \frac{1}{a_{ii}}(b_i-\sum_{j=1}^{i-1} a_{ij}x_j^{(k+1)}-\sum_{j=i}^{n} a_{ij}x_j^{(k)}) xi(k+1)=aii1(bij=1i1aijxj(k+1)j=inaijxj(k))

收敛充分条件:

  • ρ ( B s ) < 1 \rho(B_s) < 1 ρ(Bs)<1
  • A A A严格对角占优
  • A A A对称正定

逐次超松弛迭代

SOR(Successive Over-Relaxation) \text{SOR(Successive Over-Relaxation)} SOR(Successive Over-Relaxation)
A x = b , x ( k )    ⟺    r ( k ) = b − A x ( k ) ⟹ x ( k + 1 ) = x ( k ) + w D − 1 r ( k )    ⟺    x i ( k + 1 ) = x i ( k ) + w a i i ( b i − ∑ j = 1 i − 1 a i j x j ( k ) − ∑ j = i n a i j x j ( k ) )    ⟺    x i ( k + 1 ) = x i ( k ) + w a i i ( b i − ∑ j = 1 i − 1 a i j x j ( k + 1 ) − ∑ j = i n a i j x j ( k ) )    ⟺    x i ( k + 1 ) = ( 1 − w ) x i ( k ) + w a i i ( b i − ∑ j = 1 i − 1 a i j x j ( k ) − ∑ j = i + 1 n a i j x j ( k ) )    ⟺    x ( k + 1 ) = ( 1 − w ) x ( k ) + w D − 1 ( b − L x ( k + 1 ) − U x ( k ) )    ⟺    x ( k + 1 ) = B w x ( k ) + w ( D + w L ) − 1 b            B w = ( D + w L ) − 1 [ ( 1 − w ) D − w U ] \begin{aligned} Ax = b,x^{(k)} &\iff r^{(k)} = b-Ax^{(k)} \\ &\Longrightarrow x^{(k+1)} =x^{(k)} + w D^{-1}r^{(k)} \\ &\iff x_i^{(k+1)} = x_i^{(k)} + \frac{w}{a_{ii}}(b_i-\sum_{j=1}^{i-1}a_{ij}x_j^{(k)} -\sum_{j=i}^na_{ij}x_j^{(k)}) \\ &\iff x_i^{(k+1)} = x_i^{(k)} + \frac{w}{a_{ii}}(b_i-\sum_{j=1}^{i-1}a_{ij}x_j^{(k+1)} -\sum_{j=i}^na_{ij}x_j^{(k)}) \\ &\iff x_i^{(k+1)} = (1-w)x_i^{(k)} + \frac{w}{a_{ii}}(b_i-\sum_{j=1}^{i-1}a_{ij}x_j^{(k)} -\sum_{j=i+1}^na_{ij}x_j^{(k)}) \\ &\iff x^{(k+1)} = (1-w)x^{(k)} +wD^{-1}(b-Lx^{(k+1)} - Ux^{(k)})\\ &\iff x^{(k+1)} = B_wx^{(k)} +w(D+wL)^{-1}b\\ & \ \ \ \ \ \ \ \ \ \ B_w = (D+wL)^{-1}[(1-w)D-wU] \end{aligned} Ax=b,x(k)r(k)=bAx(k)x(k+1)=x(k)+wD1r(k)xi(k+1)=xi(k)+aiiw(bij=1i1aijxj(k)j=inaijxj(k))xi(k+1)=xi(k)+aiiw(bij=1i1aijxj(k+1)j=inaijxj(k))xi(k+1)=(1w)xi(k)+aiiw(bij=1i1aijxj(k)j=i+1naijxj(k))x(k+1)=(1w)x(k)+wD1(bLx(k+1)Ux(k))x(k+1)=Bwx(k)+w(D+wL)1b          Bw=(D+wL)1[(1w)DwU]

  • ∀ x ( 0 ) \forall x^{(0)} x(0)收敛 ⟹ 0 < w < 2 \Longrightarrow 0 <w<2 0<w<2
  • ρ ( B ω ) < 1 \rho(B_\omega) < 1 ρ(Bω)<1
  • A A A严格对角占优, 0 < ω ≤ 1 ⟹ ∀ x ( 0 ) 0< \omega \leq 1 \Longrightarrow \forall x^{(0)} 0<ω1x(0)收敛
  • A A A对称正定, 0 < w < 2 ⟹ ∀ x ( 0 ) 0<w<2 \Longrightarrow \forall x^{(0)} 0<w<2x(0)收敛

函数插值

插值问题与插值多项式

插值问题

已知被插函数 f ( x ) f(x) f(x)插值区间 [ a , b ] [a,b] [a,b] n + 1 n+1 n+1插值节点 { x i } i = 0 n \{x_i\}_{i=0}^n {xi}i=0n处的函数值 { f ( x i ) } i = 0 n \{f(x_i)\}_{i=0}^n {f(xi)}i=0n。如果 φ ( x ) \varphi(x) φ(x)满足以下插值条件
∀ x i , φ ( x i ) = f ( x i ) \forall x_i ,\varphi(x_i) = f(x_i) xi,φ(xi)=f(xi)
则称其为插值函数,这类问题叫做插值问题
R n ( x ) = f ( x ) − φ ( x ) R_n(x) = f(x) -\varphi(x) Rn(x)=f(x)φ(x)
被称为截断误差/插值余项

插值多项式

取插值函数集合 Φ \Phi Φ为不超过 n n n次的多项式空间 P n = s p a n { 1 , x , x 2 , ⋯   , x n } P^n=span \{1,x,x^2,\cdots,x^n\} Pn=span{1,x,x2,,xn} { 1 , x , x 2 , ⋯   , x n } \{1,x,x^2,\cdots,x^n\} {1,x,x2,,xn}是最基本的一种插值基函数。不同插值方法对应着不同的插值基函数,插值基函数对应的不同的权值。
满足插值条件的不超过 n n n次的插值多项式存在且唯一。
R n ( x ) = f ( x ) − φ ( x ) = f ( n + 1 ) ( ξ ) ( n + 1 ) ! ω n + 1 ( x ) ≤ M n + 1 ( n + 1 ) ! ∣ ω n + 1 ( x ) ∣ (插值余项) R_n(x) = f(x) - \varphi(x) = \frac{f^{(n+1)}(\xi)}{(n+1)!}\omega_{n+1}(x) \leq \frac{M_{n+1}}{(n+1)!} \mid \omega_{n+1}(x) \mid \tag{插值余项} Rn(x)=f(x)φ(x)=(n+1)!f(n+1)(ξ)ωn+1(x)(n+1)!Mn+1ωn+1(x)(插值余项)
其中
ω n + 1 ( x ) = ∏ i = 0 n ( x − x i ) \omega_{n+1}(x) = \prod_{i=0}^n (x-x_i) ωn+1(x)=i=0n(xxi)

Lagrange插值

l i ( x i ) = 1 , l i ( x j ) = 0 ⟹ l i ( x ) = ω n + 1 ( x ) ( x − x i ) ω n + 1 ′ ( x i ) ⟹ L n ( x ) = ∑ i = 0 n f ( x i ) l i ( x ) \begin{aligned} l_i(x_i)=1,l_i(x_j) =0 &\Longrightarrow l_i(x) = \frac{\omega_{n+1}(x)}{(x-x_i)\omega^\prime_{n+1}(x_i)}\\ &\Longrightarrow L_n(x) = \sum_{i=0}^nf(x_i)l_i(x) \\ \end{aligned} li(xi)=1,li(xj)=0li(x)=(xxi)ωn+1(xi)ωn+1(x)Ln(x)=i=0nf(xi)li(x)

  • ∑ i = 0 n l i ( x ) = 1 \sum_{i=0}^nl_i(x) = 1 i=0nli(x)=1
  • n + 1 n+1 n+1 L a g r a n g e \rm Lagrange Lagrange插值基函数 l i ( x ) l_i(x) li(x)线性无关,构成线性空间上的一组基。

Newton插值

差商及其性质

  • 零阶差商
    f [ x k ] = f ( x k ) f[x_k] = f(x_k) f[xk]=f(xk)

  • 一阶差商
    f [ x j , x k ] = f ( x k ) − f ( x j ) x k − x j f[x_j,x_k] = \frac{f(x_k)-f(x_j)}{x_k-x_j} f[xj,xk]=xkxjf(xk)f(xj)

  • 二阶差商
    f [ x i , x j , x k ] = f [ x j , x k ] − f [ x i , x j ] x k − x i f[x_i,x_j,x_k] = \frac{f[x_j,x_k] - f[x_i,x_j]}{x_k-x_i} f[xi,xj,xk]=xkxif[xj,xk]f[xi,xj]

  • k k k阶差商
    f [ x 0 , x 1 , ⋯   , x k ] = f [ x 1 , x 2 , ⋯   , x k ] − f [ x 0 , x 1 , ⋯   , x k − 1 ] x k − x 0 f[x_0,x_1,\cdots,x_k] = \frac{f[x_1,x_2,\cdots,x_k] - f[x_0,x_1,\cdots,x_{k-1}]}{x_k-x_0} f[x0,x1,,xk]=xkx0f[x1,x2,,xk]f[x0,x1,,xk1]

差商的性质

  • 差商的函数值表示
    f [ x 0 , x 1 , ⋯   , x k ] = ∑ i = 0 k f ( x i ) ω k + 1 ( x i ) f[x_0,x_1,\cdots,x_k] = \sum_{i=0}^k \frac{f(x_i)}{\omega_{k+1}(x_i)} f[x0,x1,,xk]=i=0kωk+1(xi)f(xi)

  • 差商的对称性
    f [ x 0 , x 1 , ⋯   , x k ] = f [ x i 0 , x i 1 , ⋯   , x i k ] f[x_0,x_1,\cdots,x_k] = f[x_{i0},x_{i1},\cdots,x_{ik}] f[x0,x1,,xk]=f[xi0,xi1,,xik]

  • 差商与导数的关系
    f [ x 0 , x 1 , ⋯   , x n ] = f ( n ) ( η ) n ! f[x_0,x_1,\cdots,x_n] = \frac{f^{(n)}(\eta)}{n!} f[x0,x1,,xn]=n!f(n)(η)

差商表

Newton插值公式

N n ( x ) = f ( x 0 ) + f [ x 0 , x 1 ] ω 1 ( x ) + f [ x 0 , x 1 , x 2 ] ω 2 ( x ) + ⋯ + f [ x 0 , x 1 , ⋯   , x n ] ω n ( x ) N_n(x) = f(x_0)+f[x_0,x_1]\omega_1(x) + f[x_0,x_1,x_2]\omega_2(x) + \cdots +f[x_0,x_1,\cdots,x_n]\omega_n(x) Nn(x)=f(x0)+f[x0,x1]ω1(x)+f[x0,x1,x2]ω2(x)++f[x0,x1,,xn]ωn(x)

  • N n + 1 ( x ) = N n ( x ) + f [ x 0 , x 1 , ⋯   , x n , x n + 1 ] ω n + 1 ( x ) N_{n+1}(x) = N_n(x)+ f[x_0,x_1,\cdots,x_n,x_{n+1}]\omega_{n+1}(x) Nn+1(x)=Nn(x)+f[x0,x1,,xn,xn+1]ωn+1(x)
  • R n ( x ) = f ( x ) − N n ( x ) = f [ x , x 0 , x 1 , ⋯   , x n ] w n + 1 ( x ) = f ( n + 1 ) ( ξ ) ( n + 1 ) ! w n + 1 ( x ) R_n(x) = f(x)-N_n(x) = f[x,x_0,x_1,\cdots,x_n]w_{n+1}(x) = \cfrac{f^{(n+1)}(\xi)}{(n+1)!} w_{n+1}(x) Rn(x)=f(x)Nn(x)=f[x,x0,x1,,xn]wn+1(x)=(n+1)!f(n+1)(ξ)wn+1(x)

等距节点插值

差分算子及其性质

y = f ( x ) , x i = a + i h , f ( x i ) , h = b − a n y = f(x),x_i = a+ih,f(x_i) ,h = \frac{b-a}{n} y=f(x),xi=a+ih,f(xi),h=nba

  • 向前差分算子 Δ \Delta Δ

{ Δ f ( x ) = f ( x + h ) − f ( x ) Δ m f ( x ) = Δ ( Δ m − 1 f ( x ) ) \begin{cases} \Delta f(x) = f(x+h) - f(x) \\ \Delta^m f(x) = \Delta(\Delta ^{m-1}f(x)) \end{cases} {Δf(x)=f(x+h)f(x)Δmf(x)=Δ(Δm1f(x))

  • 向后差分算子 ∇ \nabla
    { ∇ f ( x ) = f ( x ) − f ( x − h ) ∇ m f ( x ) = ∇ ( ∇ m − 1 f ( x ) ) \begin{cases} \nabla f(x) = f(x) - f(x-h) \\ \nabla^mf(x) = \nabla(\nabla^{m-1}f(x)) \end{cases} {f(x)=f(x)f(xh)mf(x)=(m1f(x))

  • 恒等算子 I I I
    { I f ( x ) = f ( x ) I m f ( x ) = I ( I m − 1 f ( x ) ) \begin{cases} If(x) = f(x) \\ I^mf(x) = I(I^{m-1}f(x)) \end{cases} {If(x)=f(x)Imf(x)=I(Im1f(x))

  • 移位算子 E E E
    { E f ( x ) = f ( x + h ) E s f ( x ) = f ( x + s h ) \begin{cases} Ef(x) = f(x+h) \\ E^s f(x) = f(x+sh) \end{cases} {Ef(x)=f(x+h)Esf(x)=f(x+sh)

向前差分表

等距节点插值公式

  • Newton \text{Newton} Newton向前插值公式
    N n ( a + t h ) = f ( x 0 ) + ∑ k = 1 n Δ k f ( x 0 ) [ t k ] N_n(a+th) = f(x_0) + \sum_{k=1}^n \Delta^kf(x_0) \begin{bmatrix} t \\ k\end{bmatrix} Nn(a+th)=f(x0)+k=1nΔkf(x0)[tk]

  • Newton \text{Newton} Newton向后插值公式
    N n ( x ) = f ( x n ) + ∑ k = 1 n ∇ k f ( x n ) [ t + k − 1 k ] N_n(x) = f(x_n)+ \sum_{k=1}^n \nabla^kf(x_n) \begin{bmatrix} t+k-1 \\ k \end{bmatrix} Nn(x)=f(xn)+k=1nkf(xn)[t+k1k]

Hermite插值

插值条件中含导数的代数插值问题

  • 构建重节点差商表【有导数节点处扩充】
  • 先求出只满足 f ( x i ) f(x_i) f(xi) H ( x ) H(x) H(x),再通过待定系数法求解
  • 存在且唯一

R 2 n + 1 ( x ) = f ( 2 n + 2 ) ( ξ ) ( 2 n + 2 ) ! w n + 1 2 ( x ) R_{2n+1}(x) =\frac{f^{(2n+2)}(\xi)}{(2n+2)!}w^2_{n+1}(x) R2n+1(x)=(2n+2)!f(2n+2)(ξ)wn+12(x)

分段低次插值

三次样条插值

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

愤怒的卤蛋

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值