当前位置:网站首页>Notes on numerical analysis (II): numerical solution of linear equations
Notes on numerical analysis (II): numerical solution of linear equations
2022-07-03 09:19:00 【fishfuck】
direct method
Catch up method
The coefficient matrix is tridiagonal matrix
A = [ b 1 c 1 a 2 b 2 c 2 a 3 b 3 c 3 ⋱ ⋱ ⋱ a n − 1 b n − 1 c n − 1 a n b n ] A= \begin{bmatrix} b_1 & c_1 \\ a_2 & b_2 & c_2\\ & a_3 &b_3 &c_3 \\ & & \ddots & \ddots &\ddots \\ & & & a_{n-1} &b_{n-1} & c_{n-1}\\ &&&& a_n & b_n \end{bmatrix} A=⎣⎢⎢⎢⎢⎢⎢⎡b1a2c1b2a3c2b3⋱c3⋱an−1⋱bn−1ancn−1bn⎦⎥⎥⎥⎥⎥⎥⎤
The equations of
{ b 1 x 1 + c 1 x 2 = f 1 a i x i − 1 + b i x i + c i x i + 1 = f i , i = 2 , 3 , 4 , ⋯ , n − 1 a n x n − 1 + b n x n = f n \left\{ \begin{array}{lr} b_1x_1+c_1x_2=f_1\\ a_ix_{i-1}+b_ix_i+c_ix_{i+1}=f_i,&i=2, 3,4,\cdots,{n-1}\\ a_nx_{n-1}+b_nx_n=f_n \end{array} \right. ⎩⎨⎧b1x1+c1x2=f1aixi−1+bixi+cixi+1=fi,anxn−1+bnxn=fni=2,3,4,⋯,n−1
, The solution of the catch-up method is divided into two steps :
Elimination process
Process the given tridiagonal equations into unit upper didiagonal equations
{ x i + u i x i + 1 = y i , i = 1 , 2 , 3 , 4 , ⋯ , n − 1 x n = y n \left\{ \begin{array}{lr} x_i + u_ix_{i+1}=y_i,&i=1,2, 3,4,\cdots,{n-1}\\ x_n = y_n \end{array} \right. { xi+uixi+1=yi,xn=yni=1,2,3,4,⋯,n−1
, The processing procedure is
{ u 1 = c 1 b 1 , y 1 = f 1 b 1 u i = c i ( b i − a i u i − 1 ) , i = 2 , 3 , 4 , ⋯ , n − 1 y i = f i − a i y i − 1 b i − a i u i − 1 , i = 2 , 3 , 4 , ⋯ , n \left\{ \begin{array}{lr} u_1=\frac {c_1}{b_1},y_1=\frac {f_1}{b_1}\\ u_i=\frac{c_i}{(b_i-a_iu_{i-1})},&i=2, 3,4,\cdots,{n-1}\\ y_i=\frac{f_i-a_iy_{i-1}}{b_i-a_iu_{i-1}},&i=2, 3,4,\cdots,{n} \end{array} \right. ⎩⎪⎨⎪⎧u1=b1c1,y1=b1f1ui=(bi−aiui−1)ci,yi=bi−aiui−1fi−aiyi−1,i=2,3,4,⋯,n−1i=2,3,4,⋯,n
The process of retrogression
{ x n = y n x i = y i − u i x i + 1 , i = 1 , 2 , 3 , 4 , ⋯ , n − 1 \left\{ \begin{array}{lr} x_n = y_n\\ x_i =y_i- u_ix_{i+1},&i=1,2, 3,4,\cdots,{n-1} \end{array} \right. { xn=ynxi=yi−uixi+1,i=1,2,3,4,⋯,n−1
Be careful , Only when tridiagonal matrix satisfies Diagonally dominant when , The meet
{ ∣ b 1 ∣ > ∣ c 1 ∣ ∣ b i ∣ > ∣ a i ∣ + ∣ c 1 ∣ , i = 1 , 2 , 3 , 4 , ⋯ , n − 1 ∣ b n ∣ > ∣ a n ∣ \left\{ \begin{array}{lr} |b_1|>|c_1|\\ |b_i|>|a_i|+|c_1|,&i=1,2, 3,4,\cdots,{n-1}\\ |b_n|>|a_n| \end{array} \right. ⎩⎨⎧∣b1∣>∣c1∣∣bi∣>∣ai∣+∣c1∣,∣bn∣>∣an∣i=1,2,3,4,⋯,n−1
The catch-up process will not be interrupted .
Tridiagonal matrix L U LU LU decompose
Is there any method that can directly start from the coefficient matrix of tridiagonal equations Direct processing How to find out the system of didiagonal equations on the unit ? We consider the matrix L U LU LU decompose .
[ b 1 c 1 a 2 b 2 c 2 a 3 b 3 c 3 ⋱ ⋱ ⋱ a n − 1 b n − 1 c n − 1 a n b n ] = [ d 1 l 2 d 2 l 3 d 3 ⋱ ⋱ l n d n ] [ 1 u 1 1 u 2 ⋱ ⋱ 1 u n − 1 1 ] \begin{bmatrix} b_1 & c_1 \\ a_2 & b_2 & c_2\\ & a_3 &b_3 &c_3 \\ & & \ddots & \ddots &\ddots \\ & & & a_{n-1} &b_{n-1} & c_{n-1}\\ &&&& a_n & b_n \end{bmatrix} =\begin{bmatrix} d_1 & \\ l_2 & d_2 &\\ & l_3 &d_3 & \\ & & \ddots & \ddots & \\ &&& l_n & d_n \end{bmatrix} \begin{bmatrix} 1 & u_1 \\ & 1 &u_2\\ & & \ddots & \ddots & \\ &&& 1 & u_{n-1}\\ &&&&1 \end{bmatrix} ⎣⎢⎢⎢⎢⎢⎢⎡b1a2c1b2a3c2b3⋱c3⋱an−1⋱bn−1ancn−1bn⎦⎥⎥⎥⎥⎥⎥⎤=⎣⎢⎢⎢⎢⎡d1l2d2l3d3⋱⋱lndn⎦⎥⎥⎥⎥⎤⎣⎢⎢⎢⎢⎡1u11u2⋱⋱1un−11⎦⎥⎥⎥⎥⎤
among
L = [ d 1 l 2 d 2 l 3 d 3 ⋱ ⋱ l n d n ] , U = [ 1 u 1 1 u 2 ⋱ ⋱ 1 u n − 1 1 ] L=\begin{bmatrix} d_1 & \\ l_2 & d_2 &\\ & l_3 &d_3 & \\ & & \ddots & \ddots & \\ &&& l_n & d_n \end{bmatrix}, U=\begin{bmatrix} 1 & u_1 \\ & 1 &u_2\\ & & \ddots & \ddots & \\ &&& 1 & u_{n-1}\\ &&&&1 \end{bmatrix} L=⎣⎢⎢⎢⎢⎡d1l2d2l3d3⋱⋱lndn⎦⎥⎥⎥⎥⎤,U=⎣⎢⎢⎢⎢⎡1u11u2⋱⋱1un−11⎦⎥⎥⎥⎥⎤
,
And l i = a i l_i=a_i li=ai. It's not hard to find out , U U U Matrix is the coefficient matrix of the system of two diagonal equations on the unit we need .
How do we get U U U Array ? consider L L L and U U U Matrix multiplication of , The equations can be obtained { b 1 = d 1 c i = u i d i , i = 1 , 2 , 3 , 4 , ⋯ , n − 1 b i + 1 = u i a i + 1 + d i + 1 , \left\{ \begin{array}{lr} b_1=d_1\\ c_i=u_id_i,&i=1,2, 3,4,\cdots,{n-1}\\ b_{i+1}=u_ia_{i+1}+d_{i+1}, \end{array} \right. ⎩⎨⎧b1=d1ci=uidi,bi+1=uiai+1+di+1,i=1,2,3,4,⋯,n−1
So we can Line by line Determine the matrix L L L and U U U The elements of , Its calculation formula is { d 1 = b 1 u i = c i d i , i = 1 , 2 , 3 , 4 , ⋯ , n − 1 d i + 1 = b i + 1 − u i a i + 1 , \left\{ \begin{array}{lr} d_1=b_1\\ u_i=\frac {c_i}{d_i},&i=1,2, 3,4,\cdots,{n-1}\\ d_{i+1}=b_{i+1}-u_ia_{i+1}, \end{array} \right. ⎩⎨⎧d1=b1ui=dici,di+1=bi+1−uiai+1,i=1,2,3,4,⋯,n−1
solve A x = f Ax=f Ax=f It can be equivalent to solving L ( U x ) = f L(Ux)=f L(Ux)=f, That is, it is equivalent to solving L y = f Ly=f Ly=f and U x = y Ux=y Ux=y Two equations .
about L y = f Ly=f Ly=f, It is the lower two diagonal equations , The specific form is { d 1 y 1 = f 1 a i y i − 1 + d i y i = f i , i = 2 , 3 , 4 , ⋯ , n \left\{ \begin{array}{lr} d_1y_1=f_1\\ a_iy_{i-1}+d_iy_i=f_i,&i=2, 3,4,\cdots,{n} \end{array} \right. { d1y1=f1aiyi−1+diyi=fi,i=2,3,4,⋯,n
Huidai , have to { y 1 = f 1 d 1 y i = f i − a i y i − 1 d i , i = 2 , 3 , 4 , ⋯ , n \left\{ \begin{array}{lr} y_1=\frac{f_1}{d_1}\\ y_i=\frac{f_i-a_iy_{i-1}}{d_i},&i=2, 3,4,\cdots,{n} \end{array} \right. { y1=d1f1yi=difi−aiyi−1,i=2,3,4,⋯,n
about U x = y Ux=y Ux=y, It is the system of two diagonal equations on the unit , The solution can be obtained by using the back substitution process in the catch-up method .
边栏推荐
- LeetCode 30. Concatenate substrings of all words
- LeetCode 508. 出现次数最多的子树元素和
- 传统企业数字化转型需要经过哪几个阶段?
- LeetCode 532. K-diff number pairs in array
- npm install安装依赖包报错解决方法
- Beego learning - JWT realizes user login and registration
- 【Kotlin学习】运算符重载及其他约定——重载算术运算符、比较运算符、集合与区间的约定
- [graduation season | advanced technology Er] another graduation season, I change my career as soon as I graduate, from animal science to programmer. Programmers have something to say in 10 years
- 【点云处理之论文狂读经典版13】—— Adaptive Graph Convolutional Neural Networks
- Method of intercepting string in shell
猜你喜欢
图像修复方法研究综述----论文笔记
我们有个共同的名字,XX工
精彩回顾|I/O Extended 2022 活动干货分享
Discussion on enterprise informatization construction
传统办公模式的“助推器”,搭建OA办公系统,原来就这么简单!
2022-2-13 learning the imitation Niuke project - home page of the development community
Vscode connect to remote server
Pic16f648a-e/ss PIC16 8-bit microcontroller, 7KB (4kx14)
AcWing 785. 快速排序(模板)
LeetCode 241. 为运算表达式设计优先级
随机推荐
[point cloud processing paper crazy reading classic version 12] - foldingnet: point cloud auto encoder via deep grid deformation
我們有個共同的名字,XX工
Windows安装Redis详细步骤
The less successful implementation and lessons of RESNET
LeetCode 513. 找树左下角的值
Tag paste operator (#)
Build a solo blog from scratch
2022-2-14 learning the imitation Niuke project - send email
2022-2-13 learn the imitation Niuke project - Project debugging skills
【点云处理之论文狂读经典版7】—— Dynamic Edge-Conditioned Filters in Convolutional Neural Networks on Graphs
Method of intercepting string in shell
Uc/os self-study from 0
Instant messaging IM is the countercurrent of the progress of the times? See what jnpf says
[point cloud processing paper crazy reading frontier edition 13] - gapnet: graph attention based point neural network for exploring local feature
数字化转型中,企业设备管理会出现什么问题?JNPF或将是“最优解”
Explanation of the answers to the three questions
excel一小时不如JNPF表单3分钟,这样做报表,领导都得点赞!
【点云处理之论文狂读经典版12】—— FoldingNet: Point Cloud Auto-encoder via Deep Grid Deformation
我们有个共同的名字,XX工
【点云处理之论文狂读经典版9】—— Pointwise Convolutional Neural Networks