数值分析-5[1].5 Piecewise Polynomial__ Interpolation
数值分析课程第五版课后习题答案
*
[解] = (0.031 × 385.6) 1 × 10 − 4 + (1.1021 × 385.6) 1 × 10 −3 + (1.1021 × 0.031) 1 × 10 −3 ; 2 2 2 −3 −3 −3 = 0.59768 × 10 + 212.48488 × 10 + 0.01708255 × 10 = 213.09964255 × 10 −3 = 0.21309964255
ε * (R* ) 1 1 1 从而 ε * ( R * ) = 1% × R * ,故 ε r* ( R * ) = 。 = 1% × = * 3 300 3 R
6 、设 Y0 = 28 ,按递推公式 Yn = Yn −1 − 1 783 (n = 1,2, ) 计算到 Y100 ,若取 100
783 ≈ 27.982 (五位有效数字, )试问计算 Y100 将有多大误差? [解]令 Yn 表示 Yn 的近似值, e * (Yn ) = Yn − Yn ,则 e * (Y0 ) = 0 ,并且由 1 1 × 27.982 , Yn = Yn −1 − × 783 可知, 100 100 1 × (27.982 − 783 ) ,即 Yn − Yn = Yn −1 − Yn −1 − 100 1 2 从 e * (Yn ) = e * (Yn −1 ) − × (27.982 − 783 ) = e * (Yn − 2 ) − × (27.982 − 783 ) = , 100 100 Yn = Yn −1 − 而 e * (Y100 ) = e * (Y0 ) − (27.982 − 783 ) = 783 − 27.982 ,
而 783 − 27.982 ≤
1 1 × 10 −3 ,所以 ε * (Y100 ) = × 10 −3 。 2 2
一种有效的分段光滑信号逼近方法
一种有效的分段光滑信号逼近方法陈伟【摘要】The truncating Fourier and continue wavelet representation of a discontinuous piecewise smooth signal will introduce an unneglectable error which was named as the Gibbs phenomenon.In this paper,we proposed an effective piece-wise smooth signal approximation method.Firstly,a set of normal orthogonal piecewise polynomials was constructed ac-cording to the given positions of breaking points,and it has the properties of orthogonality,convergence and reproduction. Then the signal was orthogonal decomposed under this basis and the best square approximation result could be obtained using reconstruction.The numerical experiments show that our method have the higher accuracy approximation results than the other basis.%传统的Fourier变换,连续小波变换等方法在逼近具有分段光滑特性的非连续信号时,因 Gibbs现象的干扰会产生比较大的误差。
本文提出了一种有效的分段光滑信号逼近方法。
数值分析第五版第5章学习资料
n
即 de(A t) aijAij (i1,2,,n), j1
其中 A ij 为 a ij 的代数余子式,Aij(1)ijMij, M ij 为元素 a ij 的余子式.
行列式性质:
( ad ) ( A e ) d t B ( A e )d ( t B )A e , ,B t R n n .
有非零解,故系数行列式 deIt (A)0,记
a11 a12 p()det(I A) a21 a22
a1n a2n
(1.3)
an1 an2 ann n c1n1cn1cn 0.
p()称为矩阵 A的特征多项式,方程(1.3)称为矩阵 A的特
征方程.
9
因为 n次代数方程 p() 在复数域中有 n个根
其中用 ri 表示矩阵的第 i行. 由此看出,用消去法解方程组的基本思想是用逐次消
去未知数的方法把原方程组 Axb化为与其等价的三角 形方程组,而求解三角形方程组可用回代的方法.
上述过程就是用行的初等变换将原方程组系数矩阵化 为简单形式(上三角矩阵),从而将求解原方程组(2.1)的 问题转化为求解简单方程组的问题.
n
n
trA aii i.
i1
i1
(1.4) (1.5)
称 trA为 A的迹.
A的特征值 和特征向量 x还有一下性质:
(1) AT 与 A有相同的特征值 及特征向量 .
(2)若 A非奇异,则 A1 的特征值为 1,特征向量为 x.
(3)相似矩阵 BS1AS有相同的特征多项式.
11
例1 求 A的特征值及谱半径
4x2x3 5,
2x3 6.
显然,方程组(2.6)是容易求解的,解为
x (1,2,3)T.
第5章 6.分段插值法
1 [ x i −1 , x i ]内是三次多项式 )
2 S 3 ( x )和S '3 ( x )在[a , b]上连续 )
3 S 3 ( x i ) = y i , S ' 3 ( x i ) = y'i , )
Hermite 插值,记 hi = xi − x i −1 插值,
i = 0,1,L n
分段插值法
邹昌文
分段插值法/piecewise polynomial approximation/
•高次插值的龙格/Runge/现象 高次插值的龙格/ 高次插值的龙格 / 插值多项式余项公式说明插值节点越多, 插值多项式余项公式说明插值节点越多,一般 说来误差越小,函数逼近越好,但这也不是绝对的, 说来误差越小,函数逼近越好,但这也不是绝对的, 因为余项的大小既与插值节点的个数有关, 因为余项的大小既与插值节点的个数有关,也与函 f(x)的高阶导数有关 换句话说, 的高阶导数有关。 数f(x)的高阶导数有关。换句话说,适当地提高插 值多项式的次数,有可能提高计算结果的准确程度, 值多项式的次数,有可能提高计算结果的准确程度, 但并非插值多项式的次数越高越好。 但并非插值多项式的次数越高越好。当插值节点增 多时,不能保证非节点处的插值精度得到改善, 多时,不能保证非节点处的插值精度得到改善,有 时反而误差更大。 时反而误差更大。考察函数
例:在[−5, 5]上考察 f ( x ) = −
2.5
1 1 + x2
的Ln(x)。取 xi = −5 + 10 i (i = 0, ... , n) 。
n
2
Ln(x) × f (x) →
1.5
1
0.5
0
n 越大, 越大, 端点附近抖动 越大, 越大,称为 Runge 现象
数值分析第五版课后习题答案
数值分析第五版课后习题答案数值分析是一门应用数学的分支学科,主要研究如何利用数值方法解决实际问题。
在学习这门课程的过程中,课后习题是不可或缺的一部分。
本文将对《数值分析第五版》的课后习题进行一些探讨和解答。
第一章是数值分析的导论,主要介绍了误差分析和计算方法的基本概念。
在课后习题中,有一道题目是关于误差传播的。
假设有一个函数f(x, y) = x^2 + y^2,其中x和y的测量误差分别为Δx和Δy,要求计算f(x, y)的误差。
解答:根据误差传播公式,可以得到f(x, y)的误差为Δf = √[(∂f/∂x)^2 *(Δx)^2 + (∂f/∂y)^2 * (Δy)^2]。
对于本题而言,∂f/∂x = 2x,∂f/∂y = 2y。
代入公式,得到Δf = √[(2x)^2 * (Δx)^2 + (2y)^2 * (Δy)^2] = 2√(x^2 * (Δx)^2+ y^2 * (Δy)^2)。
第二章是插值与多项式逼近的内容。
其中一道习题涉及到拉格朗日插值多项式。
给定n+1个数据点(x0, y0), (x1, y1), ..., (xn, yn),要求构造一个n次多项式p(x),使得p(xi) = yi (i = 0, 1, ..., n)。
解答:拉格朗日插值多项式的表达式为p(x) = Σ(yi * Li(x)),其中Li(x) = Π[(x - xj) / (xi - xj)],j ≠ i。
将数据点代入表达式中,即可得到所求的多项式。
第三章是数值微积分的内容,其中一道习题是关于数值积分的。
给定一个函数f(x),要求使用复化梯形公式计算定积分∫[a, b]f(x)dx。
解答:复化梯形公式的表达式为∫[a, b]f(x)dx ≈ h/2 * [f(a) + 2Σf(xi) + f(b)],其中h = (b - a)/n,xi = a + i * h (i = 1, 2, ..., n-1)。
根据给定的函数f(x),代入公式中的各个值,即可得到近似的定积分值。
数值分析第5版
数值分析第5版简介数值分析是研究利用计算机进行数值计算的一门学科。
它包括了近似计算、数值解法、误差分析等内容,广泛应用于科学计算、工程计算以及其他领域。
《数值分析第5版》是数值分析领域的经典教材,由Richard L. Burden和J. Douglas Faires共同撰写。
内容概述本教材共分为12个章节,从基础概念开始,逐步介绍各种数值计算方法和技术。
以下是每个章节的简要介绍。
第1章:导论本章介绍了数值分析的基本概念和应用领域。
阐述了数值计算的重要性,并介绍了课程所涉及的主要内容和学习方法。
第2章:误差分析本章讲解了数值计算中的误差类型和误差分析方法。
包括绝对误差和相对误差的定义与计算、舍入误差、截断误差等。
第3章:插值与多项式逼近本章介绍了数值计算中的插值和多项式逼近方法。
包括拉格朗日插值、牛顿插值、三次样条插值等。
讲解了这些方法的原理和实现过程。
第4章:数值积分与数值微分本章讲解了数值计算中的数值积分和数值微分方法。
包括梯形法则、辛普森法则、数值微分的定义和计算过程。
第5章:非线性方程的数值解本章介绍了求解非线性方程的数值解法。
包括二分法、牛顿法、割线法等。
讲解了这些方法的原理和应用。
第6章:线性代数方程组的数值解法本章讲解了求解线性代数方程组的数值解法。
包括高斯消元法、LU分解法、迭代法等。
详细讲解了这些方法的原理和计算过程。
第7章:矩阵特征值问题本章介绍了求解矩阵特征值问题的数值解法。
包括幂法、反幂法、QR方法等。
讲解了这些方法的原理和实现过程。
第8章:常微分方程的数值解本章介绍了求解常微分方程的数值解法。
包括欧拉法、龙格-库塔法、多步法等。
讲解了这些方法的原理和应用。
第9章:偏微分方程的数值解本章讲解了求解偏微分方程的数值解法。
包括有限差分法、有限元法等。
详细讲解了这些方法的原理和实现过程。
第10章:函数逼近与数据拟合本章介绍了函数逼近和数据拟合的方法。
包括最小二乘法、曲线拟合等。
数值分析第五版第5章习题答案
第5章
)矩阵行列式的值很小。
)矩阵的范数小。
)矩阵的范数大。
(7)奇异矩阵的范数一定是零。
答:错误,
∞
•可以不为0。
(8)如果矩阵对称,则|| A||1 = || A||∞。
答:根据范数的定义,正确。
(9)如果线性方程组是良态的,则高斯消去法可以不选主元。
答:错误,不选主元时,可能除数为0。
(10)在求解非奇异性线性方程组时,即使系数矩阵病态,用列主元消去法产生的误差也很小。
答:错误。
对于病态方程组,选主元对误差的降低没有影响。
(11)|| A ||1 = || A T||∞。
答:根据范数的定义,正确。
(12)若A是n n的非奇异矩阵,则
)
(
cond
)
(
cond1-
=A
A。
答:正确。
A是n n的非奇异矩阵,则A存在逆矩阵。
根据条件数的定义有:
1
111111 cond()
cond()()
A A A
A A A A A A A
-
------
=•
=•=•=•
习题
如有侵权请联系告知删除,感谢你们的配合!。
数值分析第五版答案(全)
第一章 绪论1.设0x >,x 的相对误差为δ,求ln x 的误差。
解:近似值*x 的相对误差为*****r e x xe x x δ-=== 而ln x 的误差为()1ln *ln *ln **e x x x e x =-≈进而有(ln *)x εδ≈2.设x 的相对误差为2%,求n x 的相对误差。
解:设()nf x x =,则函数的条件数为'()||()p xf x C f x = 又1'()n f x nx-=, 1||n p x nx C n n-⋅∴== 又((*))(*)r p r x n C x εε≈⋅且(*)r e x 为2]((*))0.02n r x n ε∴≈3.下列各数都是经过四舍五入得到的近似数,即误差限不超过最后一位的半个单位,试指出它们是几位有效数字:*1 1.1021x =,*20.031x =, *3385.6x =, *456.430x =,*57 1.0.x =⨯解:*1 1.1021x =是五位有效数字; *20.031x =是二位有效数字; *3385.6x =是四位有效数字; *456.430x =是五位有效数字; *57 1.0.x =⨯是二位有效数字。
4.利用公式求下列各近似值的误差限:(1) ***124x x x ++,(2) ***123x x x ,(3) **24/x x .其中****1234,,,x x x x 均为第3题所给的数。
解: {*41*32*13*34*151()1021()1021()1021()1021()102x x x x x εεεεε-----=⨯=⨯=⨯=⨯=⨯***124***1244333(1)()()()()1111010102221.0510x x x x x x εεεε----++=++=⨯+⨯+⨯=⨯ ***123*********123231132143(2)()()()()1111.10210.031100.031385.610 1.1021385.6102220.215x x x x x x x x x x x x εεεε---=++=⨯⨯⨯+⨯⨯⨯+⨯⨯⨯≈**24****24422*4335(3)(/)()()110.0311056.430102256.43056.43010x x x x x x xεεε---+≈⨯⨯+⨯⨯=⨯=5计算球体积要使相对误差限为1,问度量半径R 时允许的相对误差限是多少 解:球体体积为343V R π=则何种函数的条件数为23'4343p R V R R C V R ππ===(*)(*)3(*)r p r r V C R R εεε∴≈=又(*)1r V ε=%1:故度量半径R 时允许的相对误差限为εε(ε∗)=13∗1%=13006.设028Y =,按递推公式1n n Y Y -=(n=1,2,…)计算到100Y 27.982≈(5位有效数字),试问计算100Y 将有多大误差解:1n n Y Y -=10099Y Y ∴=9998Y Y =9897Y Y =……10Y Y =依次代入后,有1000100Y Y =- %即1000Y Y =27.982≈, 100027.982Y Y ∴=-*310001()()(27.982)102Y Y εεε-∴=+=⨯100Y ∴的误差限为31102-⨯。
第5章插值法3
( 4) ( ) f ( 4) ( ) k ( x)4! 0 ,
所以
f ( 4) ( ) k ( x) . 4!
f ( 4) ( ) R( x) f ( x) P3 ( x) ( x x0 )(x x1 ) 2 ( x x2 ) , 4!
构造函数
(t ) f (t ) P3 (t ) k ( x)(t x0 )(t x1 ) 2 (t x2 ) ,
显然, ( x) 0, ( x0 ) 0, ( x1 ) 0, ( x2 ) 0 ,且 x1 为
(t ) 的二重零点(共5个零点),反复应用Rolle定理可知, (t ) 在 [ x0 , x2 ] 内至少有4个互异的零点,…, ( 4) (t ) 在
~ Q( x) H 2n1 ( x) H 2n1 ( x) 为次数不超过 2n 1 的多项式,且满足条件 Q( xi ) 0, Q( xi ) 0, i 0,1,, n. 这说明 x xi (i 0,1,, n) 都是 Q ( x) 的二重零点,即 Q( x) 共有 2n 2 个零点,故 Q( x) 0 ,即 ~ H 2n1 ( x) H 2n1 ( x) .
(t ) f (t ) H 2n1 (t ) k ( x) [ (t xi )]2 ,
易知 ( xi ) ( xi ) 0, (i 0,1,, n) 且 ( x) 0 (有 2n 3 个零点). 而由对 f ( x) 的假设及 H 2 n 2 ( x) 知, (t ) 具有 2n 2 阶导数.对 (t )反复应用Rolle定理,可知在 ( a, b) 内至
x
数值分析的一个小结
Interpolation and Polynomial ApproximationXue Jingnan(200805090173)April1,2011AbstractIn this report,we reviewed three different interpolations and polynomial ap-proximations[1]respectively,say,Lagrange Polynomial,Hermite Interpolation and Cubic Spline Interpolation.We introduced their algorithm descriptions, related mathematical deductions and applications to practical problems respec-tively.Moreover,a brief discussion of their advantages and limits are presented at last.Contents1Introduction2 2Interpolation and the Lagrange Polynomial42.1Mathematical deduction (4)2.2Numerical experiments (5)2.2.1Example1 (5)2.2.2Example2 (6)3Hermite Interpolation93.1Mathematical deduction (9)3.2Algorithm description (11)3.2.1pseudocode (11)3.2.2code (12)3.3Numerical experiments (12)3.3.1Example1 (12)3.3.2Example2 (13)4Cubic Spline Interpolation164.1Mathematical deduction (16)4.2Algorithm description (18)4.2.1pseudocode (18)4.2.2code (20)4.3Numerical experiments (21)4.3.1Example1 (21)4.3.2Example2 (21)5Discussion and Conclusion235.1Interpolation and the Lagrange Polynomial (23)5.2Hermite Interpolation (23)5.3Cubic Spline Interpolation (23)1Chapter1IntroductionOne of the most useful and well-known classes of functions mapping the set of real numbers into itself is the class of algebraic polynomials,the set of functions of the formP n(x)=a n x n+a n−1x n−1+···+a1x+a0where n is a nonnegative integer and a0,...,a n are real constants.One reason for their importance is that they uniformly approximate continuous functions. Given any function,defined and continuous on a closed and bounded inter-val,there exists a polynomial that is as”close”to the given function as desired. Another important reason for considering the class of polynomials in the approx-imation of functions is that the derivative and indefinite integral of a polynomial are easy to determine and are also polynomials.For these reasons,polynomials are often used for approximating continuous functions.In this report,we discussed approximating a function using polynomials and piecewise polynomials.The function can be specified by a given defining equation or by providing points in the plane through which the graph of the function passes.A set of nodes x0,x1,···,x n is given in each case,and more information,such as the value of various derivatives,may also be required.We need tofind an approximating function that satisfies the conditions specified by these dataThe interpolating polynomial P(x)is the polynomial of least degree that satisfies,for a function f,P(x i)=f(x i),for each i=0,1,...,n.Although this interpolating polynomial is unique,it can take many different forms.The Lagrange form is most often used for interpolating tables when n is small and for deriving formulas for approximating derivatives and integrals. Neville’s method is used for evaluating several interpolating polynomials for computation and are also used extensively for deriving formulas for solving differential equations.The Hermite polynomials interpolate a function and its2CHAPTER1.INTRODUCTION3 derivative at the nodes.They can be very accurate but require more information about the function being approximated.When there are a large number of nodes,the Hermite polynomials also exhibit oscillation weaknesses.However,polynomial interpolation has the inherent weaknesses of oscillation, particularly if the number of nodes is large.In this case,there are other methods that can be better applied,the most commonly used one of which is piecewise-polynomial interpolation.If function and derivative values are available,piece-wise cubic Hermite interpolation is recommended.This is the preferred method for interpolating values of function that is the solution to a different equation. When only the function values are available,free cubic spline interpolation can be used.This spline forces the second derivative of the spline to be zero at the endpoints.Other cubic splines require additional data.For example,the clamped cubic spline needs values of the derivative of the function at the end-points of the interval.Chapter2Interpolation and the Lagrange Polynomial2.1Mathematical deductionThe problem of determining a polynomial of degree one that passes through the distinct points(x0,y0)and(x1,y1)is the same as approximating a function f for which f(x0)=y0and y(x1)=y1by means of afirst-degree polynomial interpolating,or agreeing with,or agreeing with,the values of f at the given points.Wefirst define the functionsL0(x)=x−x1x0−x1and L1(x)=x−x0x1−x0and then defineP(x)=L0(x)f(x0)+L1(x)f(x1).SinceL0(x0)=1,L0(x1)=0,L1(x0)=0,and L1(x1)=1,we haveP(x0)=1·f(x0)+0·f(x1)=f(x0)=y0andP(x1)=0·f(x0)+1·f(x1)=f(x1)=y1So P is the unique linear function passing through(x0,y0)and(x1,y1).To generalize the concept of linear interpolation,consider the construction of a polynomial of degree at most n that passes through the n+1points(x0,f(x0),(x1,f(x1),...(x n,f(x n).In this case we need to construct,for each k=0,1,...,n,a function L n,k(x) with the property that L n,k(x i)=0when i=k and L n,k(x k)=1.To satisfy4CHAPTER2.INTERPOLATION AND THE LAGRANGE POLYNOMIAL5 L n,k(x i)=0for each i=k requires that the numerator of L n,k(x)contains the term(x−x0)(x−x1)(x−x2)···(x−x k−1)(x−x k+1)···(x−x n).To satisfy L n,k(x)=1,the denominator of L n,k(x)must be equal to this term evaluated at x=x k.Thus,L n,k(x)=(x−x0)(x−x1)(x−x2)···(x−x k−1)(x−x k+1)···(x−x n)(x k−x0)(x k−x1)(x k−x2)···(x k−x k−1)(x k−x k+1)···(x k−x n).The interpolating polynomial is easily described once the form of L n,k is known.This polynomial,called the n th Lagrange interpolating polyno-mial,is defined in the following theorem.Theorem2.1If x0,x1,···,x n are n+1distinct numbers and f is a function whose values are given at these numbers,then a unique polynomial P(x)of degree at most n exists withf(x k)=P(x k),for each k=0,1,...,n.This polynomial is given byP(x)=f(x0)L n,0(x)+···+f(x n)L n,n(x)=nk=0f(x k)L n,k(x),(2.1)where,for each k=0,1,···,n,L n,k(x)=(x−x0)(x−x1)(x−x2)···(x−x k−1)(x−x k+1)···(x−x n) (x k−x0)(x k−x1)(x k−x2)···(x k−x k−1)(x k−x k+1)···(x k−x n)=ni=0i=kx−x ix k−x i.(2.2)We will write L n,k(x)simply as L k(x)when there is no confusion as to its degree2.2Numerical experiments2.2.1Example1Using the numbers(or nodes)x0=2,x1=2.5,and x2=4tofind the second in-terpolating polynomial for f(x)=1/x requires that we determine the coefficient polynomials L0(x),L1(x),and L2(x).In nested form they areL0(x)=(x−2.5)(x−4)(2−2.5)(2−4)=(x−6.5)x+10,L1(x)=(x−2)(x−4)(2.5−2)(2.5−4)=(−4x+24)x−323,CHAPTER 2.INTERPOLATION AND THE LAGRANGE POLYNOMIAL 6andL 2(x )=(x −2)(x −2.5)(4−2)(4−2.5)=(x −4.5)x +53Since f (x 0)=f (2)=0.5,f (x 1)=f (2.5)=0.4,and f (x 2)=f (4)=0.25,we haveP (x )=2k =0f (x k )L k (x )=0.5((x −6.5)x +10)+0.4((−4x +24)x −323)+0.25(x −4.5)x +53=(0.05x −0.425)x +1.15.An approximation to f (3)=1/3isf (3)≈P (3)=0.3252.2.2Example 2For the given functions f (x ),let x 0=0,x 1=0.6,and x 2=0.9.Construct interpolation polynomials of degree at most two to approximate f (0.45),and find the actual error.(1)f (x )=cos x (2)f (x )=√1+x (3)f (x )=ln(x +1)(4)f (x )=tan xAt the beginning,we determined the coefficient polynomials L 0(x ),L 1(x ),and L 2(x ).In nested form they areL 0(x )=(x −0.6)(x −0.9)(0−0.6)(0−0.9)=5027[(x −1.5)x +0.54]+10,L 1(x )=(x −0)(x −0.9)(0.6−0)(0.6−0.9)=−509(x −0.9)x )L 2(x )=(x −0)(x −0.6)(0.9−0)(0.9−0.6)=10027(x −0.6)x (1)f (x )=cos xSince f (x 0)=f (0)=1,f (x 1)=f (0.6)=cos(0.6)≈0.8253,and f (x 2)=f (0.9)≈0.6216,we haveP (x )=2k =0f (x k )L k (x )≈(5027[(x −1.5)x +0.54]+0.8253[−509(x −0.9)x )]+0.6216[10027(x −0.6)x ]≈(−0.4309x −0.0326)x +1CHAPTER2.INTERPOLATION AND THE LAGRANGE POLYNOMIAL7An approximation to f(0.45)=cos(0.45)=0.9004isf(0.45)≈P(0.45)=0.8980And the actual error is f(0.45)−P(0.45)=2.4×10−3(2)f(x)=√1+xSince f(x0)=f(0)=1,f(x1)=f(0.6)≈1.2649, and f(x2)=f(0.9)≈1.3784,we haveP(x)=2k=0f(x k)L k(x)≈(5027[(x−1.5)x+0.54]+1.2649[−509(x−0.9)x)]+1.3784[10027(x−0.6)x]≈(−0.0702x+0.4836)x+1An approximation to f(0.45)=1.2042isf(0.45)≈P(0.45)=1.2034 And the actual error is f(0.45)−P(0.45)=7.955×10−4 (3)f(x)=ln(1+x)Since f(x0)=f(0)=0,f(x1)=f(0.6)≈0.4700,and f(x2)=f(0.9)≈0.6419,we haveP(x)=2k=0f(x k)L k(x)≈0.4700[−509(x−0.9)x)]+0.6419[10027(x−0.6)x]≈(−0.2337x+0.9236)xAn approximation to f(0.45)=0.3716isf(0.45)≈P(0.45)=0.3683 And the actual error is f(0.45)−P(0.45)=3.3×10−3 (4)f(x)=tan xSince f(x0)=f(0)=0,f(x1)=f(0.6)≈0.6841,and f(x2)=f(0.9)≈1.2602,we haveP(x)=2k=0f(x k)L k(x)≈0.6841[−509(x−0.9)x)]+1.2602[10027(x−0.6)x]≈(0.8669x+0.6200)xCHAPTER2.INTERPOLATION AND THE LAGRANGE POLYNOMIAL8An approximation to f(0.45)=0.4830isf(0.45)≈P(0.45)=0.4545And the actual error is f(0.45)−P(0.45)=0.0285Chapter3Hermite InterpolationLet x0,x1,...,x n be n+1distinct numbers in[a,b]and m i be a nonnegative integer associated with x i,for i=0,1,...,n.Suppose that f∈C m[a,b], where m=max0≤i≤n m i.The osculating polynomial approximating f is the polynomial P(x)of least degree such thatd k P(x i) dx k =d k f(x i)dx k,for each i=0,1,...,n and k=0,1,...,nNote that when n=0,the osculating polynomial approximating f is the m0th Taylor polynomial for f at x0.When m i=0for each i,the osculating polynomial is the n th Lagrange polynomial interpolating f on x0,x1,...,x n The case when m i=1,for each i,gives the Hermite polynomials.For a given function f,these polynomials agree with those of f,they have the same ”shape”as the function at(x i,f(x i))in the sense that the tangent lines to the polynomial and to the function agree.We will restrict our study of osculating polynomials to this situation.3.1Mathematical deductionFirstly,consider a theorem that describes precisely the form of the Hermite polynomials.Theorem3.1If f∈C1[a,b]and x0,...,x n∈[a,b]are distinct,the unique polynomial of least degree agreeing with f and f at x0,...,x n is the Hermite polynomial of degree at most2n+1given byH2n+1(x)=nj=0f(x j)H n,j(x)+nj=0f (x j)ˆH n,j(x)whereH n,j(x)=[1−2(x−x j)L n,j(x j)]L2n,j(x)9CHAPTER3.HERMITE INTERPOLATION10andˆHn,j(x)=(x−x j)L2n,j(x)In this context,L n,j(x)denotes the j th Lagrange coefficient polynomial of degree n defined in Chapter2.Moreover,if f∈C2n+2[a,b],thenf(x)=H2n+1(x)+(x−x0)2...(x−x n)2(2n+2)!f2n+2(ξ)for someξwith a<ξ<bAlthough Theorem3.1provides a complete description of the Hermite poly-nomials,it is clear that the need to determine and evaluate the Lagrange poly-nomials and their derivatives makes the procedure tedious even for small values of n.An alternative method for generating Hermite approximations has as its basis the Newton interpolatory divided-difference formula for the Lagrange polynomial at x0,x1,...,x n,P n(x)=f[x0]+nk=1f[x0,x1,...,x k](x−x0)···(x−x k−1)and the connection between the n th divided difference and n th derivative of f.Suppose that the distinct numbers x0,x1,/dots,x n are given together with the values of f and f at these numbers.Define a new sequence z0,z1,...,z2n+1 byz2i=z2i+1=x i,for each i=0,1,...,n,and construct the divided difference table that uses z0,z1,....z2n+1 Since z2i=z2i+1=x i,for each i,we cannot define f[z2i,z2i+1]by the divided difference formula.If we assume that the reasonable substitution in this situation is f[z2i,z2i+1]=f (z2i)=f (x i),we can use the entriesf (x0),f (x1),...,f (x n)in place of the undefinedfirst divided differencesf[z0,z1],f[z2,z3],...,f[z2n,z2n+1]The remaining divided differences are produced as usual,and the appropriate divided differences are employed in Newton’s interpolatory divided-difference formula.The Hermite polynomial is given byH2n+1(x)=f[z0]+2n+1k=1f[z0,...,x k](x−z0)(x−z1)...(x−z k−1)CHAPTER3.HERMITE INTERPOLATION11 3.2Algorithm description3.2.1pseudocodeTo obtain the coefficients of the Hermite interpolating polynomial H(x)on the (n+1)distinct numbers x0,...,x n for the function f:INPUT numbers x0,x1,...,x n;values f(x0),...,f(x n)and f (x0),...,f (x n) OUTPUT the numbers Q0,0,Q1,1,...,Q2n+1,2n+1whereH(x)=Q0,0+Q1,1(x−x0)+Q2,2(x−x0)2+Q3,3(x−x0)2(x−x1) +Q4,4(x−x0)2(x−x1)2+···+Q2n+1,2n+1(x−x0)2(x−x1)2···(x−x n−1)2(x−x n)Step1For i=0,1,...,n do Step2and3Step2Set z2i=x i;z2i+1=x i;Q2i,0=f(x i);Q2i+1,0=f(x i)Q2i+1,1=f (x i)Step3If i=0then setQ2i,1=Q2i,0−Q2i−1,0 z2i−z2i−1Step4For i=2,3,...,2n+1for j=2,3,...,i setQ i,j=Q i,j−1−Q i−1,j−1z i−z i−jStep5OUTPUT(Q0,0,Q1,1...Q2n+1,2n+1) STOPCHAPTER3.HERMITE INTERPOLATION12 3.2.2code3.3Numerical experiments3.3.1Example1Use the Hermite polynomial that agrees with the data in Table3.1tofind an approximation of f(1.5)Table3.1:Example1k x k f(x k)f (x k)11.30.6200860−0.522023221.60.4554022−0.569895931.90.2818186−0.5811571Table3.2shows the entries that are used for determining the Hermite poly-nomial H5(x)for x0,x1,and x2.The entries in Table3.3use the given data.CHAPTER3.HERMITE INTERPOLATION13H5(1.5)=0.6200860+(1.5−1.3)(−0.5220232)+(1.5−1.3)2(−0.0897427) +(1.5−1.3)2(1.5−1.6)(0.0663657)+(1.5−1.3)2(1.5−1.6)2(0.0026663)+(1.5−1.3)2(1.5−1.6)2(1.5−1.9)(−0.0027738)=0.51182773.3.2Example2Use Hermite interpolation to construct an approximating polynomial for the following data The entries in Table3.5use the given data.H5(x)=−0.0247500+(x+0.5)(0.7510000)+(x+0.5)2(2.7510000)+(x+0.5)2(x+0.25)CHAPTER3.HERMITE INTERPOLATION14Table3.2:z f(z)First divided differences Second divideddifferencesz0=x0f[z0]=f(x0)f[z0,z1]=f (x0)z1=x0f[z1]=f(x0)f[z0,z1,z2]f[z1,z2]=f[z2]−f[z1]z2−z1z2=x1f[z2]=f(x1)f[z1,z2,z3]f[z2,z3]=f (x1)z3=x1f[z3]=f(x1)f[z2,z3,z4]f[z3,z4]=f[z4]−f[z3]z4−z3z4=x2f[z4]=f(x2)f[z3,z4,z5]f[z4,z5]=f (x2)z5=x2f[z5]=f(x2)Third divided differences Fourth divideddifferencesFifth divided differencesf[z0,z1,z2,z3]f[z0,z1,z2,z3,z4]f[z1,z2,z3,z4]f[z0,z1,z2,z3,z4,z5]f[z1,z2,z3,z4,z5]f[z2,z3,z4,z5]CHAPTER3.HERMITE INTERPOLATION15Table3.3:1.30.6200860-0.52202321.30.6200860-0.0897427-0.54894600.06636571.60.4554022-0.06983300.0026663-0.56989590.0679655-0.0027738 1.60.4554022-0.02905370.0010020-0.57861200.06856671.90.2818186-0.0084837-0.58115711.90.2818186Table3.4:Example2k x k f(x k)f (x k)1−0.5−0.02475000.75100002−0.250.33493752.1890000301.1010004.0020000Table3.5:-0.5-0.02475000.7510000-0.5-0.0247500 2.75100001.43875001-0.250.3349375 3.001000002.189000010-0.250.3349375 3.501000003.064250010 1.1010000 3.75100004.00200000 1.1010000Chapter4Cubic Spline Interpolation The previous chapter concerned the approximation of arbitrary functions on closed intervals by the use of polynomials.However,the oscillatory nature of high-degree polynomials and the property that afluctuation over a small portion of the interval can induce largefluctuations over the entire rage restricts their use.An alternative approach is to divide the interval into a collection of subin-tervals and construct a(generally)different approximating polynomial on each subinterval.Approximation by functions of this type is called piecewise-polynomial approximationThe most common piecewise-polynomial approximation uses cubic polyno-mials between each successive pair of nodes and is called cubic spline in-terpolation.A general cubic polynomial involves four constants,so there is sufficientflexibility in the cubic spline procedure to ensure that the interpolant is not only continuously differentiable on the interval,but also has a continuous second derivative.The construction of the cubic spline does not,however,as-sume that the derivatives of the interpolant agree with those of the function it is approximating,even at the nodes.4.1Mathematical deductionGiven a function f defined on[a,b]and a set of nodes a=x0<x1</cdots< x n=b,a cubic spline interpolant S for f is a function that satisfies the following conditions:a.S(x)is a cubic polynomial,denoted S j(x),on the subinterval[x j,x j+1]foreach j=0,1,...,n−1;b.S(x j)=f(x j)for each j=0,1,...,n;c.S j+1(x j+1)=S j(x j+1)for each j=0,1,...,n−2;d.S j+1(x j+1)=S j(x j+1)for each j=0,1,...,n−2;16CHAPTER4.CUBIC SPLINE INTERPOLATION17e.S j+1(x j+1)=S j(x j+1)for each j=0,1,...,n−2;f.One of the following sets of boundary conditions is satisfied:(1)S (x0)=S (x n)=0(free or natural boundary)(2)S (x0)=f (x0)and S (x n)=f (x n(clamped boundary)Although cubic splines are defined with other boundary conditions,the con-ditions given in(f)are sufficient for our purposes.When the free boundary conditions occur,the spline is called a natural spline,and its graph approxi-mates the shape that a longflexible rod would assume if forced to go through the data points{(x0,f(x0)),(x1,f(x1)),...,(x n,f(x n))}.In this chapter,we only consider this oneTo construct the cubic spline interpolant for a given function f,the condi-tions in the definition are applied to the cubic polynomialsS j(x)=a j+b j(x−x j)+c j(x−x j)2+d j(x−x j)3for each j=0,1,...,n−1.SinceS j(x j)=a j=f(x j)condition(c)can be applied to obtaina j+1=S j+1(x j+1)=S j(x j+1)=a j+b j(x j+1−x j)+c j(x j+1−x j)2+d j(x j+1−x j)3 for each j=0,1,...,n−2.Since the terms x j+1−x j are used repeatedly in this development,it is convenient to introduce the simpler notationh j=x j+1−x jfor each j=0,1,...,n−1..If we also define a n=f(x n),then the equationa j+1=a j+b j h j+c j h2j+d j h3j(4.1) holds for each j=0,1,...,n−2In a similar manner,define b n=S (x n)and observe thatS j(x)=b j+2c j(x−x j)+3d j(x−x j)2implies S j(x j)=b j,for each j=0,1,...,n−1.Applying condition(d)givesb j+1=b j+2c j h j+3d j h2j,(4.2) for each j=0,1,...,n−2Another relationship between the coefficients of S j is obtained by defining c n=S (x n)/2and applying condition(e).Then,for each j=0,1,...,n−1,c j+1=c j+3d j h j(4.3)CHAPTER4.CUBIC SPLINE INTERPOLATION18 Solving for d j in Eq.(4.3)and substituting this value into Eqs.(4.1)and(4.2) gives,for j=0,1,...,n−1,the new equationsa j+1=a j+b j h j+h2j3(2c j+c j+1)(4.4)andb j+1=b j+h j(c j+c j+1)(4.5)Thefinal relationship involving the coefficients is obtained by solving the appropriate equation in the form of equation(3.4),first for b j,b j=1h j(a j+1−a j)−h j3(2c j+c j+1)(4.6)and then,with a reduction of the index,for b j−1.This givesb j−1=1h j−1(a j−a j−1)−h j−13(2c j−1+c j),Substituting these values into the equation derived from Eq(4.5),with the index reduced by one,gives the linear system of equations.h j−1c j−1+2(h j−1+h j)c j+h j c j+1=3h j(a j+1−a j)−3h j−1(a j−a j−1)(4.7)for each j=1,2,...,n−1.This system involves only the{c j}n j=0as unknownssince the values of{h j}n−1j=0and{a j}n j=0are given,respectively,by the spacingof the nodes{x j}n j=0and the values of f at the nodes.Note that once the values of{c j}n j=0are determined,it is a simple matter tofind the remainder of the constants{b j}n−1j=0from Eq.(4.6)and{d j}n−1j=0fromEq.(4.3),and to construct the cubic polynomials{S j(x)}n−1j=0.The major question that arises in connection with this construction is whether the values of{c j}n j=0can be found using the system of equations given in Eq.(4.7) and,if so,whether these values are unique.The following theorems indicate that this is the case when the free or natural boundary is imposed.As the proof of this theorem require some knowledge we haven’t learned,we decide not to introduce the proof to this report.Theorem4.1If f is defined at a=x0<x1<···<x n=b,then f has a unique natural spline interpolant S on the nodes x0,x1,....x n;that is,a spline interpolant that satisfies the boundary conditions S (a)=0and S (b)=0. 4.2Algorithm description4.2.1pseudocodeTo construct the cubic spline interpolant S for the function f,defined at the numbers x0<x1<···<x n,satisfying S (x0)=S (x n)=0:CHAPTER4.CUBIC SPLINE INTERPOLATION19INPUT n;x0,x1,...,x n;a0=f(x0),a1=f(x1),...,a n=f(x n).OUTPUT a j,b j,c j,d j for j=0,1,...,n−1.Step1For i=0,1,...,n−1set h i=x i+1−x i.Step2For i=1,...,n−1setαi=3h i(a i+1−a i)−3h i−1(a i−a i−1)Step3Set l0=1;u0=0;z0=0;Step4For i=1,2,...,n−1set l i=2(x i+1−x i−1)−h i−1u i−1;u i=h i/l iz i=(αi−h i−1z i−1)/l iStep5Set l n=1;z n=0;c n=0;Step6For j=n−1,n−2,...,0set c j=z j−u j c j+1;b j=(a j+1−a j)/h j−h j(c j+1+2c j)/3;d j=(c j+1−c j)/(3h j).Step7OUTPUT(a j,b j,c j,d j for j=0,1,...,n−1) STOPCHAPTER4.CUBIC SPLINE INTERPOLATION20 4.2.2codeCHAPTER4.CUBIC SPLINE INTERPOLATION21 4.3Numerical experiments4.3.1Example1Table4.1:Example1x0.9 1.3 1.9 2.1 2.6 3.0 3.9 4.4 4.7 5.0 f(x) 1.3 1.5 1.85 2.1 2.6 2.7 2.4 2.15 2.05 2.16.07.08.09.210.511.311.612.012.61313.32.25 2.3 2.25 1.95 1.40.90.70.60.50.40.25Using the codes above to generate the free cubic spline for this data produces the coefficients shown in Table4.2.Table4.2:j x j a j b j c j d j00.9 1.3 5.400.00-0.251 1.3 1.50.42-0.300.952 1.9 1.85 1.09 1.41-2.963 2.1 2.1 1.29-0.37-0.454 2.6 2.60.59-1.040.455 3.0 2.7-0.02-0.500.176 3.9 2.4-0.5-0.030.087 4.4 2.15-0.480.08 1.318 4.7 2.05-0.07 1.27-1.589 5.0 2.10.26-0.160.0410 6.0 2.250.08-0.030.00117.0 2.30.01-0.04-0.02128.0 2.25-0.14-0.110.02139.2 1.95-0.34-0.05-0.011410.5 1.4-0.53-0.10-0.021511.30.9-0.73-0.15 1.211611.0.7-0.490.94-0.841712.00.6-0.14-0.060.041812.60.5-0.180.00-0.451913.00.4-0.39-0.540.604.3.2Example2Construct the free cubic spline for the following data.CHAPTER4.CUBIC SPLINE INTERPOLATION22Table4.3:Example2x f(x)0.1-0.620499580.2-0.283986680.30.006600950.40.24842440Using the codes above to generate the free cubic spline for this data produces the coefficients shown below.Table4.4:j x j a j b j c j d j00.1-0.6205 3.45510-8.995810.2-0.2840 3.1852-2.6987-0.946320.30.0066 2.6171-2.98269.9421Since the coefficients have been determined,the polynomial will also be arrived at easily.Chapter5Discussion and Conclusion In this chapter,we will analyze advantages and limitations of each method re-spectively.5.1Interpolation and the Lagrange Polynomial Among these methods,the Lagrange polynomial is considered the simplest one, meaning that it needs the least workload.However,as the Lagrange polynomial only requires that the values of the interpolating polynomial are the same with those of original function on the given nodes,therefore its accuracy is relative low,compared with Hermite polynomial.Moreover,it has the inherent weakness of oscillation,which limits its application to situation where the number of nodes is large.5.2Hermite InterpolationCompared with the Lagrange Polynomial,Hermite polynomial interpolate a function and its derivative at the nodes,thus it can be expected to be more accurate.However,it also means that more information about the function being appropriated will be required,which limits its application to situations where not enough information about the original polynomial can be provided. And when there are a large of number of nodes,the Hermite polynomial also exhibit oscillation weaknesses.5.3Cubic Spline InterpolationThe most obvious advantage of this interpolation is that it successfully solved the inherent problem,oscillatory nature of high-degree polynomial,within the Hermite Interpolation and the Lagrange Interpolation.However,the workload of this interpolation is somewhat heavier than others.23Bibliography[1]Richard L.Burden and J.Douglas Faires:Numerical Analysis,chapter3(2001)24。
数值分析-第五版-考试总结
第一章:数值分析与科学计算引论截断误差:近似解与精确解之间的误差。
近似值的误差e∗(x为准确值):e∗=x∗−x近似值的误差限ε∗:|x∗−x |≤ε∗近似值相对误差e r∗(e r∗较小时约等):e r∗=e∗x≈e∗x∗近似值相对误差限εr∗:εr∗=ε∗|x∗|函数值的误差限ε∗(f(x∗)):ε∗(f(x∗))≈|f′(x∗)| ε∗(x∗)近似值x∗=±(a1.a2a3⋯a n)×10m有n位有效数字:ε∗=12×10m−n+1εr∗=ε∗|x∗|≤12a1×10−n+1第二章:插值法1.多项式插值P(x)=a0+a1x+⋯+a n x n 其中:P(x i)=y i ,i=0,1,⋯,n{a0+a1x0+⋯+a n x0n=y0 a0+a1x1+⋯+a n x1n=y1⋮a0+a1x n+⋯+a n x n n=y n 2.拉格朗日插值L n(x)=∑y k l k(x)nk=0=∑y kωk+1(x)(x−x k)ωn+1′(x k) nk=0n次插值基函数:l k(x)=(x−x0)⋯(x−x k−1)(x−x k+1)⋯(x−x n)(x k−x0)⋯(x k−x k−1)(x k−x k+1)⋯(x k−x n),k=0,1,⋯,n引入记号:ωn+1(x)=(x−x0)(x−x1)⋯(x−x n)余项:R n(x)=f(x)−L n(x)=f(n+1)(ξ)(n+1)!ωn+1(x) ,ξ∈(a,b)3.牛顿插值多项式:P n(x)=f(x0)+f[x0,x1](x−x0)+⋯+f[x0,x1,⋯,x n](x−x0)⋯(x−x n−1) n阶均差(把中间去掉,分别填在左边和右边):f[x0,x1,⋯,x n−1,x n]=f[x1,⋯,x n−1,x n]−f[x0,x1,⋯,x n−1]x n−x0余项:R n(x)=f[x,x0,x1,⋯,x n]ωn+1(x) 4.牛顿前插公式(令x=x0+tℎ,计算点值,不是多项式):P n(x0+tℎ)=f0+t∆f0+t(t−1)2!∆2f0+⋯+t(t−1)⋯(t−n−1)n!∆n f0n阶差分:∆n f0=∆n−1f1−∆n−1f0余项:R n(x)=t(t−1)⋯(t−n)ℎn+1(n+1)!f(n+1)(ξ) ,ξ∈(x0,x n)5.泰勒插值多项式:P n(x)=f(x0)+f′(x0)(x−x0)+⋯+f(n)(x0)n!(x−x0)nn阶重节点的均差:f[x0,x0,⋯,x0]=1n!f(n)(x0)6.埃尔米特三次插值:P(x)=f(x0)+f[x0,x1](x−x0)+f[x0,x1,x2](x−x0)(x−x1)+A(x−x0)(x−x1)(x−x2)其中,A的标定为:P′(x1)=f′(x1)7.分段线性插值:Iℎ(x)=x−x k+1x k−x k+1f k+x−x kx k+1−x kf k+1第三章:函数逼近与快速傅里叶变换1. S(x)属于 n维空间φ:S(x)=∑a jφjnj=02.范数:‖x‖∞=max1≤i≤n |x i| and maxa≤i≤b|f(x)|‖x‖1=∑|x i|ni=1 and∫|f(x)|badx‖x‖2=(∑x i2ni=1)12 and (∫f2(x)badx)123.带权内积和带权正交:(f,φk)=∑ω(x i)f(x i)φk(x i)mi=0 and ∫ρ(x)f(x)φk(x)badx(f(x),g(x))=∫ρ(x) f(x)g(x)dxba=0 4.最佳逼近的分类(范数的不同、是否离散):最优一致(∞-范数)逼近多项式P∗(x):‖f(x)−P∗(x)‖∞=minP∈H n‖f(x)−P(x)‖∞最佳平方(2-范数)逼近多项式P∗(x):‖f(x)−P∗(x)‖22=minP∈H n‖f(x)−P(x)‖22最小二乘拟合(离散点)P∗(x):‖f−P∗‖22=minP∈Φ‖f−P∗‖225.正交多项式递推关系:φn+1(x)=(x−αn)φn(x)−βnφn−1(x)φ0(x)=1,φ−1(x)=0αn=(xφn(x),φn(x))(φn(x),φn(x)),βn=(φn(x),φn(x))(φn−1(x),φn−1(x))6.勒让德多项式:正交性:∫P n(x)P m(x)dx 1−1={0 ,m≠n22n+1, m=n奇偶性:P n(−x)=(−1)n P n(x)递推关系:(n +1)P n+1(x )=(2n +1)xP n (x )−nP n−1(x)7.切比雪夫多项式:递推关系:T n+1(x )=2xT n (x )−T n−1(x )正交性:∫n m √1−x 21−1=∫cos nθcos mθπdx ={0 , m ≠n π2 , m =n ≠0π , m =n =0T n (x )在[−1,1]上有n 个零点:x k =cos2k −12nπ,k =1,⋯,n T n+1(x )在[a,b ]上有n +1个零点:(最优一致逼近)x k =b −a 2cos 2k +12(n +1)π+b +a2,k =0,1,⋯,n 首项x n 的系数:2n−18.最佳平方逼近:‖f (x )−S ∗(x)‖22=min S(x)∈φ‖f (x )−S(x)‖22=min S(x)∈φ∫ρ(x)[f (x )−S (x )]2dx ba法方程:∑(φk ,φj )a j nj=0=(f,φk )正交函数族的最佳平方逼近:a k ∗=(f,φk )(φk ,φk )9.最小二乘法:‖δ‖22=min S(x)∈φ∑ω(x i )[S (x i )−y i ]2mi=0法方程:∑(φk ,φj )a j nj=0=(f,φk )正交多项式的最小二乘拟合:a k∗=(f,P k )(P k ,P k )第四章 数值积分与数值微分1.求积公式具有m 次代数精度求积公式(多项式与函数值乘积的和),对于次数不超过m 的多项式成立,m +1不成立∫f(x)dx b a=∑A k f(x k )nk=02.插值型求积公式I n =∫L n (x)dx b a=∑∫l k (x)dx baf(x k )nk=0=∑A k f(x k )nk=0R [f ]=∫[f (x )− L n (x)]dx ba =∫R n (x)dx ba =∫f (n+1)(ξ)(n +1)!ωn+1(x)dx ba3.求积公式代数精度为m 时的余项R [f ]=∫f (x )dx ba −∑A k f (x k )nk=0=1(m +1)![∫x m+1dx ba−∑A k x k m+1nk=0]4.牛顿-柯特斯公式:将[a,b ]划分为n 等份构造出插值型求积公式I n =(b −a)∑C k (n)f(x k )nk=05.梯形公式:当n=1时,C 0(1)=C 1(1)=12T =b −a 2[f (a )+f(b)],R n (f )=−b −a12(b −a )2f ′′(η) 6.辛普森公式:当n=2时,C 0(2)=16,C 1(2)=46,C 2(2)=16S =b −a 6[f (a )+4f (a +b 2)+f(b)],R n (f )=−b −a 180(b −a 2)4f (4)(η) 7.复合求积公式:ℎ=b−a n,x k =a +kℎ,x k+1/2=x k +ℎ2复合梯形公式:T n =ℎ2[f (a )+2∑f(x k )n−1k=1+f(b)],R n (f )=−b −a 12ℎ2f ′′(η)复合辛普森公式:S n =ℎ6[f (a )+4∑f(x k+1/2)n−1k=0+2∑f(x k )n−1k=1+f(b)],R n (f )=−b −a 180(ℎ2)4f (4)(η)8.高斯求积公式(求待定参数x k 和A k ):(1)求高斯点(x k ):令 ωn+1(x )=(x −x 0)(x −x 1)⋯(x −x n )与任何次数不超过n 的多项式p(x)带权ρ(x)正交,即则∫p(x)ωn+1(x )ρ(x)dx ba =0,由n +1个方程求出高斯点x 0,x 1⋯x n 。
断裂或接触力学问题中第二类柯西奇异积分方程的一种解析方法
断裂或接触力学问题中第二类柯西奇异积分方程的一种解析方法金晓清;吕鼎;张向宁;李璞;周青华;胡玉梅【摘要】Due to the presence of complex singularity, solutions to the singular integration equation (SIE) of the second kind are still under development.As a matter of fact, numerical methods for SIE of the first kind are hardly applicable to SIE of the second kind.With the assistance of maple programming, this paper presents a novel approach to formulate an analytical solution to a typical SIE of the second kind.By splitting the Cauchy kernel, and taking advantage of the orthogonality of Jacobi polynomials, we derive an analytical solution corresponding to the monomial loading case.Furthermore, the solution to a general loading case may be obtained via series expansion.The present method appears efficient and convenient, providing an effective tool for treating tangentially loaded contact analyses and interface crack problems.%第二类柯西奇异积分方程因涉及复奇异因子往往造成求解困难,而适用第一类奇异积分方程的高效数值方法并不能推广至第二类奇异积分方程,即便是第二类奇异积分方程,其数值解法仍是一个难题.为此提出了构造第二类奇异积分方程解析解的一种新方法.通过分解柯西奇异项,并利用雅克比多项式的正交性,推导针对右端载荷项为单项式(monomial)的递推解析解,进而借助级数展开的方法推广至一般的载荷问题.提出的基于递推的解析解构造方案,能完美地结合maple软件编程,从而提供一种方便、快捷、有效的算法.由给出的算例可见,本方法适用于处理界面断裂或接触分析问题中含复数奇异因子的复杂情形,从而为研究该类典型力学问题提供了一种可供选择的方法.【期刊名称】《浙江大学学报(理学版)》【年(卷),期】2017(044)005【总页数】7页(P548-554)【关键词】第二类奇异积分方程;柯西主值积分;复数奇异因子;界面裂纹【作者】金晓清;吕鼎;张向宁;李璞;周青华;胡玉梅【作者单位】重庆大学机械传动国家重点实验室, 重庆400044;重庆大学机械传动国家重点实验室, 重庆400044;重庆大学机械传动国家重点实验室, 重庆400044;重庆大学机械传动国家重点实验室, 重庆400044;四川大学空天科学与工程学院, 四川成都610065;重庆大学机械传动国家重点实验室, 重庆400044【正文语种】中文【中图分类】O343.3;O346.1在接触力学、断裂力学和量子理论学等问题中,含柯西核(Cauchy kernel)的奇异积分方程十分常见[1-6]. 典型的第二类柯西奇异积分方程:aφ(x)+dt=f(x), -1<x<1,式(1)左端积分项所包含的称为柯西核,而该积分项需要在“柯西主值(Cauchy principal value)”[3]意义下计算. 右端项f(x)为已知函数且通常假定满足Hölder 连续条件[2];系数a与b为给定的复常数.如果a=0,未知函数φ(x)只出现在积分项中,式(1)退化为第一类奇异积分方程. 假定与式(1)相关联的边界条件待求函数φ(x)满足其中L为已知给定量.在已有文献中,第一类奇异积分方程求解方法相对成熟[7-10],第二类柯西奇异积分方程求解较难,要获取其封闭解析解尤为困难[11]. 现有研究大多局限于奇异积分方程的数值解法,典型成果有:ERDOGAN等[7]和KRENK[8]采用的正交多项式法和GERASOULIS等[12]采用的分段多项式方法. MILLER等[13]采用分段二阶多项式,以数值求解第二类奇异积分方程. JIN等[14-15]讨论了上述各方法的利弊,并提出一种针对第二类奇异积分方程的有效数值解法. 周薇等[6]和周跃亭等[16]对第二类奇异积分方程的配置法、内插型求积公式法和机械求积法等数值解法进行了论述.对于第一类奇异积分方程,正交多项式法[7-10]求解效率高,并且易于编程. 然而,此方法很难推广到第二类奇异积分方程[7],其所探讨的求解方案[4]计算复杂、编程困难且效率不高.分段多项式法(piecewise polynomial approach)[12-13, 17-20]允许积分点和配置点(collocation point)任意分布,但当近似多项式的阶次相对较小时,解的收敛速度和精度[18, 21]难以达到最优.虽然通过提高近似多项式的阶次理论上可使函数解更精确,但其积分式将变得繁复难解[13, 17, 20]. 由此可见,第二类柯西奇异积分方程的数值解法较为烦琐,至今仍缺少一种针对性强且高效的方法. 笔者借助maple软件,通过分解柯西奇异项,利用雅克比多项式的正交性,提出一种实用的求解第二类奇异积分方程的解析新方法.根据Muskhelishvili指数理论(index theory)[2],式(1)中φ(x)可以表示成新待求函数g(x)和反映问题物理奇异性态的基函数(fundamental funct ion)ω(x)的乘积:其中g(x)满足Hölder连续条件,而将式(3)(4)代入式(1),式(1)左端含柯西核的第2项可改写为dt=(1-t)α(1+t)β×经过上述变换,将柯西奇异项分解成两部分,其中,式(5)右端第1项中的柯西奇异性被消除.论述如下:根据Hölder条件,假设g(x)在[-1,1]内p+1次连续可导,由泰勒级数可知,对x,t至少p次局部连续可导[22]. 此外,对式(5)右端第2项积分可求得封闭解(closed-form solution).根据已知结果[7, 23] 有:当|x|<1,Re(α)>-1,Re(β)>-1,α≠0,1,…,时,dt=其中,I(x)=-2α+β×式(7)中Γ是伽马函数,F是超几何函数,满足如下关系:在界面裂纹问题中,两端裂尖具有物理奇异是一种典型的情况,此时α和β的实部取值满足-1<Re(α)<0和-1<Re(β)<0,且α+β=-1,即对应式(8)的第1类情况. 本文以此为例,即I(x)=0,其他2种情况亦可通过类似方法求解.当I(x)消失时,式(1)可化为|a+bcot(απ)|ω(x)g(x)+通过适当选取α值,式(9)中的第1项可化为0,即求:当系数a和b为复数时,α和β的值可由下式确定:其中整数N的取值需考虑问题于区间左端点-1处的物理奇异特性,即满足-1<Re(α)<0.当系数a和b为实数时,由式(10)确定的指数α也是实数,与式(11)一致. 据式(10),原第二类奇异积分方程(1)可进一步简化为下面先讨论载荷为单项式(monomial)即f(x)=xn的情况. 由式(3)(4)(11)可知,求解式(1)中的φ(x)只需求解式(12)中的g(x).联立式(4)~(12),此时式(1)变换为如下形式:因载荷为n阶高次项,可设g(t)为n+1阶多项式:g(t)=c0+c1t+c2t2+c3t3+…+cn+1tn+1,故求解φ(x)即为求解g(t)中待定系数cn(n=0,1,2…)的值. 将多项式(14)代入,式(13)中积分项关键部分可变换为其中di(t)表示式(15)中xi项的系数,即由式(16)可知,di(t)由di+1(t)乘以t加上常数项ci+1得到. 求解系数cn(n=0,1,…,4)的一种简单方法是将式(15)中每一项di(t)扩展成雅克比多项式的形式,即其中为与k阶雅克比多项式相关的展开系数.0~3阶雅克比多项式示例如下:雅克比多项式与权函数(1-t)α(1+t)β相关,存在如下正交特性:特别地,0阶雅克比多项式等于1.由式(19)可知,非0阶雅克比多项式存在如下性质:利用式(20)性质,并考虑式(15)~(17),di(t)关于雅克比权函数的积分项可化简至仅保留0阶雅克比项,得到如下重要结论:将式(15)~(17)代入式(13),利用式(21),积分方程(13)可转化为如下代数关系:由式(22)知当i=0,1,2,…,n-1时,求和公式中的系数均为0,即雅克比多项式可由maple的内置子程序得到,故利用maple软件能十分方便地计算此类问题.式(16)和(17)为关于t等价的n-i次多项式,根据两式对应的系数关系及与雅克比多项式存在如下关系:上述关系式中,式(23.i+1)等号左端的式子由式(23.i)等号左边的式子乘以t加上常数项cn-i得到.由式(17)与(23)知,等号右端为左端函数的雅克比多项式扩展形式,其中故dn(t)中此时,式(23.0)中的系数全部求得.代入式中,根据t系数的对应关系,进而可计算得的值,对比(23.1)的常数项可求得cn的值.至此式(23.1)的未知系数全部求得.依此类推,通过单项式ti(i=0,1,2,…,n) 的系数对应关系,可以逐次求得式(23.n)中所有的未知系数ci(i=0,1,2,…,n),进而求得函数g(t)的解析式.已知结合式(3)(4)及(14),为方便编程,可将式(3)中xn+1的系数提出,即φ(x)=ω(x)g(x)=(1-x)α(1+x)β× (xn+1+xn+…+xi+…+),其中式(23)对应的关系转变为其中且=1.由上述对应关系,可得到所有(i=0,1,2,…,n)的值,具体可参考本文附录提供的maple程序.以a=1,b=1,f(x)=x3为例,举例验证本文提出的方法.由式(10)可知α=-,且β须满足α+β=-1. 由此可设g(t)是一个4阶多项式结合式(10)~(25),通过ci(i=1,2,3,4)与对应的比例关系,可逐步求得系数cn(n=1,2,3,4).即c0与φ(x)积分的齐次条件相关,其中c0=α(α+1)(α2+α+1)-,将求得的φ(x)代入式(1),利用maple验证了所得φ(x)的正确性.式(1)~(12)给出了一种求解第二类奇异积分方程的新方法.上述变换主要有2个目的:1) 将看作一个新的未知函数,式(1)所示的第二类奇异积分问题可转化为式(12)所示的第一类奇异积分,之后将表示成雅克比多项式的叠加,便可很容易地求解当前问题.这种求解方法与ERDOGAN等[7]求解第二类奇异积分方程的方法类似,但本方法更简单.2) 本方法的解析推导部分也可由数值计算代替,因而可开发一种实用又无须复杂推导的算法来求解第二类奇异积分方程[15].本问题的难点之一是处理由基函数和柯西核所引起的奇异性.因是一个平滑函数,通过分解柯西核,式(5)中柯西项的奇异性被消除,故求积的难度只剩下处理基函数所引起的奇异性.当本问题涉及其他指数类型的基函数时,上述消除奇异性的方法依然可用,这为求解涉及4类物理问题的第二类奇异积分方程提供了数值方法.回顾文献[24]中界面裂纹的例子,其控制奇异积分方程为满足式(29)中实常数γ与两各向同性弹性介质材料性质有关,等式右边的f(x)与裂纹面上的法向和切向载荷的综合作用有关.指数α和β的值由式(11)确定:其中ψ=ln,在数值计算中,ψ取为0.1,取两类载荷条件为(i)f(x)=1+x3+3x4和(ii)f(x)=2ex2.在此情况下,利用附录A中给出的maple程序,得到边界未知函数的封闭解:g(x)=-sin(πα)[3x5+(6α+4)x4+(6α2+8α+1)x3+4α(α+1)2x2+c1x+c0],其中,表1为利用本方法求得的精确解与文献[15]给出的数值计算结果的比较,两者符合良好,在计算机的舍入误差范围内,验证了本文给出的载荷f(x)为单项式xn的解析解. 且利用单项式载荷解析解构造多项式载荷解析解的方法可行.相应的maple 程序见附录.第(ii)种载荷条件是泰勒级数展成多项式的组合. 将右端指数项进行泰勒展开,得到x的多项式,利用本方法近似求解. 随着泰勒级数的增加,计算结果会逐渐收敛于精确解. 利用maple软件并逐次增加多项式项数,得到裂纹右尖端的复应力强度因子的计算值如表2所示,有效数收敛至小数点后10位. 从数值结果中可看出,收敛速度令人满意.通过分解柯西奇异项,消除奇异积分方程中的柯西奇异性,以便解析求解第二类奇异积分方程. 本解析方法可以用来处理界面裂纹中的物理奇异性问题,结合maple 软件编程,方便易行,对复数奇异因子同样适用.从而,为获取第二类柯西奇异积分方程的封闭解析解提供了一种切实可行的新途径.准确解:以本文的界面裂纹为例,说明maple程序的编制及调用. 当载荷为n-1阶单项式时,可利用SIEslover子程序得到g′π(x)的解析式,其中g′π(x)=g(x)/cn. 将多项式载荷视为多个单项式的叠加,根据力学叠加原理,利用本程序可求解载荷条件(i)的情况. 同时,本程序也能求解载荷条件(ii)下α为复数的情况.>SIEslover:= proc (n, x, alpha)local px, rx, i, j, Pj, cPj, cRj, c;c[n]:= 1;px:= c[n];for i to n dopx:= px*x;rx:= px;for j from i by -1 to 1 doPj:= normal(simplify( Jacobi P(j, alpha, -1-alpha, x), 'Jacobi P'));cPj:= coeff(Pj, x^j);cRj:= coeff(rx, x^j);rx:= normal(simplify(rx-cRj*Pj/cPj))od:c[n-i]:= -rx;px:= px+c[n-i]od:px:= collect(px, [x], factor)end:下面为本求解器的调用示例:载荷条件(i)>f5:= SIEslover(5, x, alpha); f4:=SIEslover (4, x, alpha); f1:=SIEslover (1, x,alpha);f5:=x5+(2α+1)x4+2α(α+1)x3+α(α+1)× (2α+1)x2+α(α+1)(α2+α+1)x+α(α+1)(2α+1)(α2+α+3);f4:=x4+(2α+1)x3+2α(α+1)x2+α(α+1) (2α+1)x+α(α+1)(α2+α+1);f1:=2α+x+1;>res1:= collect(normal(f1+f4+3*f5), [x], factor);res1:=3x5+(4+6α)x4+(6α2+8α+1)x3+4α(α+1)2x2+(2α4+α3+6α2+α+1)x+ 1+α5+α4+α3+α2+α.载荷条件(ii)>alpha:= -1/2-1/10*′I;>res2:= SIEslover (1, x, alpha);>for i to 35 doc[i]:=coeff(taylor(2*exp(x*x), x = 0, 40), x^i);res2:=simplify(res2+c[i]* SIEslover (i+1, x, alpha));sif:=evalf(subs(x = 1, res2), 20);k1:=Re(sif);k2:=Im(sif);if modp(i,5)=0 thenprintf("i=%3d,…k1 + I k2 =%+15.10f,+I%+15.10f\n", i, k1, k2)end ifod:【相关文献】[1] GAKHOV F D. Boundary Value Problems[M]. New York: Dover,1990.[2] MUSKHELISHVILI N I. Singular integral equations: Boundary problems of functiontheory and their application to mathematical physics[J].P Noordhoff N,2008,24(2):256-291.[3] HILLS D A, KELLY P A, DAI D N, et al. Solution of crack problems: The distributed dislocation technique[J]. Journal of Applied Mechanics,1998,65(2):548.[4] 张耀明,孙翠莲,谷岩.边界积分方程中近奇异积分计算的一种变量替换法[J].力学学报,2008,40(2):207-214. ZHANG Y M, SUN C L, GU Y. The evaluation of nearly singular integrals in the boundary integral equations with variable transformation[J]. Chinese Journal of Theoretical and Applied Mechanics,2008,40(2):207-214.[5] 刘俊俏,段惠琴,李星.SH 波在压电材料条中垂直界面裂纹处的散射[J].固体力学学报,2010,31(4),385-391. LIU J Q, DUAN H Q, LI X. The scattering of sh wave on a vertical crack in a coated piezoelectric strip[J] . Chinese Journal of SolidMechanics,2010,31(4),385-391.[6] 周薇.在接触力学中的奇异积分方程的高精度数值解法[D].成都:电子科技大学,2011. ZHOU W. High-Accuracy Numerical Solution for Singular Integration Equations in Contact Mechanics[D]. Chengdu:University of Electronic Science and Technology of China,2011.[7] ERDOGAN F, GUPTA G D, COOK T. Numerical Solution of Singular Integral Equations[M].Berlin / Netherlands: Springer,1973,1(6):368-425.[8] KRENK S. On quadrature formulas for singular integral equations of the first and the second kind[J]. Quarterly of Applied Mathematics,1975,33(3): 225-232.[9] THEOCARIS P, IOAKIMIDIS N. Numerical integration methods for the solution of singular integral equations(for crack tip stress intensity factor evaluation in elastic media)[J].Quarterly of Applied Mathematics,1977,35(1): 173-183.[10] ERDOGAN F, GUPTA G. On the numerical solution of singular integral equations[J]. Quarterly of Applied Mathematics,1972,29(4): 525-534.[11] 李星.积分方程[M].北京:科学出版社,2008. LI X. Integral Equation[M]. Beijing: Science Press,2008.[12] GERASOULIS A, SRIVASTAV R. A method for the numerical solution of singular integral equations with a principal value integral[J]. International Journal of Engineering Science,1981,19(9): 1293-1298.[13] MILLER G R, KEER L M. A numerical technique for the solution of singular integral equations of the second kind[J]. Quarterly of Applied Mathematics,1985,42(4): 455-465. [14] JIN X. Analysis of Some Two Dimensional Problems Containing Cracks and Holes[D]. Chengdu: Northwestern University,2006.[15] JIN X, KEER L M, WANG Q. A practical method for singular integral equations of the second kind[J]. Engineering Fracture Mechanics,2008,75(5): 1005-1014.[16] 周跃亭,李星.具周期裂纹的半平面周期接触问题的奇异积分方程数值解法[J].固体力学学报,2005,26(2): 167-174. ZHOU Y T, LI X. Singular integral equation method for periodic contact problem of an elastic half-plane with periodic cracks[J]. Chinese Journal of SolidMechanics,2005,26(2): 167-174.[17] KIM P, LEE S. A piecewise linear quadrature of Cauchy singular integrals[J]. Journal of Computational and Applied Mathematics,1998,95(1/2): 101-115.[18] GERASOULIS A. Piecewise-polynomial quadratures for Cauchy singular integrals[J]. Siam Journal on Numerical Analysis,1986,23(4): 891-902.[19] GERASOULIS A. The use of piecewise quadratic polynomials for the solution of singular integral equations of Cauchy type[J]. Computers & Mathematics with Applications,1982,8(1): 15-22.[20] KURTZ R D, FARRIS T N, SUN C. The numerical solution of Cauchy singular integral equations with application to fracture[J]. International Journal of Fracture,1994,66(2): 139-154.[21] RABINOWITZ P. Convergence results for piecewise linear quadratures for Cauchy principal value integrals[J]. Mathematics of Computation,1988,51(184): 741-747. [22] IOAKIMIDIS N I. On the numerical evaluation of derivatives of Cauchy principal value integrals[J]. Computing,1981,27(1): 81-88.[23] ERDELYI A, MAGNUS W, OBERHETTINGER F, et al . Tables of Integral Transforms:Vol II[M]. New York / Toronto / London: McGraw-Hill,1954.[24] THEOCARIS P S, IOAKIMIDIS N I. On the numerical solution of Cauchy type singular integral equations and the determination of stress intensity factors in case of complex singularities[J]. Zeitsch rift Für Angewandte Mathematik und Physik,1977,28(6):1085-1098.。
数值分析-计算方法-插值b精品文档
f [x0, …, xn] f [x1, …, xn+1]
f [x0, …, xn+1]
例:已知 si6 n1 2,si4 n1 2,si3 n2 3
3.2 Newton’s Interpolation
分别利用 1次、2次 Newton 插值公式计算 sin 50。
解一:取 x 0 /6 ,x 1 /4 ,x 2 /3 构造差商表
? 注: 由唯一性可知 Nn(x) Ln(x), 只是算法不同,故其
余f项[x 也,x 相0,同.,.,Nx .即nn (]x)k =1(x L) n(xf()(n n 1 )1 ()! x) k 1(x)
f[x0,..,x .k]f(k k)(!), (xm,ix n m)ax
xi
f (xi)
f [xi, xj]
f [xi, xj , xk]
500 5
18
π/6
1/2
π/ 4
1/√2 0.79110
π/ 3
√3/2 0.60703
Байду номын сангаас
…
…
…
N 1 (x ) f (x 0 ) f [ x 0 ,x 1 ] (x x 0 )
-0.35155
x 0
x1
x2
sin 50 = 0.7660444…
差商(亦称均差) /* divided difference */
f[x i,xj]f(x x i) i x fj(xj) (ij,x ixj)
1阶差商 /* the 1st
divided difference of f w.r.t. xi and xj */
f[x i,x j,x k]f[x i,x x ji] x fk [x j,x k](i k ) 2阶差商
应用数值分析第七版英文版课程设计
应用数值分析第七版英文版课程设计1. IntroductionApplied Numerical Analysis with MATLAB for Engineers and Scientists is a fundamental engineering textbook that introduces the readers to computational techniques used in solving scientific and engineering problems. This English version course is based on the seventh edition of this book, and ms to provide the necessary knowledge for students to formulate mathematical models and develop numerical methodsto efficiently solve the models using MATLAB.The course comprises of theoretical and practical components, where the theoretical aspect covers the numerical methods and algorithms used for approximating solutions to mathematical problems, while the practical component involves solving engineering problems through the implementation of numerical methods using MATLAB.2. Learning OutcomesAt the end of the course, the students should be able to: •Develop and implement numerical algorithms to solve linear and nonlinear equations•Solve systems of ordinary differential equations using numerical methods•Approximate derivatives and integrals using numerical methods•Understand and apply methods of numerical linear algebra3. Course OutlineThe course will be covered in a span of 12 weeks, with each week dedicated to a specific topic. The topics are outlined as follows:Week 1: Introduction to MATLAB•Introduction to MATLAB and its applications in numerical computing•MATLAB basics: syntax, variables, data types, and functions•Introduction to control flow statements: if-else statements, for loops, and while loopsWeek 2: Root Finding Methods•Introduction to root finding problems•The bisection method•The Newton-Raphson method•The secant method•Convergence analysis of methodsWeek 3: Linear Algebra•Introduction to linear algebra•Matrix representation of linear equations•Gaussian elimination•LU decomposition•Singular value decompositionWeek 4: Nonlinear Equations and Optimization•Nonlinear equation solving•Least squares optimization•Constrned optimization•Unconstrned optimization•Vector and matrix normsWeek 5: Interpolation and Approximation•Polynomial interpolation•Divided difference formula•Piecewise linear interpolation•Splines and piecewise quadratic interpolation •Least squares fittingWeek 6: Numerical Integration•Introduction to numerical integration•Newton-Cotes formulas•Gaussian quadrature•Monte Carlo integration•Adaptive integrationWeek 7: Ordinary Differential Equations (ODEs) •Introduction to ODEs•Euler’s method•Second-order Runge-Kutta method•Fourth-order Runge-Kutta method•Higher-order ODEsWeek 8: Boundary Value Problems (BVPs)•Introduction to BVPs•Shooting method•Finite difference method•Finite element methodWeek 9: Partial Differential Equations (PDEs)•Introduction to PDEs•Finite difference method•Finite element method•Application of the method to boundary value and initial value problemsWeek 10: Fourier Analysis•Introduction to Fourier series•Fourier transform•Discrete Fourier transform•Properties of Fourier transform•Applications of Fourier transformWeek 11: Data Analysis and Visualization•Introduction to data handling and visualization•Data interpolation and extrapolation•Programming of plots and graphs•Visualization of data using MATLAB•Data reduction techniques and filtering Week 12: Projects and Final Exam•Project assignment•Preparation for final exam4. AssessmentThe final grade for the course will be based on the following criteria:•Assignments and practical sessions (40%)•Class participation and attendance (10%)•Final project (20%)•Final exam (30%)5. ConclusionThis course provides a comprehensive introduction to numerical analysis using MATLAB, which is an essential tool for solving mathematical and engineering problems. Upon completion of the course, students will not only have the skills to solve complex problems using MATLAB, but also be prepared for further studies in engineering and other related fields.。
数值分析 第五章学习小结
第五章 插值与逼近--------学习小节一. 本章学习体会本章学习了插值与逼近,经过本章的学习我对插值法有了进一步的认识。
插值与逼近就是寻找一个简单的函数来代替表达式复杂甚至无法写出表达式的函数。
可以说我们现在学习推导出来的方法公式等都是前人的辛苦钻研的结果,本章除了学到了许多的插值与逼近方法,更重要的是了解了许多科学前辈的故事以及他们许多做研究的态度与方法。
我感觉了解一下数学家的人生故事对我们学习数值分析或别的数学知识有很大的帮助。
上课时王老师给我们讲了数学奇才Hermite 的传奇故事,一个不会考试,基本上每次考数学都不及格的‘笨学生’,后来成为了伟大的数学家。
不是每个数学家都特别聪明,他们所具有的是作为一名科学家的品质,想别人没有想过的问题,在研究中创新,我们应该学习他们那种做研究的态度与精神。
学习这章时有一个小小的困惑,在曲线拟合的求法时,求多元函数的极小值*2200[()()]min [()()]im nm njj i i j j i i c i j i j cx f x c x f x φφ====-=-∑∑∑∑2010(,,,)[()()]mnn j j i i i j F c c c c x f x φ===-∑∑ 老师讲时说用0kFc ∂=∂求得,那万一求出的是极大值呢? 二.本章知识梳理数值分析中的插值是一种有力的工具,它最终得出的曲线图像都是过节点的,我们的目的使用它得出的图像来近似估计插值点的函数值。
我们首先学了代数插值中的一元函数插值,一元函数插值中学了拉格朗日插值但其插值公式没有延续性,后来学了牛顿插值,其优点是插值公式具有延续性,但前两者都有缺点,就是插值节点一般不超过三个,否则会有很大误差。
但实际工程中我们会测的许多的数据,也就有许多的节点,这样前两种差值方法就不能用了,后来我们又引进了分段线性插值,就是将这许多的节点进行分段,在每段中应用拉格朗日插值或牛顿差值。
数值分析公式大全
数值分析公式大全1.插值公式:
-拉格朗日插值公式
-牛顿插值公式
-分段线性插值公式
-分段多项式插值公式
- Hermite插值公式
2.数值积分公式:
-矩形法
-梯形法
-辛普森法则
-龙贝格公式
-复合梯形公式
-复合辛普森公式
3.数值微分公式:
-前向差分
-后向差分
-中心差分
-五点差分公式
4.数值方程求根公式:
-二分法
-割线法
-牛顿迭代法
-雅可比迭代法
-弦截法
- Muller法
5.线性方程组求解公式:
- 直接法(LU分解,Cholesky分解)
- 迭代法(雅可比迭代法,Gauss-Seidel迭代法,SOR迭代法)-共轭梯度法
-GMRES法
6.常微分方程数值解法:
- Forward Euler法
- Backward Euler法
- 改进的Euler法
-龙格-库塔法
-预测校正法
7.偏微分方程数值解法:
-有限差分法
-有限元法
-谱方法
-边界元法
8.近似计算公式:
- Taylor级数展开
-泰勒展开的截断误差估计
- 常用数学公式(例如:sin x的级数展开)
9.最优化问题求解公式:
-单变量最优化问题求解公式
-多变量最优化问题求解公式
-线性规划求解公式
-非线性规划求解公式。
数值分析(第三章)实验报告
L0 ( x)
( x 0.6)( x 0.9) (50*(x - 3/5)*(x - 9/10))/27 (0 0.6)(0 0.9) ( x 0)( x 0.9) -(50*x*(x - 9/10))/9 (0.6 0)(0.6 0.9)
L1 ( x)
end end t=t+u*y(j); end s(m)=t; end return 保存后在命令窗口中输入 >> x=[1940 1950 1960 1970 1980 1990] x= 1940 1950 1960 1970 1980 1990
>> y=[132165 151326 179323 203302 226542 249633] y= 132165 151326 >> Lagrange(x,y,1930) ans = 169649 >> Lagrange(x,y,1965) ans = 1.9177e+005 >> Lagrange(x,y,2010) ans = 171351 179323 203302 226542 249633
3/5))/3799912185593856 - (38513478438976075*x*(x - 9/10))/10133099161583616
P2 (0.45) 0.4546
f (0.45) P2 (0.45) 0.0285
24、
Year 1940 1950 1960 1970 1980 1990 Population(in thousands) 132,165 151,326 179,323 203,302 226,542 249,633
L2 ( x)
《数值分析》第五章课件
取 h = 0.2 ,要求保留六位小数.
校正: cn+1 = y n + 2 ( y n' + mn' +1 )
解:Euler 迭代格式为
校正的改进:
1 y n +1 = c n +1 + ( p n +1 − c n+1 ) 5
yk +1 = yk + 0.2(− yk − xk yk2 ) = 0.8 yk − 0.2 xk yk2
差分方程:关于未知序列的方程.
例如: y n +3 = 5 y n + 2 − 3 y n +1 + 4 y n
例如: y ' ' ( x) − a ( x) y '+b( x) y + c( x) = 0
3
4
微分方程的应用情况
实际中,很多问题的数学模型都是微分方程. 常微分方程作为微分方程的基本类型之一,在 理论研究与工程实际上应用很广泛. 很多问题 的数学模型都可以归结为常微分方程. 很多偏 微分方程问题,也可以化为常微分方程问题来 近似求解.
且
可得,
y(xn+1) − yn+1 = hf y (xn+1,η)[ y(xn+1) − yn+1] − h2 '' y (xn ) + O(h3 ) 2
f (xn+1, y(xn+1)) = y' (xn+1) = y' (x n ) + hy'' (xn ) + O(h2 )
19
20
2 考虑到 1 − hf y ( xn+1 ,η ) = 1 + hf y ( xn+1 ,η ) + O(h ) ,则有
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Title Page
(5.5.3)
x − xi+1 , Hi,i(x) = (x − xi) hi , Hi,i+1(x) = (x−xi+1) x − xi hi
2
Page 7 of 9
,
2
Go Back
Full Screen
2
,
Close
Quit
hi = xi+1 − xi for each i = 0, 1, · · · , n − 1.
Title Page
'u¼ê f ©ãS¢õª"
x ∈ [xi, xi+1],
Full Screen
Close
Quit
Theorem 5.5.1 Suppose f ∈ C 2[a, b]. If A1(x), given in (5.5.1), is the piecewise linear interpolating polynomial for f on the nodes a = x0 < x1 < · · · < xn = b, then, for any x ∈ [a, b], h2 |f (x) − A1(x)| ≤ M2, 8 where h = max |xi+1 − xi|,
A1 ( x ) = y i x − xi x − xi+1 + yi+1 , xi − xi+1 xi+1 − xi i = 0, 1, · · · , n − 1, (5.5.1)
Page 5 of 9 Go Back
a = x0 < x1 < · · · < xn = b,
Home Page
yi = f (xi) i = 0, 1, · · · , n.
0≤i≤n−1
(5.5.5)
M4 = max f (4)(x) ,
a≤x≤b
and A3(x) converges uniformly to f (x), as h tends to zero.
½n5.5.2 f ∈ C [a, b]. eA (x) ´'u!X
4 3
Home Page
5.5 Piecewise Polynomial Interpolation
©ãõª¢
5.5.1 Runge’s Phenomenon
9y
Home Page
Title Page
5.5.2 Piecewise Linear Polynomial Interpolation
©ã5õª¢
Page 1 of 9
Title Page
Page 4 of 9
Go Back
Full Screen
Close
Quit
5.5.2 Piecewise Linear Polynomial Interpolation
©ã5õª¢
½Â5.5.1 #¼ê f ½Â3«m[a, b]þ§® f 3: ? ¡©ãõª
Home Page
©ãngDA¢
A3(x) = yiHi,i(x) + yi+1Hi,i+1(x) + yiHi,i(x) + yi+1Hi,i+1(x),
Title Page
'u¼ê f '©ãngDA¢õª§Ù¥
Hi,i(x) = 1 + 2 x − xi hi x − xi+1 hi x − xi hi
(5.5.4)
5.5.3 Piecewise Cubic Hermite Interpolation
½Â5.5.2 ¼ê f ½Â3«m[a, b]þ§3!X ?§® ¡©ãõª
a = x0 < x1 < · · · < xn = b, y i = f (x i ), yi = f (x i ), i = 0, 1, · · · , n.
Home Page Title Page
9y
Page 2 of 9
Go Back
Full Screen
Close
Quit
Mitigations to the problem of Runge’s phenomenon (a) The oscillation can be minimized by using nodes that are distributed more densely towards the edges of the interval. A standard example of such a set of nodes is Chebyshev nodes, for which the maximum error is guaranteed to diminish with increasing polynomial order. (b) The phenomenon demonstrates that high degree polynomials are generally unsuitable for interpolation with equidistant nodes. The problem can be avoided by using piecewise polynomials. When trying to decrease the interpolation error one can increase the number of polynomial pieces instead of increasing the degree of the polynomials used.
Home Page
are given. A piecewise-cubic Hermite interpolating polynomial A3(x) for f is a piecewise polynomial: A3(x) = yiHi,i(x) + yi+1Hi,i+1(x) + yiHi,i(x) + yi+1Hi,i+1(x), where x ∈ [xi, xi+1], for each i = 0, 1, · · · , n − 1, and x − xi Hi,i(x) = 1 + 2 hi Hi,i+1(x) = 1 − 2 x − xi+1 hi x − xi+1 hi x − xi hi
5.5.3 Piecewise Cubic Hermite Interpolation
©ãngDA¢
Go Back
Full Screen
Close
Quit
5.5.1 Runge’s Phenomenon
Example 5.5.1 Consider the function:
9y
1 . 1 + 25x2 Runge found that if this function is interpolated at equidistant points xi between −1 and 1 such that: f (x ) = 2 xi = −1 + i · , for i = 0, 1, · · · , n, n with a polynomial pn(x) of degree ≤ n, the resulting interpolation oscillates toward the end of the interval, i.e. close to −1 and 1. This phenomenon is called Runge’s phenomenon ( ). In the mathematical field of numerical analysis, Runge’s phenomenon is a problem that occurs when using polynomial interpolation with polynomials of high degree. It was discovered by Carl David Tolm´ e Runge when exploring the behavior of errors when using polynomial interpolation to approximate certain functions (Runge 1901).
Quit
5.5.2 Piecewise Linear Polynomial Interpolation
©ã5õª¢ຫໍສະໝຸດ Definition 5.5.1 Given a set of nodes a = x0 < x1 < · · · < xn = b,
Home Page
and a function f defined on [a, b] whose values are given at these numbers, that is, yi = f (xi) for each i = 0, 1, · · · , n. A piecewise linear interpolating polynomial A1(x) for f is a piecewise polynomial: x − xi+1 x − xi + yi+1 , (5.5.1) A1 ( x ) = y i xi − xi+1 xi+1 − xi where x ∈ [xi, xi+1] for each i = 0, 1, · · · , n − 1.
2
x ∈ [xi, xi+1],
i = 0, 1, · · · , n − 1,
(5.5.3)