Some fourth-order nonlinear solvers with closed formulae for multiple roots

合集下载

非线性方程重根的三阶迭代方法

非线性方程重根的三阶迭代方法

非线性方程重根的三阶迭代方法李福祥;田金燕;费兆福;巩英海;曹作宝【摘要】为提高求解非线性方程的收敛速度和计算效率,以牛顿法为基础提出一种求解非线性方程重根的迭代方法,该方法以重数已知为前提,迭代格式根据重数为奇数和偶数两种情形分别给出,两种迭代格式每步迭代都只需计算三个函数值(包含一阶导数值)且完全摆脱了二阶导数值的计算,其收敛效果皆可达到三阶.算例实验结果验证了该迭代方法的有效性.他丰富了非线性方程求根的方法,在理论上和应用上都有一定的价值.【期刊名称】《哈尔滨理工大学学报》【年(卷),期】2013(018)006【总页数】4页(P117-120)【关键词】非线性方程;牛顿法;重根;迭代法;三阶收敛【作者】李福祥;田金燕;费兆福;巩英海;曹作宝【作者单位】哈尔滨理工大学应用科学学院,黑龙江哈尔滨 150080;哈尔滨理工大学应用科学学院,黑龙江哈尔滨 150080;哈尔滨理工大学应用科学学院,黑龙江哈尔滨 150080;哈尔滨理工大学应用科学学院,黑龙江哈尔滨 150080;哈尔滨理工大学应用科学学院,黑龙江哈尔滨 150080【正文语种】中文【中图分类】O24求解非线性方程f(x)=0是数学界经久不衰的研究课题,究其原因就是其在科学研究以及生产生活中的广泛应用,而迭代法又是求解非线性方程最为常用的方法之一.本文着重研究求解非线性方程重根的情形.寻找非线性方程重根的迭代方法通常以重数已知为前提,最为经典的当属二阶收敛的Newton迭代法,为提高其收敛速度一系列高阶迭代方法得到人们的广泛研究,这些方法大多是三阶收敛的,大致可分为两类,一类叫做单点法每步迭代需要计算三个函数值分别是 f,f',和f″,比如欧拉-切比雪夫方法[1-2]哈雷方法[3],Chun and Neta 方法[4],Biazar and Ghanbari法[5],和 Osada 法[6]等都属于此类,此类方法相比于经典的Newton法收敛效率大幅提高,但是每部迭代需要计算二阶导数值,这无疑增加了迭代过程的复杂度;另一类叫做多点法(本文的方法属此类)又可以被分成两子类,一个子类需要计算两个函数值和一个一阶导数值,比如文[7],文[9],文[10]等人给出的方法,另一子类需要计算两个一阶导数值和一个函数值,比如文[11-14]等人给出的方法,此类方法不仅提高了收敛速率,计算量也得到了很好的控制.再次就是四阶收敛的迭代方法,例如文[15-18]等人提出的方法,增加一个函数计算(f或f')将收敛速率提高到了四阶.由于受到上述研究工作的启发,为提高求解非线性方程的收敛速度和计算效率,本文以牛顿法为基础提出一种求解非线性方程重根的迭代方法,迭代格式根据重数为奇数和偶数两种情形分别给出,两种迭代格式每步迭代都只需计算三个函数值(包含一阶导数值)且完全摆脱了二阶导数值的计算,其收敛效果皆可达到三阶.正如引言中所提到的,本文的迭代方法同样以重数m已知为前提,当m为奇数时迭代格式如下所示:从迭代格式可以发现,不管重数是奇数还是偶数,每步迭代都仅需计算三个函数值,接下来我们将给出其收敛性证明.定理设x*∈D是充分光滑的实值函数f:D⊆R→R在开区间D上的m重根,当x0∈D充分靠近x*时,由式(1)、(2)决定的迭代方法至少是三阶收敛的.注意到,无论重数m是奇数还是偶数,由式(1)、(2)决定的三阶迭代方法每步迭代都只需计算三个函数值.其效率指数为,这里p指代收敛阶数,c指代所需计算函数个数.在这里将本文给出的方法应用到如下数值算例中,为展示本文迭代方法的属性及可行性,我们将从引言中提到的两类三阶迭代法中分别挑选出四种方法与本文迭代法(用M代表)做对比,SM(属单点法,需计算 f,f',和f″)代表文[14]提出的迭代法,HMM(需计算 f,f,f')出自于文[10],LM - 1(同HMM)和 LM -2(需计算 f,f',f')都出自文献[12].所有的数学计算都将用数学软件Mathematica完成,选择|x-x*|≤10-100作为终止条件.数值计算结果将呈现在表1中,其中en保留五位有效小数,n表示迭代次数.2)f2=ex-2+1 -x,f2(x)=0 有 2 重根 x*=2,选择x0=2.4为初始值;3)f3(x)=sin[(x-3)5],f3(x)=0有 5重根x*=3,选择x0=2.5为初始值.4)f4(x)=(x-1)(ex-1-1),f4(x)=0 有 2 重根x*=1,选择x0=1.5为初值.从表1中可以看出,本文构造的迭代方法M与同收敛阶的其他方法SM,HMM,LM-1,LM-2均能以较快的速度收敛.由算例可以明显发现本文提出的迭代方法是三阶收敛的.田金燕(1988—),女,硕士研究生;费兆福(1989—),男,硕士研究生.【相关文献】[1]TRAUB J F.Iterative Methods for the Solution of Equations[M].NJ,Prentice-Hall:Englewood Cliffs,1964:10 -85.[2]NETA B.New Third Order Nonlinear Solvers for Multiple Roots,Appl [J].Math.Comput.,2008,202:162 -170.[3]HALLEY E.A New Exact and Easy Method of Finding the Roots of Equations Generally and without any Previous Reduction[J].Phil.Trans.Roy.Soc.Lori.,1694,18:136 -148.[4]CHUN C,Neta B.A Third Order Modification of Newton’s Method for Multiple Roots[J].Appl.Math.Comput.,2009,211:474-479.[5]BIAZAR J,GHANBARI B.A New third-order Family of Nonlinear Solvers for Multiple Roots[J].Comput.Math.Appl.,2010,59:3315-3319.[6]OSADA N.An Optimal Multiple Root-finding Method of Order Three [J].Comput.Appl.Math.,1994,51:131 -133.[7]DONG C.A Basic Theorem of Constructing an Iiterative Formula of the Higher Order for Computing Multiple Roots of an Equation[J].Math.Numer.Sinica,1982,11:445 -450.[8]NETA B.New Third Order Nonlinear Solvers for Multiple Roots [J].Appl.Math.Comput.,2008,202:162 - 170.[9]CHUN C,Bae H,Neta B.New Families of Nonlinear Third-order Solvers for Finding Multiple Roots[J].Comput.Math.Appl.,2009,57:1574-1582.[10]HOMEIER H H H.On Newton-type Methods for Multiple Roots with Cubic Convergence [J].Comput.Appl.Math.,2009,231:249-254.[11]DONG C.A Family of Multipoint Iterative Functions for Finding Multiple Roots of Equations [J].Int.J.Comput.Math.,1987,21:363-367.[12]LI S,LI H,CHENG L.Some Second-derative-free Variants of Halley’s Method for Multiple Roots[J].Appl.Math.Comput.,2009,215:2192 -2198.[13]SHARMA J R,SHARMA R.New Third and Fourth Order Nonlinear Solvers for Computing Multiple Roots[J].Appl.Math.Comput,2011,217:9756 -9764.[14]SHARMA J R,SHARMA R.Modified Chebyshev-Hally Type Method and Its Variants for Computing Mmultiple Roots[J].Numer Algor,2012,61:567 -578.[15]LI S,CHENG L,NETA B.Some Fourth-order Nonlinear Solvers with Closed Formulae for Multiple Roots [J].Comput.Math.Appl.,2010,59:126 -135.[16]NETA B.Extension of Murakami’s high-order Nonlinear Solver to Multiple Roots [J].Int.J.Comput.Math,2010,87:1023 -1031.[17]NETA B,JOHNSON A N.High Order Nonlinear Solver for Multiple Roots [J].Comput.Math.Appl,2008,55:2012 -2017.[18]SHARMA J R,SHARMA R.New Third and Rourth Order Nonlinear Solvers for Computingmultiple Roots[J].Appl.Math.Comput,2011,217:9756 -9764.。

CFL条件

CFL条件

1 什么叫CFL数?CFL数是收敛条件,具体是差分方程的依赖域必须包含相应微分方程的依赖域,最简单可以理解为时间推进求解的速度必须大于物理扰动传播的速度,只有这样才能将物理上所有的扰动俘获到。

Time stepping technique是指时间推进技术,一般有统一时间步长和当地时间步长,而选择当地时间步长也就是当地CFL条件允许的最大时间步长,采用这种方法能够加速收敛,节省计算时间。

RCFL条件的来历在有限差分和有限体积方法中的稳定性和收敛性分析中有一个很重要的概念------CFL条件。

CFL条件是以Courant,Friedrichs,Lewy三个人的名字命名的,他们最早在1928年一篇关于偏微分方程的有限差分方法的文章中首次踢出这个概念的时候,并不是用来分析差分格式的稳定性,而是仅仅以有限差分方法作为分析工具来证明某些偏微分方程的解的存在性的。

其基本思想是先构造PDE的差分方程得到一个逼近解的序列,只要知道在给定的网格系统下这个逼近序列收敛,那么久很容易证明这个收敛解就是愿微分方程的解。

Courant,Friedrichs,Lewy发现,要使这个逼近序列收敛,必须满足一个条件,那就是著名的CFL条件,记述如下:CFL condition:An numerical method can be convergent only if its numerical domain of dependence contains the true domain of dependence of the PDE,at least in the limit as dt and dx go to zero.随着计算机的迅猛发展,有限差分方法和有限体积方法越来越多的应用于流体力学的数值模拟中,CFL条件作为一个格式稳定性和收敛性的判据,也随之显得非常重要了。

但值得注意的是,CFL条件仅仅是稳定性(收敛性)的必要条件,而不是充分条件,举例来说,数值流通量构造方法中的算术平均构造,它在dt足够小的情况下是可以满足CFL条件,但对于双曲问题而言这种构造方法是不稳定,不可用的。

Keysight RFPro Electromagnetic (EM)–Circuit co-sim

Keysight RFPro Electromagnetic (EM)–Circuit co-sim

RFProElectromagnetic (EM)–Circuit co-simulation environment for RF circuit designersIntroductionKeysight RFPro is an EM (electromagnetic) design environment for RF circuit designers. It automates EM-circuit co-simulation to account for EM effects on RF circuit performance in 3D IC layouts, packaging, interconnects, transitions, and PCB boards. RFPro enables interactive access to EM analysis for tuning and optimization of RF circuits during design just like circuit simulators.Figure 1. RFPro automates EM-circuit co-simulation for interactive tuning and optimization to account for EM effects of physical structures on RF circuit performance in RF Modules, RFICs, MMICs and RF Boards.Using these tools to eliminate one design spin in the fab can save us $1.5M in expenses and14 months of development time.Keysight High Frequency Technology Center R&DRFPro Capabilities for RF Circuit Designers Integration•IC and packaging EM-circuit analysis in single environment with interactive 3D view•Same interface for Keysight ADS, Cadence Virtuoso, Synopsys Design Compiler & Mentor Tanner •Preserves OpenAccess (OA) design database integrity with no need for file translations•Maintains full traceability of EM data origin from design changes and simulator usedSolver•Full 3D FEM and planar 3D Momentum solvers from same environment•Automatic expert setup of EM and EM-circuit analysis ensures trustworthy results•Sweep physical and electrical parameters easily from same environment•Same interface to launch HFSS solverLayout•Interactive EM simulation on any section of layout without manual isolation (“cookie cut”).•No need to manually extract EM and circuit components for separate simulation.•Automatic data stitching of EM ports to circuit nodes for error free EM-circuit co-simulation. RFPro Application ExamplesHere are some current application examples that RFPro and ADS are deployed to develop complex multi-technology designs that must consider EM effects of the physical structure along with circuit component behavior to make them work.Complex RF Module andEvaluation BoardFigure 2. RFPro preserves designdatabase integrity and traceability toany design changes because nomanual “cookie-cutting” and exportingto a separate EM simulator is needed.Keysight ADS enables error-freeassembly and 3D routing of complexmulti-technology RF module, includingits PCB eval board for in-situ EM-circuitsimulation by RFPro.5G/6G Antenna-Circuit InteractionsFigure 3. Nonlinear circuit excitation of integrated phased array antenna in RF module analyzes impedance change vs. beam scan angle in RFPro EM-circuit co-simulation.60GHz WiGig Wafer Level Packaging with Integrated AntennaFigure 4. Multi-technology 60 GHz WiGig module with beam forming IC, 3D feed network and phased array antenna packaging are assembled in ADS for EM analysis of any chosen RF signal paths with RFPro automatic net extraction.Acknowledgement:Designed by Fraunhofer Institute and fabricated by Global Foundries.MEMs switch and Evaluation BoardFigure 5. Ultra-low loss MEMs switch integratedonto PCB evaluation board with dimensionsranging from microns to centimeters is efficientlymeshed and accurately simulated with RFPro toachieve one-pass success.Acknowledgment: Designed and fabricated byMenloMicro.Complex RF Module AssemblyFigure 6. Complex multi-technology RF modulecontaining RFICs,MMICs, packaging,laminates, antennas, andPCBs are assembled inAdvanced Design System(ADS) for RFPro EMsimulation of any selectedRF paths withouttraditional manual“cookie-cutting.”Keysight enables innovators to push the boundaries of engineering by quickly solving design, emulation, and test challenges to create the best product experiences. Start your innovation journey at .This information is subject to change without notice. © Keysight Technologies, 2018 – 2023, Published in USA, March 31, 2023, 5992-3333ENRFPro Product ConfigurationsFigure 7. RFPro includes Full 3D FEM and Planar 3D Momentum solvers launched through an intelligent RFPro UI to automate EM-circuit analysis. EM parallel high performance computing accelerators can be added to speed up simulation from 5x to 20x. HFSS link enables HFSS as a solver (separate license required).RFPro Bundles and Element as upgrades for Momentum, HFSS, Virtuoso, Custom Compiler and Tanner users•RFPro bundles along with powerful ADS multi-technology 3D assembly layout for RF modules and RF packaging:o W3604B PathWave ADS Core, EM Design, Layout, RFProo W3606B PathWave ADS Core, EM Design, Layout, RFPro, RF Ckt Sim o W3607B PathWave ADS Core, EM Design, Layout, RFPro, RF Ckt Sim, Sys-Ckt Verificationo W3608B PathWave ADS Core, EM Design, Layout, RFPro, RF Ckt Sim, Sys-Ckt Verification, VTBs o W3615B PathWave ADS Core, EM Design Core, Layout, RFPro, HB • RFPro element W3030E shown in Figure 6 is purchased as an add-on element to an existing ADS, Virtuoso, or Custom Compiler environment•RFPro EM HPC accelerator W3039E enables parallel EM simulation to speed up analysis. Multiple accelerators can be added to increase speedup from 5x to 20x depending on nature of problem.Take the Next Step with RFProFor more information or to request a free trial of RFPro and ADS, visit • https:///zz/en/lib/resources/software-releases/whats-new-in-rf-microwave.html • https:///products/W3030E。

On the wave operators for the critical nonlinear Schrodinger equation

On the wave operators for the critical nonlinear Schrodinger equation

WAVE OPERATORS FOR CRITICAL NLS
3
with associated wave operators W± (µ) for small L2 data. For φ ∈ L2 (R), define
λ (N± φ)(x) = φ(x) exp ±iλ x −∞
|φ(y )|2 dy .
arXiv:math/0702694v1 [math.AP] 23 Feb 2007
ON THE WAVE OPERATORS FOR THE CRITICAL ¨ NONLINEAR SCHRODINGER EQUATION
´ REMI CARLES AND TOHRU OZAWA Abstract. We prove that for the L2 -critical nonlinear Schr¨ odinger equations, the wave operators and their inverse are related explicitly in terms of the Fourier transform. We discuss some consequences of this property. In the onedimensional case, we show a precise similarity between the L2 -critical nonlinear Schr¨ odinger equation and a nonlinear Schr¨ odinger equation of derivative type.
λ • If ψ solves (1.6), then N− (ψ ) solves (1.7). λ • If u solves (1.7), then N+ (u) solves (1.6). • The following identity holds when all terms are well-defined: 1 −1 λ λ λ F ◦ Ω− ± = N− ◦ F ◦ W± ◦ N+ = N+ −1 −1

fourth-order verlet method -回复

fourth-order verlet method -回复

fourth-order verlet method -回复第一节:引言和背景介绍(200-300字)在计算物理中,数值模拟是一种重要的工具,用于模拟和解决实际问题。

物理系统的动力学演化是通常需要模拟的主要方面之一。

在这方面,许多数值方法已经被开发出来,其中之一是四阶Verlet方法。

四阶Verlet方法是一种数值积分方法,用于计算动力学方程的数值解。

该方法以物理学家和数学家L. Verlet的名字命名,是一种改进、高精度的方法,比传统的Euler方法更为准确。

该方法已经被广泛应用于众多领域,包括分子动力学模拟、天体力学和粒子物理学等。

第二节:基本原理解释(500-600字)四阶Verlet方法基于牛顿第二定律和Taylor级数展开的思想。

它采用两个连续时间步骤之间的距离和加速度来计算下一个时间步骤的位置。

其主要思想是通过对位置的展开来近似求解速度以及加速度,并在迭代中引入时间步长的高阶项。

这种高精度展开的优点在于它能显著减小数值积分中的截断误差。

具体而言,在四阶Verlet方法中,位置的更新可以表示为以下公式:r(t+Δt) = 2r(t) - r(t-Δt) + Δt²a(t) + O(Δt⁴)其中,r(t)是当前时间步t的位置,a(t)是当前时间步t的加速度,Δt是时间步长。

通过该公式,我们可以根据前两个时间步的位置和当前时间步的加速度来计算下一个时间步的位置。

这种方法的精度达到O(Δt⁴),相对于Euler方法(O(Δt²))有着更高的精度。

需要注意的是,四阶Verlet方法在进行迭代时,涉及到位置更新和加速度的计算,在一些特定问题中可能需要引入其他计算,如通过力场势能来计算加速度。

因此,对于不同的应用,具体的计算步骤可能有所不同。

第三节:算法实现和应用举例(600-800字)四阶Verlet方法的实现相对简单,只需要按照公式中的步骤进行迭代即可。

下面以分子动力学模拟为例,详细介绍算法实现和应用。

fourth-order verlet method -回复

fourth-order verlet method -回复

fourth-order verlet method -回复什么是四阶Verlet方法(The fourth-order Verlet method)?四阶Verlet方法是一种用于数值求解常微分方程的算法。

它在物理建模和分子动力学模拟中被广泛应用,尤其适用于描述粒子或系统的运动和相互作用。

该方法的原理基于一个简单的物理概念:根据牛顿第二定律,系统的加速度是由作用在它上面的力决定的。

在四阶Verlet方法中,我们使用位置和速度的值来计算加速度,然后基于这个加速度更新位置和速度。

四阶Verlet方法的步骤如下:1. 初始化:我们需要给定系统的初始位置和速度。

这些值可以从实验数据或者计算结果中获得。

2. 计算加速度:我们根据系统力学方程计算系统的加速度。

这个方程通常涉及粒子之间的相互作用力,以及可能的外部力。

3. 更新位置:根据当前的位置、速度和加速度,可以使用以下公式更新位置:x(t+Δt) = x(t) + v(t)Δt + 0.5a(t)Δt^2这里,x(t)表示当前时刻的位置,v(t)表示当前时刻的速度,a(t)表示当前时刻的加速度,∆t表示时间步长。

4. 重新计算加速度:因为位置的更新可能导致粒子之间的相互作用力发生变化,我们需要使用更新后的位置重新计算加速度。

5. 更新速度:根据当前的速度和新计算的加速度,可以使用以下公式更新速度:v(t+Δt) = v(t) + 0.5(a(t) + a(t+Δt))Δt这里,a(t+Δt)表示使用更新后的位置计算得到的新加速度。

重复以上步骤直至达到所需的时间点或模拟结束。

使用四阶Verlet方法的好处是它的数值稳定性和高精度。

相比于一阶欧拉方法或者二阶Verlet方法,四阶Verlet方法可以更准确地预测粒子的运动轨迹和动能。

它的误差较小,让我们可以在更长的时间间隔内进行模拟,而不需要频繁地重新计算加速度。

然而,四阶Verlet方法也有一些限制。

首先,它假设系统是时间反演对称的,也就是说系统的行为在时间正向和时间逆向时是相同的。

Cahn-Hilliard_方程的一个超紧致有限差分格式

Cahn-Hilliard_方程的一个超紧致有限差分格式

第38卷第1期2024年1月山东理工大学学报(自然科学版)Journal of Shandong University of Technology(Natural Science Edition)Vol.38No.1Jan.2024收稿日期:20221209基金项目:陕西省自然科学基金项目(2018JQ1043)第一作者:栗雪娟,女,lxj_zk@;通信作者:王丹,女,1611182118@文章编号:1672-6197(2024)01-0073-06Cahn-Hilliard 方程的一个超紧致有限差分格式栗雪娟,王丹(西安建筑科技大学理学院,陕西西安710055)摘要:研究四阶Cahn-Hilliard 方程的数值求解方法㊂给出组合型超紧致差分格式,将其用于四阶Cahn-Hilliard 方程的空间导数离散,采用四阶Runge-Kutta 格式离散时间导数,将二者结合得到四阶Cahn-Hilliard 方程的离散格式,并给出了该格式的误差估计㊂通过编程计算得到其数值解,并与精确解进行对比,结果表明本文的数值方法误差小,验证了所提方法的有效性和可行性㊂关键词:四阶Cahn-Hilliard 方程;组合型超紧致差分方法;四阶Runge-Kutta 方法;误差估计中图分类号:TB532.1;TB553文献标志码:AA supercompact finite difference scheme for Cahn-Hilliard equationsLI Xuejuan,WANG Dan(School of Science,Xiᶄan University of Architecture and Technology,Xiᶄan 710055,China)Abstract :A numerical method for solving the fourth order Cahn-Hilliard equation is studied.The combi-national ultra-compact difference scheme is given and applied to the spatial derivative discretization of the fourth order Cahn-Hilliard equation.The fourth-order Runge-Kutta scheme is used to discrete time deriv-atives.The discrete scheme of the fourth order Cahn-Hilliard equation is obtained by combining the two methods,and the error estimate of the scheme is given.Finally,the numerical solution is obtained by programming and compared with the exact solution.The results show that the numerical method in this paper has a small error,verifying the effectiveness and feasibility of the proposed method.Keywords :fourth order Cahn-Hilliard equation;combinational supercompact difference scheme;fourthorder Runge-Kutta;error estimation㊀㊀本文考虑的四阶Cahn-Hilliard 方程为u t -f u ()xx +ku xxxx =0,x ɪ0,2π[],t >0,u x ,0()=u 0x (),x ɪ0,2π[],u 0,t ()=0,u 2π,t ()=0,t >0,ìîíïïïï(1)式中:求解区域为0,2π[],且kn ȡ0;f u ()为光滑函数;u 0x ()表示t =0时刻的初值;u t 表示u 关于时间t 求偏导数,u t =∂u∂t;f u ()xx表示f u ()关于x求二阶偏导数,f u ()xx=∂2f u ()∂x 2;u xxxx 表示u 关于x 求四阶偏导数,u xxxx=∂4u∂x4;u 是混合物中某种物质的浓度,被称为相变量㊂1958年,Cahn 和Hilliard 提出Cahn-Hilliard 方程,该方程最早被用来描述在温度降低时两种均匀的混合物所发生的相分离现象㊂随着学者对该方程的研究越来越深入,该方程的应用也越来越广泛,特别是在材料科学和物理学等领域中有广泛的应用[1-3]㊂㊀Cahn-Hilliard 方程的数值解法目前已有很多研究,文献[4]使用了全离散有限元方法,文献[5]使用了一类二阶稳定的Crank-Nicolson /Adams-Bashforth 离散化的一致性有限元逼近方法,文献[6-7]使用了有限元方法,文献[8]使用了不连续伽辽金有限元方法,文献[9]使用了Cahn-Hilliard 方程的完全离散谱格式,文献[10]使用了高阶超紧致有限差分方法,文献[11]使用了高阶优化组合型紧致有限差分方法㊂综上所述,本文拟对Cahn-Hilliard 方程构造一种新的超紧致差分格式,将空间组合型超紧致差分方法和修正的时间四阶Runge-Kutta 方法相结合,求解Cahn-Hilliard 方程的数值解,得到相对于现有广义格式精度更高的数值求解格式,并对组合型超紧致差分格式进行误差估计,最后通过数值算例验证该方法的可行性㊂1㊀高阶精度数值求解方法1.1㊀空间组合型超紧致差分格式早期的紧致差分格式是在Hermite 多项式的基础上构造而来的,Hermite 多项式中连续三个节点的一阶导数㊁二阶导数和函数值的数值关系可以表示为ð1k =-1a k f i +k +b k fᶄi +k +c k fᵡi +k ()=0㊂(2)1998年,Krishnan 提出如下紧致差分格式:a 1fᶄi -1+a 0fᶄi +a 2fᶄi +1+hb 1fᵡi -1+b 0fᵡi +b 2fᵡi +1()=1h c 1f i -2+c 2f i -1+c 0f i +c 3f i +1+c 4f i +2(),(3)式中:h 为空间网格间距;a 1,a 0,a 2,b 1,b 0,b 2,c 1,c 2,c 0,c 3,c 4均表示差分格式系数;f i 表示i 节点的函数值;fᶄi 和fᵡi 分别表示i 节点的一阶导数值和二阶导数值;f i -1,f i -2,f i +1,f i +2分别表示i 节点依次向前两个节点和依次向后两个节点的函数值;fᶄi -1,fᶄi +1分别表示i 节点依次向前一个节点和依次向后一个节点的一阶导数值;fᵡi -1,fᵡi +1分别表示i 节点依次向前一个节点和依次向后一个节点的二阶导数值㊂式(2)对应f (x )展开以x i 为邻域的泰勒级数为f x ()=f x i ()+hfᶄx i ()+h 2fᵡx i ()2!+㊀㊀㊀㊀㊀h3f‴x i ()3!+h 4f 4()x i ()4!+h 5f 5()x i ()5!+h 6f 6()x i ()6!+h 7f 7()x i ()7!㊂㊀㊀(4)㊀㊀差分格式的各项系数由式(3)决定,可得到如下的三点六阶超紧致差分格式:716fᶄi +1+fᶄi -1()+fᶄi -h 16fᵡi +1-fᵡi -1()=㊀㊀1516h f i +1-f i -1(),98h fᶄi +1-fᶄi -1()+fᵡi -18fᵡi +1+fᵡi -1()=㊀㊀3h 2f i +1-2f i +f i -1()ìîíïïïïïïïïïï(5)为优化三点六阶紧致差分格式,并保持较好的数值频散,将迎风机制[12]引入式(5),构造出如下三点五阶迎风型超紧致差分格式:78fᶄi -1+fᶄi +h 19fᵡi -1-718fᵡi -172fᵡi +1()=㊀㊀1h -10148f i -1+73f i -1148f i +1(),25fᵡi -1+fᵡi +1h 1910fᶄi -1+165fᶄi +910fᶄi +1()=㊀㊀1h 2-135f i -1-45f i +175f i +1()㊂ìîíïïïïïïïïïï(6)左右边界可达到三阶精度紧致格式:fᶄ1-132fᶄ2+fᶄ3()+3h4fᵡ2+fᵡ3()=㊀㊀-12h f 3-f 2(),fᵡ1+3728h fᶄ3-fᶄ2()+3914h fᶄ1-3356fᵡ3-fᵡ2()=㊀㊀f 3-2f 1+f 2(),ìîíïïïïïïïï(7)fᶄN -132fᶄN -2+fᶄN -1()-3h 4fᵡN -2+fᵡN -1()=㊀㊀12h f N -2-f N -1(),fᵡN -3728h (fᶄN -2-fᶄN -1)-3914h fᶄN -3356(fᵡN -2-㊀㊀fᵡN -1)=1314h 2f N -2-2f N +f N -1()㊂ìîíïïïïïïïïïï(8)上述组合型超紧致差分格式只需要相邻的三个节点便可以同时求得一阶导数和二阶导数的五阶精度近似值,比普通差分格式的节点更少,降低了计算量㊂为便于编程计算,将上述构造的组合型超紧致差分格式重写为矩阵表达形式㊂假设U 为位移矩阵,其大小为m ˑn ,则求一阶导数和二阶导数的离47山东理工大学学报(自然科学版)2024年㊀散过程可以用矩阵运算表示为AF=BU,(9)结合内点的三点五阶迎风型超紧致差分格式和边界点的三点三阶差分格式,组成式(9)中等式左边的矩阵A和等式右边的矩阵B,大小分别为2mˑ2n 和2mˑn;F为奇数行为空间一阶导数和偶数行为空间二阶导数组成的矩阵,大小为2mˑn㊂以上矩阵分别为:A=10-13/23h/4-13/23h/439/14h1-37/28h33/5637/28h-33/567/8h/91-7h/180-h/7219/10h2/516/5h19/1007/8h/91-7h/180-h/7219/10h2/516/5h19/100⋱⋱⋱⋱⋱⋱7/8h/91-7h/180-h/7219/10h2/516/5h19/100-13/2-3h/4-13/2-3h/410-37/28h-33/5637/28h33/56-39/14h1éëêêêêêêêêêêêêêêêêùûúúúúúúúúúúúúúúúú,(10)F=∂u∂x()1,1∂u∂x()1,2∂u∂x()1,n-1∂u∂x()1,n∂2u∂x2()1,1∂2u∂x2()1,2 ∂2u∂x2()1,n-1∂2u∂x2()1,n︙︙︙︙∂u∂x()m,1∂u∂x()m,2∂u∂x()m,n-1∂u∂x()m,n∂2u∂x2()m,1∂2u∂x2()m,2 ∂2u∂x2()m,n-1∂2u∂x2()m,néëêêêêêêêêêêêêêùûúúúúúúúúúúúúú,(11) B=012/h-12/h-13/7h213/14h213/14h2-101/48h7/3h-11/48h-13/5h2-4/5h217/5h2-101/48h27/3h-11/48h-13/5h2-4/5h217/5h2⋱⋱⋱-101/48h7/3h-11/48h-13/5h2-4/5h217/5h2012/h-12/h-13/7h213/14h213/14h2éëêêêêêêêêêêêêêêêêùûúúúúúúúúúúúúúúúú,(12)U=u1,1u1,2 u1,n-1u1,nu2,1u2,2 u2,n-1u2,n︙︙︙︙u m-1,1u m-1,2 u m-1,n-1u m-1,nu m,1u m,2 u m,n-1u m,néëêêêêêêêùûúúúúúúú㊂(13)㊀㊀由式(9)可得F=A-1BU㊂(14)㊀㊀解线性代数方程组(9)可得Cahn-Hilliard方程的空间一阶导数和二阶导数㊂对于四阶导数,可将已求得的二阶导数替代式(14)中的U,再次使用式(14)进行求取㊂57第1期㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀栗雪娟,等:Cahn-Hilliard方程的一个超紧致有限差分格式1.2㊀时间离散格式在对很多偏微分方程的数值求解中不仅需要高精度的空间离散格式,同时还需要高精度的时间离散格式㊂普通的一阶精度时间离散格式显然满足不了高精度计算要求,因此本文选用时间四阶Runge-Kutta 格式进行时间离散㊂Runge-Kutta 方法是基于欧拉方法改进后的求解偏微分方程的常用方法,这种方法不仅计算效率高,而且稳定性好㊂格式的推算过程如下:假设求解方程为∂u∂t+F u ()=0,(15)式中F 是对空间变量的微分算子,则修正的四阶Runge-Kutta 格式为u 0i =u n i ,u 1i =u n i-Δt 4F u ()()0i,u 2i =u ni -Δt 3F u ()()1i,u 3i =u n i-Δt 2F u ()()2i,u n +1i =u n i -Δt F u ()()3i ㊂ìîíïïïïïïïïïïïï(16)1.3㊀误差估计以五阶精度将fᶄi -1,fᶄi +1,fᵡi -1,fᵡi +1泰勒级数展开:fᶄi -1=fᶄi -hfᵡi +h 22!f (3)i -h 33!f (4)i +㊀㊀h 44!f (5)i -h 55!f (6)i ,fᶄi +1=fᶄi +hfᵡi +h 22!f (3)i +h 33!f (4)i+㊀㊀h 44!f (5)i +h 55!f (6)i ,fᵡi -1=fᵡi -hf (3)i +h 22!f (4)i -h 33!f (5)i+㊀㊀h 44!f (6)i -h 55!f (7)i ,fᵡi +1=fᵡi +hf (3)i +h 22!f (4)i +h 33!f (5)i +㊀㊀h 44!f (6)i +h 55!f (7)i ㊂ìîíïïïïïïïïïïïïïïïïïïïïïïïï(17)将式(17)代入式(6),所求得组合型超紧致差分格式的一阶导数及二阶导数对应的截断误差为:78fᶄi -1+fᶄi +h19fᵡi -1-718fᵡi -172fᵡi +1()=㊀1h -10148f i -1+73f i -1148f i +1()+78640f 6()ih 5,25fᵡi -1+fᵡi +1h 1910fᶄi -1+165fᶄi +910fᶄi +1()=㊀-135f i -1-45f i +175f i +1()-5125200f 7()i h 5,ìîíïïïïïïïïïï(18)78640f 6()i h 5ʈ8.101ˑ10-4f 6()i h 5,5125200f 7()ih 5ʈ2.023ˑ10-3f 7()i h 5㊂ìîíïïïï(19)㊀㊀使用组合型超紧致差分格式的好处是在每一个网格点上存在一个一阶和二阶连续导数的多项式㊂本文比较了组合型超紧致差分格式和现有广义格式的一阶导数和二阶导数的截断误差:fᶄi +αfᶄi +1+fᶄi -1()+βfᶄi +2+fᶄi -2()=㊀㊀a f i +1-f i -12h +b f i +2-f i -24h +c f i +3-f i -36h ,fᵡi +αfᵡi +1+fᵡi -1()+βfᵡi +2+fᵡi -2()=㊀㊀a f i +1-2f i +f i -1h 2+b f i +2-2f i +f i -24h2+㊀㊀c f i +3-2f i +f i -39h 2,ìîíïïïïïïïïïïï(20)式中参数α,β,a ,b ,c 在各种格式中取不同的值(表1,表2)㊂本文发现在各种方案中,组合型超紧致差分格式的截断误差最小㊂表1㊀不同格式一阶导数的截断误差格式αβa b c 截断误差二阶中心010013!f 3()ih 2标准Padeᶄ格式1/403/20-15f 5()ih 4六阶中心03/2-3/51/1036ˑ17!f 7()ih 6五阶迎风143ˑ16!f 6()ih 5表2㊀不同格式二阶导数的截断误差格式αβa b c 截断误差二阶中心01002ˑ14!f 4()ih 2标准Padeᶄ格式1/1006/50185ˑ16!f 6()ih 4六阶中心03/2-3/51/1072ˑ18!f 8()ih 6五阶迎风165ˑ17!f 7()ih 567山东理工大学学报(自然科学版)2024年㊀2㊀数值算例误差范数L 1和L 2的定义为:L 1=1N ðNi =1u -U ,L 2=1N ðNi =1u -U ()2㊂对四阶Cahn-Hilliard 取f u ()=u 2,k =2,在边界条件u 0,t ()=u 2π,t ()=0下的计算区域为0,2π[],方程的精确解为u x ,t ()=e -tsin x2,数值解为U ㊂对给出的数值算例,计算误差范数L 1和L 2,并采用四种方法进行数值模拟,对其数值结果进行误差分析和对比,结果见表3,本文所使用方法效果最佳,由此证明所提方法的有效性和可行性㊂表3㊀0.5s 时刻精确度测试结果(N =10)方法L 1误差L 2误差间断有限元格式1.56235ˑ10-21.37823ˑ10-2普通中心差分格式1.66667ˑ10-18.33333ˑ10-2紧致差分格式7.14286ˑ10-31.78571ˑ10-3组合型超紧致差分格式6.48148ˑ10-36.34921ˑ10-4㊀㊀用本文提出的式(6) 式(8)和式(16)计算算例,图1 图3给出了不同时刻数值解与精确解的(a)精确解(b)数值解图1㊀0.1s 的精确解与数值解(a)精确解(b)数值解图2㊀0.5s 的精确解与数值解(a)精确解(b)数值解图3㊀1s 的精确解与数值解77第1期㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀㊀栗雪娟,等:Cahn-Hilliard 方程的一个超紧致有限差分格式对比图,可以看出,数值解与精确解吻合很好,表明本文给出的数值格式是可行的,并且精度较高㊂3 结论本文研究了组合型超紧致差分方法和四阶Runge-Kutta方法,并将其运用于四阶Cahn-Hilliard 方程的数值求解,通过研究与分析,得到如下结论: 1)使用泰勒级数展开锁定差分格式系数,得到本文的组合型超紧致差分格式精度更高,误差更小㊂2)在边界点处有效地达到了降阶,并提高了精度㊂3)通过数值算例验证了数值格式的有效性㊂4)预估该方法可应用于高阶偏微分方程的数值求解㊂参考文献:[1]HUANG Q M,YANG J X.Linear and energy-stable method with en-hanced consistency for the incompressible Cahn-Hilliard-Navier-Stokes two-phase flow model[J].Mathematics,2022,10 (24):4711.[2]AKRIVIS G,LI B Y,LI D F.Energy-decaying extrapolated RK-SAV methods for the allen-Cahn and Cahn-Hilliard equations[J].SIAM Journal on Scientific Computing,2019,41(6):3703-3727. [3]YOUNAS U,REZAZADEH H,REN J,et al.Propagation of diverse exact solitary wave solutions in separation phase of iron(Fe-Cr-X(X =Mo,Cu))for the ternary alloys[J].International Journal of Mod-ern Physics B,2022,36(4):2250039.[4]HE R J,CHEN Z X,FENG X L.Error estimates of fully discrete finite element solution for the2D Cahn-Hilliard equation with infinite time horizon[J].Numerical Methods for Partial Differential Equati-ions,2017,33(3):742-762.[5]HE Y N,FENG X L.Uniform H2-regularity of solution for the2D Navier-Stokes/Cahn-Hilliard phase field model[J].Journal of Math-ematical Analysis and Applications,2016,441(2):815-829. [6]WEN J,HE Y N,HE Y L.Semi-implicit,unconditionally energy sta-ble,stabilized finite element method based on multiscale enrichment for the Cahn-Hilliard-Navier-Stokes phase-field model[J]. Computers and Mathematics with Applications,2022,126:172 -181.[7]MESFORUSH A,LARSSON S.A posteriori error analysis for the Cahn-Hilliard equation[J].Journal of Mathematical Modeling, 2022,10(4):437-452.[8]XIA Y,XU Y,SHU C W.Local discontinuous Galerkin methods for the Cahn-Hilliard type equation[J].Journal of Computational Phys-ics,2007,227(1):472-491.[9]CHEN L,LüS J.A fully discrete spectral scheme for time fractional Cahn-Hilliard equation with initial singularity[J].Computers and Mathematics with Applications,2022,127:213-224. [10]周诚尧,汪勇,桂志先,等.二维黏弹介质五点八阶超紧致有限差分声波方程数值模拟[J].科学技术与工程,2020,20(1):54 -63.[11]汪勇,徐佑德,高刚,等.二维黏滞声波方程的优化组合型紧致有限差分数值模拟[J].石油地球物理勘探,2018,53(6):1152 -1164,1110.[12]程晓晗,封建湖,郑素佩.求解对流扩散方程的低耗散中心迎风格式[J].应用数学,2017,30(2):344-349.(编辑:杜清玲)87山东理工大学学报(自然科学版)2024年㊀。

MATLAB回归分析工具箱使用方法

MATLAB回归分析工具箱使用方法

Surface generated using the Surface Fitting Tool. The tool supports a variety of fitting methods, including linear regression, nonlinear regression, interpolation, and smoothing.Working with Curve Fitting ToolboxCurve Fitting Toolbox provides the most widely used techniques for fitting curves and surfaces to data, including linear and nonlinear regression, splines and interpolation, and smoothing. The toolbox supports options for robust regression to fit data sets that contain outliers. All algorithms can be accessed through the command line or by using GUIs.Introduction to Surface Fitting7:20Use the Surface Fitting Tool GUI to fit curves and surfaces to data usingregression, interpolation, and smoothing.Fitting multiple candidate models to a single data series using the Surface Fitting Tool. You can compare the fitted surfaces visually or use goodness-of-fit metrics such as R2, adjusted R2, sum of the squared errors, and root mean squared error.Fitting Data with GUIsThe Curve Fitting Tool GUI and Surface Fitting Tool GUI simplify common tasks that include:▪Importing data from the MATLAB®workspace▪Visualizing your data to perform exploratory data analysis▪Generating fits using multiple fitting algorithms▪Evaluating the accuracy of your models▪Performing postprocessing analysis that includes interpolation and extrapolation, generating confidence intervals, and calculating integrals and derivatives▪Exporting fits to the MATLAB workspace for further analysis▪Automatically generating MATLAB code to capture work and automate tasksMATLAB function generated with the Surface Fitting Tool.Working at the Command LineWorking at the command line lets you develop custom functions for analysis and visualization. These functions enable you to:▪Duplicate your analysis with a new data set▪Replicate your analysis with multiple data sets (batch processing)▪Embed a fitting routine into MATLAB functions▪Extend the base capabilities of the toolboxCurve Fitting Toolbox provides a simple intuitive syntax for command-line fitting, as in the following examples:▪Linear Regression:fittedmodel = fit([X,Y], Z, ’poly11’);▪Nonlinear Regression:fittedmodel = fit(X, Y, ’fourier2’);▪Interpolation:fittedmodel = fit([Time,Temperature], Energy, ’cubicinterp’);▪Smoothing:fittedmodel = fit([Time,Temperature], Energy, ’lowess’, ‘span’,0.12);The results of a fitting operation are stored in an object called“fittedmodel.”Postprocessing analysis, such as plotting, evaluation, and calculating integrals and derivatives, can be performed by applying a method to this object, as in these examples:▪Plotting:plot(fittedmodel)▪Differentiation:differentiate(fittedmodel, X, Y)▪Evaluation:fittedmodel(80, 40)Curve Fitting Toolbox lets you move from GUIs to the command line. Using the GUIs, you can generate MATLAB functions that duplicate any GUI-based analysis. You can also create fit objects within the GUI and export them to the MATLAB workspace for further analysis.Extending the capabilities of the toolbox with a custom visualization. The color of the heat map corresponds to the deviation between the fitted surface and a reference model.RegressionCurve Fitting Toolbox supports linear and nonlinear regression.Linear RegressionThe toolbox supports over 100 regression models, including:▪Lines and planes▪High order polynomials (up to ninth degree for curves and fifth degree for surfaces)▪Fourier and power series▪Gaussians▪Weibull functions▪Exponentials▪Rational functions▪Sum of sinesAll of these standard regression models include optimized solver parameters and starting conditions to improve fit quality. Alternatively, you can use the Custom Equation option to specify your own regression model.In the GUIs you can generate fits based on complicated parametric models by using a drop-down menu. At thecommand line you can access the same models using intuitive names.(top, left) or select a second-order Fourier series in the Fit Editor (top, right).input a MATLAB function.The regression analysis options in Curve Fitting Toolbox enable you to:▪Choose between two types of robust regression: bisquare or least absolute residual▪Specify starting conditions for the solvers▪Constrain regression coefficients▪Choose Trust-Region or Levenberg-Marquardt algorithmsFit Options GUI in the Surface Fitting Tool. You can control the type of robust regression, the choice of optimization solver, and the behavior of the optimization solver with respect to starting conditions and constraints.Splines and InterpolationCurve Fitting Toolbox supports a variety of interpolation methods, including B-splines, thin plate splines, and tensor product splines. Curve Fitting Toolbox provides functions for advanced spline operations, including break/ knot manipulation, optimal knot placement, and data-point weighting.A cubic B-spline and the four polynomials from which it is made. Splines are smooth piecewise polynomials used to represent functions over large intervals.You can represent a polynomial spline in ppform and B-form. The ppform describes the spline in terms of breakpoints and local polynomial coefficients, and is useful when the spline will be evaluated extensively. The B-form describes a spline as a linear combination of B-splines, specifically the knot sequence and B-spline coefficients.Curve Fitting Toolbox also supports other types of interpolation, including:▪Linear interpolation▪Nearest neighbor interpolation▪Piecewise cubic interpolation▪Biharmonic surface interpolation▪Piecewise Cubic Hermite Interpolating Polynomial (PCHIP)The Curve Fitting Toolbox commands for constructing spline approximations accommodate vector-valuedgridded data, enabling you to create curve and surfaces in any number of dimensions.Linear interpolation using the Surface Fitting Tool.SmoothingSmoothing algorithms are widely used to remove noise from a data set while preserving important patterns. Curve Fitting Toolbox supports both smoothing splines and localized regression, which enable you to generate apredictive model without specifying a functional relationship between the variables.Localized regression model. Smoothing techniques can be used to generate predictive models without specifying a parametric relationship between the variables.Nonparametric Fitting4:08Develop a predictive model when you can’t specify a function thatdescribes the relationship between variables.Curve Fitting Toolbox supports localized regression using either a first-order polynomial (lowess) or a second-order polynomial (loess). The toolbox also provides options for robust localized regression to accommodate outliers in the data set. Curve Fitting Toolbox also supports moving average smoothers such as Savitzky-Golay filters.Exploratory data analysis using a Savitzky-Golay filter. Smoothing data enables you to identify periodic components.Previewing and Preprocessing DataCurve Fitting Toolbox supports a comprehensive workflow that progresses from exploratory data analysis (EDA) through model development and comparison to postprocessing analysis.You can plot a data set in two or three dimensions. The toolbox provides options to remove outliers, section data series, and weight or exclude data points.Curve Fitting Toolbox lets you automatically center and scale a data set to normalize the data and improve fit quality. The Center and scale option can be used when there are dramatic differences in variable scales or thedistance between data points varies across dimensions.Normalizing data with the Center and scale option to improve fit quality.Outlier exclusion using the Curve Fitting Tool (top). You can create exclusion rules (middle) to remove all data points that match some specific criteria, and use the graphical exclusion option (bottom) to click on a data point and removeit from the sample.Weighting data points using the Surface Fitting Tool.Developing, Comparing, and Managing ModelsCurve Fitting Toolbox lets you fit multiple candidate models to a data set. You can then evaluate goodness of fit using a combination of descriptive statistics, visual inspection, and validation.Descriptive StatisticsCurve Fitting Toolbox provides a wide range of descriptive statistics, including:▪R-square and adjusted R-square▪Sum of squares due to errors and root mean squared error▪Degrees of freedomThe Table of Fits lists all of the candidate models in a sortable table, enabling you to quickly compare and contrastmultiple models.The Surface Fitting Tool, which provides a sortable table of candidate models.Visual Inspection of DataThe toolbox enables you to visually inspect candidate models to reveal problems with fit that are not apparent in summary statistics. For example, you can:▪Generate side-by-side surface and residual plots to search for patterns in the residuals▪Simultaneously plot multiple models to compare how well they fit the data in critical regions▪Plot the differences between two models as a new surfaceSurface generated with the Surface Fitting Tool. The color of the heat map corresponds to the deviation between the fitted surface and a reference model.Validation TechniquesCurve Fitting Toolbox supports validation techniques that help protect against overfitting. You can generate a predictive model using a training data set, apply your model to a validation data set, and then evaluate goodness of fit.Postprocessing AnalysisOnce you have selected the curve or surface that best describes your data series you can perform postprocessing analysis. Curve Fitting Toolbox enables you to:▪Create plots▪Use your model to estimate values (evaluation)▪Calculate confidence intervals▪Create prediction bounds▪Determine the area under your curve (integration)▪Calculate derivativesPostprocessing analysis with the Curve Fitting Tool, which automatically creates a scatter plot of the raw data along with the fitted curve. The first and second derivatives of the fitted curve are also displayed.The following examples show how postprocessing at the command line applies intuitive commands to the objects created from a fitting operation:▪Evaluation:EnergyConsumption = fittedmodel(X, Y)▪Plotting:EnergySurface = plot(fittedmodel)▪Integration:Volume_Under_Surface = quad2d(fittedmodel, Min_X, Max_X, Min_Y, Max_Y)▪Differentiation:Gradient = differentiate(fittedmodel, X,Y)▪Computing confidence intervals: Confidence_Intervals = confint(fittedmodel)Product Details, Demos, and System Requirements/products/curvefittingTrial Software/trialrequestSales/contactsalesTechnical Support/support Using command-line postprocessing to calculate and plot a gradient.ResourcesOnline User Community /matlabcentral Training Services /training Third-Party Products and Services /connections Worldwide Contacts /contact。

伍德里奇《计量经济学导论--现代观点》1

伍德里奇《计量经济学导论--现代观点》1

T his appendix derives various results for ordinary least squares estimation of themultiple linear regression model using matrix notation and matrix algebra (see Appendix D for a summary). The material presented here is much more ad-vanced than that in the text.E.1THE MODEL AND ORDINARY LEAST SQUARES ESTIMATIONThroughout this appendix,we use the t subscript to index observations and an n to denote the sample size. It is useful to write the multiple linear regression model with k parameters as follows:y t ϭ␤1ϩ␤2x t 2ϩ␤3x t 3ϩ… ϩ␤k x tk ϩu t ,t ϭ 1,2,…,n ,(E.1)where y t is the dependent variable for observation t ,and x tj ,j ϭ 2,3,…,k ,are the inde-pendent variables. Notice how our labeling convention here differs from the text:we call the intercept ␤1and let ␤2,…,␤k denote the slope parameters. This relabeling is not important,but it simplifies the matrix approach to multiple regression.For each t ,define a 1 ϫk vector,x t ϭ(1,x t 2,…,x tk ),and let ␤ϭ(␤1,␤2,…,␤k )Јbe the k ϫ1 vector of all parameters. Then,we can write (E.1) asy t ϭx t ␤ϩu t ,t ϭ 1,2,…,n .(E.2)[Some authors prefer to define x t as a column vector,in which case,x t is replaced with x t Јin (E.2). Mathematically,it makes more sense to define it as a row vector.] We can write (E.2) in full matrix notation by appropriately defining data vectors and matrices. Let y denote the n ϫ1 vector of observations on y :the t th element of y is y t .Let X be the n ϫk vector of observations on the explanatory variables. In other words,the t th row of X consists of the vector x t . Equivalently,the (t ,j )th element of X is simply x tj :755A p p e n d i x EThe Linear Regression Model inMatrix Formn X ϫ k ϵϭ .Finally,let u be the n ϫ 1 vector of unobservable disturbances. Then,we can write (E.2)for all n observations in matrix notation :y ϭX ␤ϩu .(E.3)Remember,because X is n ϫ k and ␤is k ϫ 1,X ␤is n ϫ 1.Estimation of ␤proceeds by minimizing the sum of squared residuals,as in Section3.2. Define the sum of squared residuals function for any possible k ϫ 1 parameter vec-tor b asSSR(b ) ϵ͚nt ϭ1(y t Ϫx t b )2.The k ϫ 1 vector of ordinary least squares estimates,␤ˆϭ(␤ˆ1,␤ˆ2,…,␤ˆk )؅,minimizes SSR(b ) over all possible k ϫ 1 vectors b . This is a problem in multivariable calculus.For ␤ˆto minimize the sum of squared residuals,it must solve the first order conditionѨSSR(␤ˆ)/Ѩb ϵ0.(E.4)Using the fact that the derivative of (y t Ϫx t b )2with respect to b is the 1ϫ k vector Ϫ2(y t Ϫx t b )x t ,(E.4) is equivalent to͚nt ϭ1xt Ј(y t Ϫx t ␤ˆ) ϵ0.(E.5)(We have divided by Ϫ2 and taken the transpose.) We can write this first order condi-tion as͚nt ϭ1(y t Ϫ␤ˆ1Ϫ␤ˆ2x t 2Ϫ… Ϫ␤ˆk x tk ) ϭ0͚nt ϭ1x t 2(y t Ϫ␤ˆ1Ϫ␤ˆ2x t 2Ϫ… Ϫ␤ˆk x tk ) ϭ0...͚nt ϭ1x tk (y t Ϫ␤ˆ1Ϫ␤ˆ2x t 2Ϫ… Ϫ␤ˆk x tk ) ϭ0,which,apart from the different labeling convention,is identical to the first order condi-tions in equation (3.13). We want to write these in matrix form to make them more use-ful. Using the formula for partitioned multiplication in Appendix D,we see that (E.5)is equivalent to΅1x 12x 13...x 1k1x 22x 23...x 2k...1x n 2x n 3...x nk ΄΅x 1x 2...x n ΄Appendix E The Linear Regression Model in Matrix Form756Appendix E The Linear Regression Model in Matrix FormXЈ(yϪX␤ˆ) ϭ0(E.6) or(XЈX)␤ˆϭXЈy.(E.7)It can be shown that (E.7) always has at least one solution. Multiple solutions do not help us,as we are looking for a unique set of OLS estimates given our data set. Assuming that the kϫ k symmetric matrix XЈX is nonsingular,we can premultiply both sides of (E.7) by (XЈX)Ϫ1to solve for the OLS estimator ␤ˆ:␤ˆϭ(XЈX)Ϫ1XЈy.(E.8)This is the critical formula for matrix analysis of the multiple linear regression model. The assumption that XЈX is invertible is equivalent to the assumption that rank(X) ϭk, which means that the columns of X must be linearly independent. This is the matrix ver-sion of MLR.4 in Chapter 3.Before we continue,(E.8) warrants a word of warning. It is tempting to simplify the formula for ␤ˆas follows:␤ˆϭ(XЈX)Ϫ1XЈyϭXϪ1(XЈ)Ϫ1XЈyϭXϪ1y.The flaw in this reasoning is that X is usually not a square matrix,and so it cannot be inverted. In other words,we cannot write (XЈX)Ϫ1ϭXϪ1(XЈ)Ϫ1unless nϭk,a case that virtually never arises in practice.The nϫ 1 vectors of OLS fitted values and residuals are given byyˆϭX␤ˆ,uˆϭyϪyˆϭyϪX␤ˆ.From (E.6) and the definition of uˆ,we can see that the first order condition for ␤ˆis the same asXЈuˆϭ0.(E.9) Because the first column of X consists entirely of ones,(E.9) implies that the OLS residuals always sum to zero when an intercept is included in the equation and that the sample covariance between each independent variable and the OLS residuals is zero. (We discussed both of these properties in Chapter 3.)The sum of squared residuals can be written asSSR ϭ͚n tϭ1uˆt2ϭuˆЈuˆϭ(yϪX␤ˆ)Ј(yϪX␤ˆ).(E.10)All of the algebraic properties from Chapter 3 can be derived using matrix algebra. For example,we can show that the total sum of squares is equal to the explained sum of squares plus the sum of squared residuals [see (3.27)]. The use of matrices does not pro-vide a simpler proof than summation notation,so we do not provide another derivation.757The matrix approach to multiple regression can be used as the basis for a geometri-cal interpretation of regression. This involves mathematical concepts that are even more advanced than those we covered in Appendix D. [See Goldberger (1991) or Greene (1997).]E.2FINITE SAMPLE PROPERTIES OF OLSDeriving the expected value and variance of the OLS estimator ␤ˆis facilitated by matrix algebra,but we must show some care in stating the assumptions.A S S U M P T I O N E.1(L I N E A R I N P A R A M E T E R S)The model can be written as in (E.3), where y is an observed nϫ 1 vector, X is an nϫ k observed matrix, and u is an nϫ 1 vector of unobserved errors or disturbances.A S S U M P T I O N E.2(Z E R O C O N D I T I O N A L M E A N)Conditional on the entire matrix X, each error ut has zero mean: E(ut͉X) ϭ0, tϭ1,2,…,n.In vector form,E(u͉X) ϭ0.(E.11) This assumption is implied by MLR.3 under the random sampling assumption,MLR.2.In time series applications,Assumption E.2 imposes strict exogeneity on the explana-tory variables,something discussed at length in Chapter 10. This rules out explanatory variables whose future values are correlated with ut; in particular,it eliminates laggeddependent variables. Under Assumption E.2,we can condition on the xtjwhen we com-pute the expected value of ␤ˆ.A S S U M P T I O N E.3(N O P E R F E C T C O L L I N E A R I T Y) The matrix X has rank k.This is a careful statement of the assumption that rules out linear dependencies among the explanatory variables. Under Assumption E.3,XЈX is nonsingular,and so ␤ˆis unique and can be written as in (E.8).T H E O R E M E.1(U N B I A S E D N E S S O F O L S)Under Assumptions E.1, E.2, and E.3, the OLS estimator ␤ˆis unbiased for ␤.P R O O F:Use Assumptions E.1 and E.3 and simple algebra to write␤ˆϭ(XЈX)Ϫ1XЈyϭ(XЈX)Ϫ1XЈ(X␤ϩu)ϭ(XЈX)Ϫ1(XЈX)␤ϩ(XЈX)Ϫ1XЈuϭ␤ϩ(XЈX)Ϫ1XЈu,(E.12)where we use the fact that (XЈX)Ϫ1(XЈX) ϭIk . Taking the expectation conditional on X givesAppendix E The Linear Regression Model in Matrix Form 758E(␤ˆ͉X)ϭ␤ϩ(XЈX)Ϫ1XЈE(u͉X)ϭ␤ϩ(XЈX)Ϫ1XЈ0ϭ␤,because E(u͉X) ϭ0under Assumption E.2. This argument clearly does not depend on the value of ␤, so we have shown that ␤ˆis unbiased.To obtain the simplest form of the variance-covariance matrix of ␤ˆ,we impose the assumptions of homoskedasticity and no serial correlation.A S S U M P T I O N E.4(H O M O S K E D A S T I C I T Y A N DN O S E R I A L C O R R E L A T I O N)(i) Var(ut͉X) ϭ␴2, t ϭ 1,2,…,n. (ii) Cov(u t,u s͉X) ϭ0, for all t s. In matrix form, we canwrite these two assumptions asVar(u͉X) ϭ␴2I n,(E.13)where Inis the nϫ n identity matrix.Part (i) of Assumption E.4 is the homoskedasticity assumption:the variance of utcan-not depend on any element of X,and the variance must be constant across observations, t. Part (ii) is the no serial correlation assumption:the errors cannot be correlated across observations. Under random sampling,and in any other cross-sectional sampling schemes with independent observations,part (ii) of Assumption E.4 automatically holds. For time series applications,part (ii) rules out correlation in the errors over time (both conditional on X and unconditionally).Because of (E.13),we often say that u has scalar variance-covariance matrix when Assumption E.4 holds. We can now derive the variance-covariance matrix of the OLS estimator.T H E O R E M E.2(V A R I A N C E-C O V A R I A N C EM A T R I X O F T H E O L S E S T I M A T O R)Under Assumptions E.1 through E.4,Var(␤ˆ͉X) ϭ␴2(XЈX)Ϫ1.(E.14)P R O O F:From the last formula in equation (E.12), we haveVar(␤ˆ͉X) ϭVar[(XЈX)Ϫ1XЈu͉X] ϭ(XЈX)Ϫ1XЈ[Var(u͉X)]X(XЈX)Ϫ1.Now, we use Assumption E.4 to getVar(␤ˆ͉X)ϭ(XЈX)Ϫ1XЈ(␴2I n)X(XЈX)Ϫ1ϭ␴2(XЈX)Ϫ1XЈX(XЈX)Ϫ1ϭ␴2(XЈX)Ϫ1.Appendix E The Linear Regression Model in Matrix Form759Formula (E.14) means that the variance of ␤ˆj (conditional on X ) is obtained by multi-plying ␴2by the j th diagonal element of (X ЈX )Ϫ1. For the slope coefficients,we gave an interpretable formula in equation (3.51). Equation (E.14) also tells us how to obtain the covariance between any two OLS estimates:multiply ␴2by the appropriate off diago-nal element of (X ЈX )Ϫ1. In Chapter 4,we showed how to avoid explicitly finding covariances for obtaining confidence intervals and hypotheses tests by appropriately rewriting the model.The Gauss-Markov Theorem,in its full generality,can be proven.T H E O R E M E .3 (G A U S S -M A R K O V T H E O R E M )Under Assumptions E.1 through E.4, ␤ˆis the best linear unbiased estimator.P R O O F :Any other linear estimator of ␤can be written as␤˜ ϭA Јy ,(E.15)where A is an n ϫ k matrix. In order for ␤˜to be unbiased conditional on X , A can consist of nonrandom numbers and functions of X . (For example, A cannot be a function of y .) To see what further restrictions on A are needed, write␤˜ϭA Ј(X ␤ϩu ) ϭ(A ЈX )␤ϩA Јu .(E.16)Then,E(␤˜͉X )ϭA ЈX ␤ϩE(A Јu ͉X )ϭA ЈX ␤ϩA ЈE(u ͉X ) since A is a function of XϭA ЈX ␤since E(u ͉X ) ϭ0.For ␤˜to be an unbiased estimator of ␤, it must be true that E(␤˜͉X ) ϭ␤for all k ϫ 1 vec-tors ␤, that is,A ЈX ␤ϭ␤for all k ϫ 1 vectors ␤.(E.17)Because A ЈX is a k ϫ k matrix, (E.17) holds if and only if A ЈX ϭI k . Equations (E.15) and (E.17) characterize the class of linear, unbiased estimators for ␤.Next, from (E.16), we haveVar(␤˜͉X ) ϭA Ј[Var(u ͉X )]A ϭ␴2A ЈA ,by Assumption E.4. Therefore,Var(␤˜͉X ) ϪVar(␤ˆ͉X )ϭ␴2[A ЈA Ϫ(X ЈX )Ϫ1]ϭ␴2[A ЈA ϪA ЈX (X ЈX )Ϫ1X ЈA ] because A ЈX ϭI kϭ␴2A Ј[I n ϪX (X ЈX )Ϫ1X Ј]Aϵ␴2A ЈMA ,where M ϵI n ϪX (X ЈX )Ϫ1X Ј. Because M is symmetric and idempotent, A ЈMA is positive semi-definite for any n ϫ k matrix A . This establishes that the OLS estimator ␤ˆis BLUE. How Appendix E The Linear Regression Model in Matrix Form 760Appendix E The Linear Regression Model in Matrix Formis this significant? Let c be any kϫ 1 vector and consider the linear combination cЈ␤ϭc1␤1ϩc2␤2ϩ… ϩc k␤k, which is a scalar. The unbiased estimators of cЈ␤are cЈ␤ˆand cЈ␤˜. ButVar(c␤˜͉X) ϪVar(cЈ␤ˆ͉X) ϭcЈ[Var(␤˜͉X) ϪVar(␤ˆ͉X)]cՆ0,because [Var(␤˜͉X) ϪVar(␤ˆ͉X)] is p.s.d. Therefore, when it is used for estimating any linear combination of ␤, OLS yields the smallest variance. In particular, Var(␤ˆj͉X) ՅVar(␤˜j͉X) for any other linear, unbiased estimator of ␤j.The unbiased estimator of the error variance ␴2can be written as␴ˆ2ϭuˆЈuˆ/(n Ϫk),where we have labeled the explanatory variables so that there are k total parameters, including the intercept.T H E O R E M E.4(U N B I A S E D N E S S O F␴ˆ2)Under Assumptions E.1 through E.4, ␴ˆ2is unbiased for ␴2: E(␴ˆ2͉X) ϭ␴2for all ␴2Ͼ0. P R O O F:Write uˆϭyϪX␤ˆϭyϪX(XЈX)Ϫ1XЈyϭM yϭM u, where MϭI nϪX(XЈX)Ϫ1XЈ,and the last equality follows because MXϭ0. Because M is symmetric and idempotent,uˆЈuˆϭuЈMЈM uϭuЈM u.Because uЈM u is a scalar, it equals its trace. Therefore,ϭE(uЈM u͉X)ϭE[tr(uЈM u)͉X] ϭE[tr(M uuЈ)͉X]ϭtr[E(M uuЈ|X)] ϭtr[M E(uuЈ|X)]ϭtr(M␴2I n) ϭ␴2tr(M) ϭ␴2(nϪ k).The last equality follows from tr(M) ϭtr(I) Ϫtr[X(XЈX)Ϫ1XЈ] ϭnϪtr[(XЈX)Ϫ1XЈX] ϭnϪn) ϭnϪk. Therefore,tr(IkE(␴ˆ2͉X) ϭE(uЈM u͉X)/(nϪ k) ϭ␴2.E.3STATISTICAL INFERENCEWhen we add the final classical linear model assumption,␤ˆhas a multivariate normal distribution,which leads to the t and F distributions for the standard test statistics cov-ered in Chapter 4.A S S U M P T I O N E.5(N O R M A L I T Y O F E R R O R S)are independent and identically distributed as Normal(0,␴2). Conditional on X, the utEquivalently, u given X is distributed as multivariate normal with mean zero and variance-covariance matrix ␴2I n: u~ Normal(0,␴2I n).761Appendix E The Linear Regression Model in Matrix Form Under Assumption E.5,each uis independent of the explanatory variables for all t. Inta time series setting,this is essentially the strict exogeneity assumption.T H E O R E M E.5(N O R M A L I T Y O F␤ˆ)Under the classical linear model Assumptions E.1 through E.5, ␤ˆconditional on X is dis-tributed as multivariate normal with mean ␤and variance-covariance matrix ␴2(XЈX)Ϫ1.Theorem E.5 is the basis for statistical inference involving ␤. In fact,along with the properties of the chi-square,t,and F distributions that we summarized in Appendix D, we can use Theorem E.5 to establish that t statistics have a t distribution under Assumptions E.1 through E.5 (under the null hypothesis) and likewise for F statistics. We illustrate with a proof for the t statistics.T H E O R E M E.6Under Assumptions E.1 through E.5,(␤ˆjϪ␤j)/se(␤ˆj) ~ t nϪk,j ϭ 1,2,…,k.P R O O F:The proof requires several steps; the following statements are initially conditional on X. First, by Theorem E.5, (␤ˆjϪ␤j)/sd(␤ˆ) ~ Normal(0,1), where sd(␤ˆj) ϭ␴͙ෆc jj, and c jj is the j th diagonal element of (XЈX)Ϫ1. Next, under Assumptions E.1 through E.5, conditional on X,(n Ϫ k)␴ˆ2/␴2~ ␹2nϪk.(E.18)This follows because (nϪk)␴ˆ2/␴2ϭ(u/␴)ЈM(u/␴), where M is the nϫn symmetric, idem-potent matrix defined in Theorem E.4. But u/␴~ Normal(0,I n) by Assumption E.5. It follows from Property 1 for the chi-square distribution in Appendix D that (u/␴)ЈM(u/␴) ~ ␹2nϪk (because M has rank nϪk).We also need to show that ␤ˆand ␴ˆ2are independent. But ␤ˆϭ␤ϩ(XЈX)Ϫ1XЈu, and ␴ˆ2ϭuЈM u/(nϪk). Now, [(XЈX)Ϫ1XЈ]Mϭ0because XЈMϭ0. It follows, from Property 5 of the multivariate normal distribution in Appendix D, that ␤ˆand M u are independent. Since ␴ˆ2is a function of M u, ␤ˆand ␴ˆ2are also independent.Finally, we can write(␤ˆjϪ␤j)/se(␤ˆj) ϭ[(␤ˆjϪ␤j)/sd(␤ˆj)]/(␴ˆ2/␴2)1/2,which is the ratio of a standard normal random variable and the square root of a ␹2nϪk/(nϪk) random variable. We just showed that these are independent, and so, by def-inition of a t random variable, (␤ˆjϪ␤j)/se(␤ˆj) has the t nϪk distribution. Because this distri-bution does not depend on X, it is the unconditional distribution of (␤ˆjϪ␤j)/se(␤ˆj) as well.From this theorem,we can plug in any hypothesized value for ␤j and use the t statistic for testing hypotheses,as usual.Under Assumptions E.1 through E.5,we can compute what is known as the Cramer-Rao lower bound for the variance-covariance matrix of unbiased estimators of ␤(again762conditional on X ) [see Greene (1997,Chapter 4)]. This can be shown to be ␴2(X ЈX )Ϫ1,which is exactly the variance-covariance matrix of the OLS estimator. This implies that ␤ˆis the minimum variance unbiased estimator of ␤(conditional on X ):Var(␤˜͉X ) ϪVar(␤ˆ͉X ) is positive semi-definite for any other unbiased estimator ␤˜; we no longer have to restrict our attention to estimators linear in y .It is easy to show that the OLS estimator is in fact the maximum likelihood estima-tor of ␤under Assumption E.5. For each t ,the distribution of y t given X is Normal(x t ␤,␴2). Because the y t are independent conditional on X ,the likelihood func-tion for the sample is obtained from the product of the densities:͟nt ϭ1(2␲␴2)Ϫ1/2exp[Ϫ(y t Ϫx t ␤)2/(2␴2)].Maximizing this function with respect to ␤and ␴2is the same as maximizing its nat-ural logarithm:͚nt ϭ1[Ϫ(1/2)log(2␲␴2) Ϫ(yt Ϫx t ␤)2/(2␴2)].For obtaining ␤ˆ,this is the same as minimizing͚nt ϭ1(y t Ϫx t ␤)2—the division by 2␴2does not affect the optimization—which is just the problem that OLS solves. The esti-mator of ␴2that we have used,SSR/(n Ϫk ),turns out not to be the MLE of ␴2; the MLE is SSR/n ,which is a biased estimator. Because the unbiased estimator of ␴2results in t and F statistics with exact t and F distributions under the null,it is always used instead of the MLE.SUMMARYThis appendix has provided a brief discussion of the linear regression model using matrix notation. This material is included for more advanced classes that use matrix algebra,but it is not needed to read the text. In effect,this appendix proves some of the results that we either stated without proof,proved only in special cases,or proved through a more cumbersome method of proof. Other topics—such as asymptotic prop-erties,instrumental variables estimation,and panel data models—can be given concise treatments using matrices. Advanced texts in econometrics,including Davidson and MacKinnon (1993),Greene (1997),and Wooldridge (1999),can be consulted for details.KEY TERMSAppendix E The Linear Regression Model in Matrix Form 763First Order Condition Matrix Notation Minimum Variance Unbiased Scalar Variance-Covariance MatrixVariance-Covariance Matrix of the OLS EstimatorPROBLEMSE.1Let x t be the 1ϫ k vector of explanatory variables for observation t . Show that the OLS estimator ␤ˆcan be written as␤ˆϭΘ͚n tϭ1xt Јx t ΙϪ1Θ͚nt ϭ1xt Јy t Ι.Dividing each summation by n shows that ␤ˆis a function of sample averages.E.2Let ␤ˆbe the k ϫ 1 vector of OLS estimates.(i)Show that for any k ϫ 1 vector b ,we can write the sum of squaredresiduals asSSR(b ) ϭu ˆЈu ˆϩ(␤ˆϪb )ЈX ЈX (␤ˆϪb ).[Hint :Write (y Ϫ X b )Ј(y ϪX b ) ϭ[u ˆϩX (␤ˆϪb )]Ј[u ˆϩX (␤ˆϪb )]and use the fact that X Јu ˆϭ0.](ii)Explain how the expression for SSR(b ) in part (i) proves that ␤ˆuniquely minimizes SSR(b ) over all possible values of b ,assuming Xhas rank k .E.3Let ␤ˆbe the OLS estimate from the regression of y on X . Let A be a k ϫ k non-singular matrix and define z t ϵx t A ,t ϭ 1,…,n . Therefore,z t is 1ϫ k and is a non-singular linear combination of x t . Let Z be the n ϫ k matrix with rows z t . Let ␤˜denote the OLS estimate from a regression ofy on Z .(i)Show that ␤˜ϭA Ϫ1␤ˆ.(ii)Let y ˆt be the fitted values from the original regression and let y ˜t be thefitted values from regressing y on Z . Show that y ˜t ϭy ˆt ,for all t ϭ1,2,…,n . How do the residuals from the two regressions compare?(iii)Show that the estimated variance matrix for ␤˜is ␴ˆ2A Ϫ1(X ЈX )Ϫ1A Ϫ1؅,where ␴ˆ2is the usual variance estimate from regressing y on X .(iv)Let the ␤ˆj be the OLS estimates from regressing y t on 1,x t 2,…,x tk ,andlet the ␤˜j be the OLS estimates from the regression of yt on 1,a 2x t 2,…,a k x tk ,where a j 0,j ϭ 2,…,k . Use the results from part (i)to find the relationship between the ␤˜j and the ␤ˆj .(v)Assuming the setup of part (iv),use part (iii) to show that se(␤˜j ) ϭse(␤ˆj )/͉a j ͉.(vi)Assuming the setup of part (iv),show that the absolute values of the tstatistics for ␤˜j and ␤ˆj are identical.Appendix E The Linear Regression Model in Matrix Form 764。

随机常微分方程的龙格库塔解法(英文)

随机常微分方程的龙格库塔解法(英文)

随机常微分方程的龙格库塔解法(英文)The Runge-Kutta method, also known as the RK method, is a numerical technique used to solve ordinary differential equations (ODEs). It is a widely used method in the field of computational physics and engineering, as it is relatively simple to implement and can often provide good approximations of the solutions to ODEs.The basic idea behind the Runge-Kutta method is to divide the interval over which the ODE is to be solved into a series of smaller intervals, and to use the known values of the variables at the start of each interval to estimate their values at the end of the interval. This is done using a weighted average of the derivative of the variables at different points within the interval.There are several variations of the Runge-Kutta method, including the popular fourth-order method, which uses four estimates of the derivative to compute the final solution. The accuracy of the method can be improved by using higher-order versions, but at the cost of increased computational complexity.In summary, the Runge-Kutta method is a useful tool for solving ODEs,particularly when an analytical solution is not available. It is relatively easy to implement and can provide good approximations of the solutions to ODEs, making it a popular choice in the field of computational physics and engineering.。

Fumio Hayashi_Econometrics_chapter one

Fumio Hayashi_Econometrics_chapter one

where β ’s are unknown parameters to be estimated, and εi is the unobserved error term with certain properties to be specified below. The part of the right-hand side involving the regressors, β1 xi 1 + β2 xi 2 +· · ·+ β K xi K , is called the regression or the regression function, and the coefficients (β ’s) are called the regression coefficients. They represent the marginal and separate effects of the regressors. For example, β2 represents the change in the dependent variable when the second regressor increases by one unit while other regressors are held constant. In the language of calculus, this can be expressed as ∂ yi /∂ xi 2 = β2 . The linearity implies that the marginal effect does not depend on the level of regressors. The error term represents the part of the dependent variable left unexplained by the regressors. Example 1.1 (consumption function): The simple consumption function familiar from introductory economics is CONi = β1 + β2 YDi + εi , (1.1.2)

matlab中ode45函数编写

matlab中ode45函数编写

funct‎i on varar‎g out = ode45‎(ode,tspan‎,y0,optio‎n s,varar‎g in)%ODE45‎ Solve‎non-stiff‎diffe‎r enti‎a l equat‎i ons, mediu‎m order‎metho‎d.% [TOUT,YOUT] = O DE45‎(ODEFU‎N,TSPAN‎,Y0) with TSPAN‎= [T0 TFINA‎L] integ‎r ates‎% the syste‎m of diffe‎r enti‎a l equat‎i ons y' = f(t,y) from time T0 to TFINA‎L % with initi‎a l condi‎t ions‎Y0. ODEFU‎N is a funct‎i on handl‎e. For a scala‎rT% and a vecto‎r Y, ODEFU‎N(T,Y) must retur‎n a colum‎n vecto‎r corre‎s pond‎i ng % to f(t,y). Each row in the solut‎i on array‎YOUT corre‎s pond‎s to a time % retur‎n ed in the colum‎n vecto‎r TOUT. To obtai‎n solut‎i ons at speci‎f ic % times‎T0,T1,...,TFINA‎L (all incre‎a sing‎or all decre‎a sing‎), use TSPAN‎=% [T0 T1 ... TFINA‎L].%% [TOUT,YOUT] = ODE45‎(ODEFU‎N,TSPAN‎,Y0,OPTIO‎N S) solve‎s as above‎with defau‎l t% integ‎r atio‎n prope‎r ties‎repla‎c ed by value‎s in OPTIO‎N S, an argum‎e nt creat‎e d % with the ODESE‎T funct‎i on. See ODESE‎T for detai‎l s. Commo‎n ly used optio‎n s % are scala‎r relat‎i ve error‎toler‎a nce 'RelTo‎l' (1e-3 by defau‎l t) and vecto‎r % of absol‎u te error‎toler‎a nces‎'AbsTo‎l' (all compo‎n ents‎1e-6 by defau‎l t). % If certa‎i n compo‎n ents‎of the solut‎i on must be non-negat‎i ve, use% ODESE‎T to set the 'NonNe‎g ativ‎e' prope‎r ty to the indic‎e s of these‎% compo‎n ents‎.%% ODE45‎can solve‎probl‎e ms M(t,y)*y' = f(t,y) with mass matri‎x M that is % nonsi‎n gula‎r. Use ODESE‎T to set the 'Mass' prope‎r ty to a funct‎i on handl‎e % MASS if MASS(T,Y) retur‎n s the value‎of the mass matri‎x. If the mass matri‎x % is const‎a nt, the matri‎x can be used as the value‎of the 'Mass' optio‎n. If% the mass matri‎x does not depen‎d on the state‎varia‎b le Y and the funct‎i on % MASS is to be calle‎d with one input‎argum‎e nt T, set 'MStat‎e Depe‎n denc‎e' to% 'none'. ODE15‎S and ODE23‎T can solve‎probl‎e ms with singu‎l ar mass matri‎c es. %% [TOUT,YOUT,TE,YE,IE] = ODE45‎(ODEFU‎N,TSPAN‎,Y0,OPTIO‎N S) with the'Event‎s'% prope‎r ty in OPTIO‎N S set to a funct‎i on handl‎e EVENT‎S, solve‎s as above‎% while‎also findi‎n g where‎funct‎i ons of (T,Y), calle‎d event‎funct‎i ons, % are zero. For each funct‎i on you speci‎f y wheth‎e r the integ‎r atio‎n is% to termi‎n ate at a zero and wheth‎e r the direc‎t ion of the zero cross‎i ng % matte‎r s. These‎are the three‎colum‎n vecto‎r s retur‎n ed by EVENT‎S:% [VALUE‎,ISTER‎M INAL‎,DIREC‎T ION] = EVENT‎S(T,Y). For the I-th event‎funct‎i on: % VALUE‎(I) is the value‎of the funct‎i on, ISTER‎M INAL‎(I)=1 if the integ‎r atio‎n % is to termi‎n ate at a zero of this event‎funct‎i on and 0 other‎w ise.% DIREC‎T ION(I)=0 if all zeros‎are to be compu‎t ed (the defau‎l t), +1 if only % zeros‎where‎the event‎funct‎i on is incre‎a sing‎,and -1 if only zeros‎where‎% the event‎funct‎i on is decre‎a sing‎.Outpu‎t TE is a colum‎n vecto‎r of times‎% at which‎event‎s occur‎. Rows of YE are the corre‎s pond‎i ng solut‎i ons, and % indic‎e s in vecto‎r IE speci‎f y which‎event‎occur‎r ed.%% SOL = ODE45‎(ODEFU‎N,[T0 TFINA‎L],Y0...) retur‎n s a struc‎t ure that can be% used with DEVAL‎to evalu‎a te the solut‎i on or its first‎deriv‎a tive‎at % any point‎betwe‎e n T0 and TFINA‎L. The steps‎chose‎n by ODE45‎are retur‎n ed % in a row vecto‎r SOL.x. For each I, the colum‎n SOL.y(:,I) conta‎i ns‎r % the solut‎i on at SOL.x(I). If event‎s were detec‎t ed, SOL.xe is a row vecto % of point‎s at which‎event‎s occur‎r ed. Colum‎n s of SOL.ye are thecorre‎s pond‎i ng% solut‎i ons, and indic‎e s in vecto‎r SOL.ie speci‎f y which‎event‎occur‎r ed.% Examp‎l e% [t,y]=ode45‎(@vdp1,[0 20],[2 0]);% plot(t,y(:,1));% solve‎s the syste‎m y' = vdp1(t,y), using‎the defau‎l t relat‎i ve error‎% toler‎a nce 1e-3 and the defau‎l t absol‎u te toler‎a nce of 1e-6 for each % compo‎n ent, and plots‎the first‎compo‎n ent of the solut‎i on.%% Class‎suppo‎r t for input‎s TSPAN‎, Y0, and the resul‎t of ODEFU‎N(T,Y):% float‎: doubl‎e, singl‎e%% See also% other‎ODE solve‎r s: ODE23‎,ODE11‎3, ODE15‎S, ODE23‎S, ODE23‎T, ODE23‎T B % impli‎c it ODEs: ODE15‎I% optio‎n s handl‎i ng: ODESE‎T, ODEGE‎T% outpu‎t funct‎i ons: ODEPL‎O T, ODEPH‎A S2, ODEPH‎A S3, ODEPR‎I NT% evalu‎a ting‎solut‎i on: DEVAL‎% ODE examp‎l es: RIGID‎O DE, BALLO‎D E, ORBIT‎O DE% funct‎i on handl‎e s: FUNCT‎I ON_H‎A NDLE‎%% NOTE:% The inter‎p reta‎t ion of the first‎input‎argum‎e nt of the ODE solve‎r s and % some prope‎r ties‎avail‎a ble throu‎g h ODESE‎T have chang‎e d in MATLA‎B6.0. % Altho‎u gh we still‎suppo‎r t the v5 synta‎x, any new funct‎i onal‎i ty is % avail‎a ble only with the new synta‎x. To see the v5 help, type in% the comma‎n d line% more on, type ode45‎, more off% NOTE:% This porti‎o n descr‎i bes the v5 synta‎x of ODE45‎.%% [T,Y] = ODE45‎('F',TSPAN‎,Y0) with TSPAN‎= [T0 TFINA‎L] integ‎r ates‎the% syste‎m of diffe‎r enti‎a l equat‎i ons y' = F(t,y) from time T0 to TFINA‎L with % initi‎a l condi‎t ions‎Y0. 'F' is a strin‎g conta‎i ning‎the name of an ODE % file. Funct‎i on F(T,Y) must retur‎n a colum‎n vecto‎r. Each row in% solut‎i on array‎Y corre‎s pond‎s to a time retur‎n ed in colum‎n vecto‎r T. To % obtai‎n solut‎i ons at speci‎f ic times‎T0, T1, ..., TFINA‎L (all incre‎a sing‎% or all decre‎a sing‎), use TSPAN‎= [T0 T1 ... TFINA‎L].%% [T,Y] = ODE45‎('F',TSPAN‎,Y0,OPTIO‎N S) solve‎s as above‎with defau‎l t% integ‎r atio‎n param‎e ters‎repla‎c ed by value‎s in OPTIO‎N S, an argum‎e nt% creat‎e d with the ODESE‎T funct‎i on. See ODESE‎T for detai‎l s. Commo‎n ly % used optio‎n s are scala‎r relat‎i ve error‎toler‎a nce 'RelTo‎l' (1e-3 by% defau‎l t) and vecto‎r of absol‎u te error‎toler‎a nces‎'AbsTo‎l' (all% compo‎n ents‎1e-6 by defau‎l t).%% [T,Y] = ODE45‎('F',TSPAN‎,Y0,OPTIO‎N S,P1,P2,...) passe‎s the addit‎i onal‎% param‎e ters‎P1,P2,... to the ODE file as F(T,Y,FLAG,P1,P2,...) (see% ODEFI‎L E). Use OPTIO‎N S = [] as a place‎holde‎r if no optio‎n s are set. %% It is possi‎b le to speci‎f y TSPAN‎, Y0 and OPTIO‎N S in the ODE file (see % ODEFI‎L E). If TSPAN‎or Y0 is empty‎, then ODE45‎calls‎the ODE file% [TSPAN‎,Y0,OPTIO‎N S] = F([],[],'init') to obtai‎n any value‎s not suppl‎i ed % in the ODE45‎argum‎e nt list. Empty‎argum‎e nts at the end of the call list % may be omitt‎e d, e.g. ODE45‎('F').%% ODE45‎can solve‎probl‎e ms M(t,y)*y' = F(t,y) with a mass matri‎x M that% nonsi‎n gula‎r. Use ODESE‎T to set Mass to 'M', 'M(t)', or 'M(t,y)' if the % ODE file is coded‎so that F(T,Y,'mass') retur‎n s a const‎a nt,% time-depen‎d ent, or time- and state‎-depen‎d ent mass matri‎x, respe‎c tive‎l y. % The defau‎l t value‎of Mass is 'none'. ODE15‎S and ODE23‎T can solve‎probl‎e ms % with singu‎l ar mass matri‎c es.%% [T,Y,TE,YE,IE] = ODE45‎('F',TSPAN‎,Y0,OPTIO‎N S) with the Event‎s prope‎r ty in% OPTIO‎N S set to 'on', solve‎s as above‎while‎also locat‎i ng zero cross‎i ngs % of an event‎funct‎i on defin‎e d in the ODE file. The ODE file must be% coded‎so that F(T,Y,'event‎s') retur‎n s appro‎p riat‎e infor‎m atio‎n. See% ODEFI‎L E for detai‎l s. Outpu‎t TE is a colum‎n vecto‎r of times‎at which‎% event‎s occur‎, rows of YE are the corre‎s pond‎i ng solut‎i ons, and indic‎e s in% vecto‎r IE speci‎f y which‎event‎occur‎r ed.%% See also ODEFI‎L E% ODE45‎is an imple‎m enta‎t ion of the expli‎c it Runge‎-Kutta‎(4,5) pair of % Dorma‎n d and Princ‎e calle‎d vario‎u sly RK5(4)7FM, DOPRI‎5, DP(4,5) and DP54. % It uses a "free" inter‎p olan‎t of order‎4 commu‎n icat‎e d priva‎t ely by% Dorma‎n d and Princ‎e. Local‎extra‎p olat‎i on is done.% Detai‎l s are to be found‎in The MATLA‎B ODE Suite‎, L. F. Shamp‎i ne and% M. W. Reich‎e lt, SIAM Journ‎a l on Scien‎t ific‎Compu‎t ing, 18-1, 1997.% Mark W. Reich‎e lt and Lawre‎n ce F. Shamp‎i ne, 6-14-94% Copyr‎i ght 1984-2009 The MathW‎o rks, Inc.% $Revis‎i on: 5.74.4.10 $ $Date: 2009/04/21 03:24:15 $solve‎r_nam‎e = 'ode45‎';% Check‎input‎sif nargi‎n < 4optio‎n s = [];if nargi‎n < 3y0 = [];if nargi‎n < 2tspan‎= [];if nargi‎n < 1error‎('MATLA‎B:ode45‎:NotEn‎o ughI‎n puts‎',...'Not enoug‎h input‎argum‎e nts. See ODE45‎.');endendendend% Stats‎nstep‎s = 0;nfail‎e d = 0;nfeva‎l s = 0;% Outpu‎tFcnHa‎n dles‎U sed = isa(ode,'funct‎i on_h‎a ndle‎');outpu‎t_sol‎= (FcnHa‎n dles‎U sed && (nargo‎u t==1)); % sol = odeXX‎(...) outpu‎t_ty = (~outpu‎t_sol‎&& (nargo‎u t > 0)); % [t,y,...] = odeXX‎(...)% There‎might‎be no outpu‎t reque‎s ted...sol = []; f3d = [];if outpu‎t_sol‎sol.solve‎r = solve‎r_nam‎e;sol.extda‎t a.odefu‎n = ode;sol.extda‎t a.optio‎n s = optio‎n s;sol.extda‎t a.varar‎g in = varar‎g in;end% Handl‎e solve‎r argum‎e nts[neq, tspan‎, ntspa‎n, next, t0, tfina‎l, tdir, y0, f0, odeAr‎g s, odeFc‎n, ... optio‎n s, thres‎h old, rtol, normc‎o ntro‎l, normy‎,hmax, htry, htspa‎n, dataT‎y pe] = ...odear‎g umen‎t s(FcnHa‎n dles‎U sed, solve‎r_nam‎e, ode, tspan‎, y0, optio‎n s, varar‎g in);nfeva‎l s = nfeva‎l s + 1;% Handl‎e the outpu‎tif nargo‎u t > 0outpu‎t Fcn = odege‎t(optio‎n s,'Outpu‎t Fcn',[],'fast');elseoutpu‎t Fcn = odege‎t(optio‎n s,'Outpu‎t Fcn',@odepl‎o t,'fast');endoutpu‎t Args‎= {};if isemp‎t y(outpu‎t Fcn)haveO‎u tput‎F cn = false‎;elsehaveO‎u tput‎F cn = true;outpu‎t s = odege‎t(optio‎n s,'Outpu‎t Sel',1:neq,'fast');if isa(outpu‎t Fcn,'funct‎i on_h‎a ndle‎')% With MATLA‎B 6 synta‎x pass addit‎i onal‎input‎argum‎e nts to outpu‎t Fcn. outpu‎t Args‎= varar‎g in;endendrefin‎e = max(1,odege‎t(optio‎n s,'Refin‎e',4,'fast'));if ntspa‎n > 2outpu‎t At = 'Reque‎s tedP‎o ints‎'; % outpu‎t only at tspan‎point‎selsei‎f refin‎e <= 1outpu‎t At = 'Solve‎r Step‎s'; % compu‎t ed point‎s, no refin‎e ment‎elseoutpu‎t At = 'Refin‎e dSte‎p s'; % compu‎t ed point‎s, with refin‎e ment‎ S = (1:refin‎e-1) / refin‎e;endprint‎s tats‎= strcm‎p(odege‎t(optio‎n s,'Stats‎','off','fast'),'on');% Handl‎e the event‎funct‎i on[haveE‎v entF‎c n,event‎F cn,event‎A rgs,valt,teout‎,yeout‎,ieout‎] = ...odeev‎e nts(FcnHa‎n dles‎U sed,odeFc‎n,t0,y0,optio‎n s,varar‎g in);% Handl‎e the mass matri‎x[Mtype‎, M, Mfun] =odema‎s s(FcnHa‎n dles‎U sed,odeFc‎n,t0,y0,optio‎n s,varar‎g in);if Mtype‎> 0 % non-trivi‎a l mass matri‎xMsing‎u lar = odege‎t(optio‎n s,'MassS‎i ngul‎a r','no','fast');if strcm‎p(Msing‎u lar,'maybe‎')warni‎n g('MATLA‎B:ode45‎:MassS‎i ngul‎a rAss‎u medN‎o',['ODE45‎assum‎e s '...'MassS‎i ngul‎a r is ''no''. See ODE15‎S or ODE23‎T.']);elsei‎f strcm‎p(Msing‎u lar,'yes')error‎('MATLA‎B:ode45‎:MassS‎i ngul‎a rYes‎',...['MassS‎i ngul‎a r canno‎t be ''yes'' for this solve‎r. See ODE15‎S'...' or ODE23‎T.']);end% Incor‎p orat‎e the mass matri‎x into odeFc‎n and odeAr‎g s.[odeFc‎n,odeAr‎g s] =odema‎s sexp‎l icit‎(FcnHa‎n dles‎U sed,Mtype‎,odeFc‎n,odeAr‎g s,Mfun,M);f0 = feval‎(odeFc‎n,t0,y0,odeAr‎g s{:});nfeva‎l s = nfeva‎l s + 1;end% Non-negat‎i ve solut‎i on compo‎n ents‎idxNo‎n Nega‎t ive = odege‎t(optio‎n s,'NonNe‎g ativ‎e',[],'fast');nonNe‎g ativ‎e = ~isemp‎t y(idxNo‎n Nega‎t ive);if nonNe‎g ativ‎e% modif‎y the deriv‎a tive‎funct‎i on[odeFc‎n,thres‎h oldN‎o nNeg‎a tive‎] =odeno‎n nega‎t ive(odeFc‎n,y0,thres‎h old,idxNo‎n Nega‎t ive);f0 = feval‎(odeFc‎n,t0,y0,odeAr‎g s{:});nfeva‎l s = nfeva‎l s + 1;endt = t0;y = y0;% Alloc‎a te memor‎y if we're gener‎a ting‎outpu‎t.nout = 0;tout = []; yout = [];if nargo‎u t > 0if outpu‎t_sol‎chunk‎= min(max(100,50*refin‎e), refin‎e+floor‎((2^11)/neq));tout = zeros‎(1,chunk‎,dataT‎y pe);yout = zeros‎(neq,chunk‎,dataT‎y pe);f3d = zeros‎(neq,7,chunk‎,dataT‎y pe);elseif ntspa‎n > 2 % outpu‎t only at tspan‎point‎stout = zeros‎(1,ntspa‎n,dataT‎y pe);yout = zeros‎(neq,ntspa‎n,dataT‎y pe);else% alloc‎in chunk‎schunk‎= min(max(100,50*refin‎e), refin‎e+floor‎((2^13)/neq));tout = zeros‎(1,chunk‎,dataT‎y pe);yout = zeros‎(neq,chunk‎,dataT‎y pe);endendnout = 1;tout(nout) = t;yout(:,nout) = y;end% Initi‎a lize‎metho‎d param‎e ters‎.pow = 1/5;A = [1/5, 3/10, 4/5, 8/9, 1, 1];B = [1/5 3/40 44/45 19372‎/6561 9017/3168 35/3840 9/40 -56/15 -25360‎/2187 -355/33 00 0 32/9 64448‎/6561 46732‎/5247 500/1113 0 0 0 -212/729 49/176 125/1920 0 0 0 -5103/18656‎ -2187/67840 0 0 0 0 11/840 0 0 0 0 0];E = [71/57600‎; 0; -71/16695‎; 71/1920; -17253‎/33920‎0; 22/525; -1/40];f = zeros‎(neq,7,dataT‎y pe);hmin = 16*eps(t);if isemp‎t y(htry)% Compu‎t e an initi‎a l step size h using‎y'(t).absh = min(hmax, htspa‎n);if normc‎o ntro‎lrh = (norm(f0) / max(normy‎,thres‎h old)) / (0.8 * rtol^pow);elserh = norm(f0 ./ max(abs(y),thres‎h old),inf) / (0.8 * rtol^pow);endif absh * rh > 1absh = 1 / rh;endabsh = max(absh, hmin);elseabsh = min(hmax, max(hmin, htry));endf(:,1) = f0;% Initi‎a lize‎the outpu‎t funct‎i on.if haveO‎u tput‎F cnfeval‎(outpu‎t Fcn,[t tfina‎l],y(outpu‎t s),'init',outpu‎t Args‎{:});end% THE MAIN LOOPdone = false‎;while‎~done% By defau‎l t, hmin is a small‎numbe‎r such that t+hmin is only sligh‎t ly % diffe‎r ent than t. It might‎be 0 if t is 0.hmin = 16*eps(t);absh = min(hmax, max(hmin, absh)); % could‎n't limit‎absh until‎new hmin h = tdir * absh;% Stret‎c h the step if withi‎n 10% of tfina‎l-t.if 1.1*absh >= abs(tfina‎l - t)h = tfina‎l - t;absh = abs(h);done = true;end% LOOP FOR ADVAN‎C ING ONE STEP.nofai‎l ed = true; % no faile‎d attem‎p tswhile‎truehA = h * A;hB = h * B;f(:,2) = feval‎(odeFc‎n,t+hA(1),y+f*hB(:,1),odeAr‎g s{:});f(:,3) = feval‎(odeFc‎n,t+hA(2),y+f*hB(:,2),odeAr‎g s{:});f(:,4) = feval‎(odeFc‎n,t+hA(3),y+f*hB(:,3),odeAr‎g s{:});f(:,5) = feval‎(odeFc‎n,t+hA(4),y+f*hB(:,4),odeAr‎g s{:});f(:,6) = feval‎(odeFc‎n,t+hA(5),y+f*hB(:,5),odeAr‎g s{:});tnew = t + hA(6);if donetnew = tfina‎l; % Hit end point‎exact‎l y.endh = tnew - t; % Purif‎y h.ynew = y + f*hB(:,6);f(:,7) = feval‎(odeFc‎n,tnew,ynew,odeAr‎g s{:});nfeva‎l s = nfeva‎l s + 6;% Estim‎a te the error‎.NNrej‎e ctSt‎e p = false‎;if normc‎o ntro‎lnormy‎n ew = norm(ynew);errwt‎= max(max(normy‎,normy‎n ew),thres‎h old);err = absh * (norm(f * E) / errwt‎);if nonNe‎g ativ‎e && (err <= rtol) && any(ynew(idxNo‎n Nega‎t ive)<0)errNN‎= norm( max(0,-ynew(idxNo‎n Nega‎t ive)) ) / errwt‎;if errNN‎> rtolerr = errNN‎;NNrej‎e ctSt‎e p = true;endendelseerr = absh * norm((f * E) ./max(max(abs(y),abs(ynew)),thres‎h old),inf);if nonNe‎g ativ‎e && (err <= rtol) && any(ynew(idxNo‎n Nega‎t ive)<0)errNN‎= norm( max(0,-ynew(idxNo‎n Nega‎t ive)) ./ thres‎h oldN‎o nNeg‎a tive‎, inf);if errNN‎> rtolerr = errNN‎;NNrej‎e ctSt‎e p = true;endendend% Accep‎t the solut‎i on only if the weigh‎t ed error‎is no more than the % toler‎a nce rtol. Estim‎a te an h that will yield‎an error‎of rtol on‎g this step, as the case may be, % the next step or the next try at takin% and use 0.8 of this value‎to avoid‎failu‎r es.if err > rtol % Faile‎d stepnfail‎e d = nfail‎e d + 1;if absh <= hminwarni‎n g('MATLA‎B:ode45‎:Integ‎r atio‎n TolN‎o tMet‎',['Failu‎r e at t=%e. '...'Unabl‎e to meet integ‎r atio‎n toler‎a nces‎witho‎u t reduc‎i ng '...'the step size below‎the small‎e st value‎allow‎e d (%e) '...'at time t.'],t,hmin);solve‎r_out‎p ut = odefi‎n aliz‎e(solve‎r_nam‎e, sol,...outpu‎t Fcn, outpu‎t Args‎,...print‎s tats‎, [nstep‎s, nfail‎e d,nfeva‎l s],...nout, tout, yout,...haveE‎v entF‎c n, teout‎,yeout‎,ieout‎,... {f3d,idxNo‎n Nega‎t ive});if nargo‎u t > 0varar‎g out = solve‎r_out‎p ut;endretur‎n;endif nofai‎l ednofai‎l ed = false‎;if NNrej‎e ctSt‎e pabsh = max(hmin, 0.5*absh);elseabsh = max(hmin, absh * max(0.1, 0.8*(rtol/err)^pow));endelseabsh = max(hmin, 0.5 * absh);endh = tdir * absh;done = false‎;else% Succe‎s sful‎stepNNres‎e t_f7‎= false‎;if nonNe‎g ativ‎e && any(ynew(idxNo‎n Nega‎t ive)<0)ynew(idxNo‎n Nega‎t ive) = max(ynew(idxNo‎n Nega‎t ive),0);if normc‎o ntro‎lnormy‎n ew = norm(ynew);endNNres‎e t_f7‎= true;endbreak‎;endendnstep‎s = nstep‎s + 1;if haveE‎v entF‎c n[te,ye,ie,valt,stop] = ...odeze‎r o(@ntrp4‎5,event‎F cn,event‎A rgs,valt,t,y,tnew,ynew,t0,h,f,idxNo‎n Nega‎tive);if ~isemp‎t y(te)if outpu‎t_sol‎|| (nargo‎u t > 2)teout‎= [teout‎, te];yeout‎= [yeout‎, ye];ieout‎= [ieout‎, ie];endif stop % Stop on a termi‎n al event‎.% Adjus‎t the inter‎p olat‎i on data to [t te(end)].% Updat‎e the deriv‎a tive‎s using‎the inter‎p olat‎i ng polyn‎o mial‎.taux = t + (te(end) - t)*A;[~,f(:,2:7)] = ntrp4‎5(taux,t,y,[],[],h,f,idxNo‎n Nega‎t ive);tnew = te(end);ynew = ye(:,end);h = tnew - t;done = true;endendendif outpu‎t_sol‎nout = nout + 1;if nout > lengt‎h(tout)tout = [tout, zeros‎(1,chunk‎,dataT‎y pe)]; % requi‎r es chunk‎>= refin‎e yout = [yout, zeros‎(neq,chunk‎,dataT‎y pe)];f3d = cat(3,f3d,zeros‎(neq,7,chunk‎,dataT‎y pe));endtout(nout) = tnew;yout(:,nout) = ynew;f3d(:,:,nout) = f;endif outpu‎t_ty || haveO‎u tput‎F cnswitc‎h outpu‎t Atcase'Solve‎r Step‎s'% compu‎t ed point‎s, no refin‎e ment‎nout_‎n ew = 1;tout_‎n ew = tnew;yout_‎n ew = ynew;case'Refin‎e dSte‎p s'% compu‎t ed point‎s, with refin‎e ment‎tref = t + (tnew-t)*S;nout_‎n ew = refin‎e;tout_‎n ew = [tref, tnew];yout_‎n ew = [ntrp4‎5(tref,t,y,[],[],h,f,idxNo‎n Nega‎t ive), ynew];case'Reque‎s tedP‎o ints‎'% outpu‎t only at tspan‎point‎snout_‎n ew = 0;tout_‎n ew = [];yout_‎n ew = [];while‎next <= ntspa‎nif tdir * (tnew - tspan‎(next)) < 0if haveE‎v entF‎c n && stop % outpu‎t tstop‎,ystop‎nout_‎n ew = nout_‎n ew + 1;tout_‎n ew = [tout_‎n ew, tnew];yout_‎n ew = [yout_‎n ew, ynew];endbreak‎;endnout_‎n ew = nout_‎n ew + 1;tout_‎n ew = [tout_‎n ew, tspan‎(next)];if tspan‎(next) == tnewyout_‎n ew = [yout_‎n ew, ynew];elseyout_‎n ew = [yout_‎n ew,ntrp4‎5(tspan‎(next),t,y,[],[],h,f,idxNo‎n Nega‎t ive)];endnext = next + 1;endendif nout_‎n ew > 0if outpu‎t_tyoldno‎u t = nout;nout = nout + nout_‎n ew;if nout > lengt‎h(tout)tout = [tout, zeros‎(1,chunk‎,dataT‎y pe)]; % requi‎r es chunk‎>= refin‎eyout = [yout, zeros‎(neq,chunk‎,dataT‎y pe)];endidx = oldno‎u t+1:nout;tout(idx) = tout_‎n ew;yout(:,idx) = yout_‎n ew;endif haveO‎u tput‎F cnstop =feval‎(outpu‎t Fcn,tout_‎n ew,yout_‎n ew(outpu‎t s,:),'',outpu‎t Args‎{:});if stopdone = true;endendendendif donebreak‎end% If there‎were no failu‎r es compu‎t e a new h.if nofai‎l ed% Note that absh may shrin‎k by 0.8, and that err may be 0.temp = 1.25*(err/rtol)^pow;if temp > 0.2absh = absh / temp;elseabsh = 5.0*absh;endend% Advan‎c e the integ‎r atio‎n one step.t = tnew;y = ynew;if normc‎o ntro‎lnormy‎= normy‎n ew;endif NNres‎e t_f7‎% Used f7 for unper‎t urbe‎d solut‎i on to inter‎p olat‎e.% Now reset‎f7 to move along‎const‎r aint‎.f(:,7) = feval‎(odeFc‎n,tnew,ynew,odeAr‎g s{:});nfeva‎l s = nfeva‎l s + 1;endf(:,1) = f(:,7); % Alrea‎d y have f(tnew,ynew)endsolve‎r_out‎p ut = odefi‎n aliz‎e(solve‎r_nam‎e, sol,...outpu‎t Fcn, outpu‎t Args‎,...print‎s tats‎, [nstep‎s, nfail‎e d, nfeva‎l s],...nout, tout, yout,...haveE‎v entF‎c n, teout‎, yeout‎, ieout‎,...{f3d,idxNo‎n Nega‎t ive});if nargo‎u t > 0varar‎g out = solve‎r_out‎p ut;end。

NONTRIVIAL SOLUTIONS TO SINGULAR BOUNDARY VALUE PROBLEMS FOR FOURTH-ORDER DIFFERENTIAL EQUATIONS

NONTRIVIAL SOLUTIONS TO SINGULAR BOUNDARY VALUE PROBLEMS FOR FOURTH-ORDER DIFFERENTIAL EQUATIONS

A bs tra ct
T he sin gular b ou ndary value pro blem s fo r fo urth-o rder differential equa t io ns a re co nsidered un der so m e co ndit ions co ncerning the first eigenvalues of the releva nt linea r o perat ors. Suffi cie nt co nditio ns which g uara nt ee the existen ce o f nont rivia l so lution s a re o bt ained. We use the to po lo gica l de gree t o prove o ur ma in results. Key wor ds sing ula r; no ntrivial so lut io ns; b ou ndary value pro blem s; t o po lo gy deg re e 20 00 M athem atic s Sub ject C lassific ation 3 4 B1 5; 3 4B 25
Ann . o f Diff . Eqs. 24 :3(2008) , 326-335
NONTRIVIAL SOLUTIONS TO SINGULAR BOUNDARY VALUE PROBLEMS FOR FOURTH-ORDER DIFFERENTIAL EQUATIONS
Wang Fe ng 1 , Cui Yujun 2, Zhang Fang 1
1
Introduction
It is well known that the b en ding of e lastic b e am can b e de scrib ed by some fourth -orde r b oun dary valu e prob le ms. The re has b e en e xten sive stu dy on fourth -orde r b ou nd ary value prob le ms w ith d ive rse b ou nd ary c ond ition s. For details, see [1-5] an d refere nc es th ere in . [1- 5] stud ied the e xiste nc e of p ositive solutions by meth od of u pp e r an d lower solu tion s, Sch aud er’s fi xe d poin t the orem or the fi xe d point in d ex. In th is pap e r, we con sid er the followin g b oun dary valu e p roble m ( x (4) ( t) − h ( t )f ( x ( t)) = 0, 0 < t < 1 , (1 . 1) x (0) = x (1) = x � � (0) = x� � (1) = 0, whe re h (t ) is allowed to b e singu lar at b oth t = 0 and t = 1, and f is n ot n ec essary to b e non ne gative . T he m ain pu rp ose of th is p ap er is to estab lish su ffic ient con ditions en surin g the existen ce of n ontriv ial solu tion s to the sin gu lar b ou nd ary value prob le m (1 . 1) by m ean s of the top ologic al de gree the ory. Th e eigen valu e c rite ria of th is kind of n online ar two-p oint b oun dary valu e p roble ms was e stab lish ed in [6]. For th e con cep ts an d p rop erties ab ou t the con e th eory and th e top ologic al de gree we re fer to [7-8]. Ou r pap e r is organ ized as follows. S ome pre limin arie s are given in S ec tion 2. In S ection 3, we give the e xiste nc e the ore ms of n ontrivial solutions to th e su p erline ar singu lar b oun dary valu e p roblem s. In S ec tion 4, we give the ex iste nc e th eorem s of n on triv ial solution s to the

Improving Lattice Quark Actions

Improving Lattice Quark Actions

a rXiv:h e p-la t/961110v211Apr1997November 1996FSU-SCRI-96-134IASSNS-HEP 96/115Improving Lattice Quark Actions M.Alford School of Natural Sciences Institute for Advanced Study Princeton,NJ 08540T.R.Klassen SCRI Florida State University Tallahassee,FL 32306-4052G.P.Lepage Newman Laboratory of Nuclear Studies Cornell University Ithaca,NY 14853Abstract We explore the first stage of the Symanzik improvement program for lattice Dirac fermions,namely the construction of doubler-free,highly improved classical actions on isotropic as well as anisotropic lattices (where thetemporal lattice spacing,a t ,is smaller than the spatial one).Using field transformations to eliminate doublers,we derive the previously presented isotropic D234action with O (a 3)errors,as well as anisotropic D234actions with O (a 4)or O (a 3t ,a 4)errors.Besides allowing the simulation of heavy quarks within a relativistic framework,anisotropic lattices alleviate potential problems due to unphysical branches of the quark dispersion relation (which are generic to improved actions),facilitate studies of lattice thermodynamics,and allow accurate mass determinations for particles with bad signal/noise properties,like glueballs and P-state mesons.We also show how field transformations can be used to completely eliminate unphysical branches of the dispersion relation.Finally,we briefly discuss future steps in the improvement program.1IntroductionLattice calculations suffer from scaling errors,or lattice artifacts,that typically decrease like some power,a n,of the lattice spacing(ignoring logarithmic corrections).Continuum results are obtained as a→0,but the cost of a realistic simulation of QCD,for example, grows like like some large power,a−ω,of the inverse lattice spacing(ωis at least6, but could even be10or more[1]).It is therefore extremely important tofind highly improved actions;they will give accurate results on much coarser lattices.Classicalfield theory estimates suggest that eliminating errors through order a2and maybe a3allows one to model the properties of a smooth bump with errors of a few percent to a fraction of a percent by using a lattice with3–6grid points per diameter of the object in each direction.For hadrons this means that spatial lattices of spacing a=0.2−0.4fm might suffice for improved actions(whereas a=0.05−0.1fm are typically used for unimproved actions).Even considering the computational overhead due to the more complicated form of improved actions,it is clear that being able to work on coarse lattices would save many orders of magnitude in CPU time.For pure glue it has already been demonstrated[2]that this is possible.In this paper we describe some of the steps that are necessary to extend these savings to the more difficult problem of lattice quark actions.Our considerations are mainly classical,but we will outline where quantum effects seem to play a role and how to take them into account.The approach we would like to follow,pioneered by Symanzik[3,4,5,6,7],is to try to improve lattice actions andfields to somefinite order in a,like a2or a4.For asymptotically free theories,such as QCD,the terms in the action can be organized by their UV dimensions.Symanzik improvement then consists of adding higher dimension improvement terms to the action,mimicking the effects of the UV modes left out on the lattice.Tofix the coefficients of these terms,one then proceeds as follows.Write down all terms with the appropriate symmetries up to the desired order,with arbitrary coefficients.Tune the coefficients by matching to a sufficiently large set of observables,calculated either in perturbation theory or non-perturbatively in a Monte Carlo simulation.Once the tuning is completed,the coefficients in the action will be functions of the physical couplings and a set of redundant couplings(see below). Improving(composite)field operators involves a similar process,which must be repeated for each independentfield.The above program is quite difficult to carry through in practice,not only non-perturbatively,but even in perturbation theory.In the past,standard lattice perturbation theory suffered from the rather debilitating problem that it did not seem to work very well,at least compared to continuum perturbation theory.This has now largely been understood[8]as being due to large renormalizations from tadpole diagrams,which occur in(naive)lattice but not continuum perturbation ing a simple mean-field type method,known as tadpole improvement,one can design more continuum-like operators in which the tadpole contribution is greatly reduced.Tadpole improvement has been shown to work well for a variety of actions on surprisingly coarse lattices[2,9,10,11,12,13,14,15].1We emphasize that tree-level tadpole improvement should be thought of as afirst step in a systematic procedure of improving lattice actions.The next step can be further perturbative improvement,or,if there are reasons to believe that this is not sufficient, non-perturbative improvement.It turns out to be substantially harder to improve lattice fermions than gluons,even on the classical level.The reason,ultimately,is thefirst-order nature of the fermionfield equations,which leads to the well-known doubler problem,which we will discuss later. For Dirac fermions(quarks),Wilson[16]solved this problem by adding a second-order derivative term to the action.This term breaks chiral symmetry at O(a).Such errors —which are much larger than the O(a2)errors of“naive lattice fermions”—are too large for this action to be useful in coarse lattice simulations.The point of this work is to present doubler-free quark actions,for light and heavy quarks,that are classically improved to high order.The general tool to construct such actions will befield redefinitions;they allow one to introduce second-order derivative terms without destroying improvement.To allow the simulation of heavy quarks—and also to avoid potential problems due to unphysical branches of the quark dispersion relation,which are generic to improved actions—we can use anisotropic lattices[17,18]. Let us discuss these ideas in turn.Field redefinitions are just changes of variable in the path integral,so they do not affect spectral quantities(at least if one takes into account the Jacobian).Off-shell quantities of course do change.Sincefield redefinitions involve one or more free parameters,they lead to so-called redundant couplings,whose values can be adjusted at will.This freedom can be used to solve the doubler problem,for example.In other situations,in particular on the quantum level,it is very convenient to simplify an improved action by setting certain couplings to zero.This leads to the concept of on-shell improvement,where only spectral quantities can be obtained directly from the action(by improving composite operators one can,however,also obtain their matrix elements between physical states).The“canonical”procedure for obtaining a doubler-free quark action correct up to, say,O(a n)classical errors involves the following three steps:11.Start with the continuum Dirac action and apply afield redefinition introducingeven-order derivative terms into the action.2.Expand the continuum operators in the transformed action in terms of latticeoperators up to O(a n)errors;this step will be referred to as the truncation.The even-order lattice derivative terms will eliminate the doublers that would be present without thefield redefinition.One can stop here if one is only interested in spectral quantities;they will be classically correct up to O(a n)errors.3.To classically also improve off-shell quantities,undo thefield transformation(nowon the level of the lattice action).The resulting action andfields differ only atO(a n)form their continuum counterparts,and,in contrast to a naive discretization, have no doublers.We emphasize that the improved actions so constructed are(classically)improved in every respect;the improvement of interactions does not have to be checked separately. When applied to lowest order(n=2)the above procedure gives the Sheikholeslami-Wohlert action,originally suggested[6]as an improvement of the Wilson action.The next order(n=4)yields the class of“D234”actions(in addition to the second order derivative Wilson term,they also contain third and fourth order derivative terms).As alluded to earlier,a problem generic to actions improved beyond O(a)is the existence of unphysical branches of the free dispersion relation,simply due to higher order time derivatives in the action.We will refer to these extra branches as lattice ghosts.Their energies are at the scale of the(temporal)cutoff,so they will eventually decouple as the lattice spacing is decreased.For the lattice spacings used in practice their effect on,say,the hadron spectrum has not been thoroughly studied,but they certainly affect the renormalization of the improvement terms in the action.In addition,they can complicate numerical simulations by introducing oscillations in correlation functions at small times.If either of these issues turns out to be a problem,one can deal with the ghosts in one of two ways.Firstly,one can usefield transformations to replace the temporal with spatial derivatives.This produces somewhat more complicated actions,as we will see.Alternatively and secondly,one therefore might want to use anisotropic lattices with smaller temporal than spatial lattice spacing,a t<a s,to push up the energy of the ghosts and decouple them.Besides effectively solving the potential problem of ghost branches,the use of anisotropic lattices has other advantages:•By choosing a t sufficiently small,one can simulate heavy quarks within a relativistic framework[11]without the prohibitive cost of afine spatial lattice.This providesa simple alternative to the NRQCD[20]and Fermilab[21]formalisms.•The signal to noise ratio of a correlation function calculated in a Monte Carlo simulation decays,generically,exponentially in time.Choosing a smaller a t gives more time slices with an accurate signal,allowing for more precise and confident mass determinations.This is important for particles with bad signal/noise properties,like P-state mesons[22]and glueballs[23].•It facilitates thermodynamic studies—one of the reasons being simply that it is easier to take independent derivatives with respect to volume and temperature if one can vary a t independent of a s—especially at high temperatures.•It allows for significant simplifications in the design of improved actions.This will be relevant for our D234actions.3All these advantages come at a price.Because they have lost part of their axis-permutation symmetry,anisotropic actions have more independent coefficients.This is not a problem at the classical level,but at the quantum level some of these coefficients will have to be tuned to restore space-time exchange rge renormalizations violating space-time exchange symmetry were in fact seen infirst attempts of using anisotropic lattices,see[17]and references therein.Wefind that with an improved gluon action and a tadpole improvement prescription appropriate to anisotropic lattices, such effects are relatively small,at the level of several percent on coarse lattices[18].So far we have concentrated on classical Symanzik improvement;however,the improvement of fermion actions is also more difficult on the quantum level.For pure glue, the largest error at order a2is the violation of rotational invariance,which can be tuned to zero non-perturbatively,by demanding rotational invariance of the static potential at physical distances.2Actually,it seems that most of these errors are removed by tadpole improvement[2,18].Wilson-type quarks,on the other hand,have O(a)errors on the quantum level,and to eliminate them one has to tune a term that violates chiral but not rotational symmetry. The leading a2errors behave in the opposite way;they violate rotational symmetry but not chiral symmetry(so they are similar to the errors of gluons).The O(a)and (leading)a2errors of Wilson-type quarks therefore have very distinct effects on spectral quantities,and can be tuned iteratively,even on a non-perturbative level,by demanding chiral symmetry for the former,and rotational symmetry for the latter.As for glue it seems that tadpole improvement does quite a good job in estimating the coefficient of the O(a2)terms that lead to a restoration of rotational symmetry. Concerning the restoration of chiral symmetry to eliminate O(a)quantum errors,L¨u scher et al have recently shown in some beautiful work[7]how to implement this in practice for the case of SW quarks on Wilson glue.The outline of the remainder of this paper is as follows.In sect.2we discuss naive lattice fermions,doublers and ghosts.We proceed in sect.3to describe in more detail the three-step procedure to eliminate doublers,which we then apply to derive the Sheikholeslami-Wohlert and D234actions on a general anisotropic lattice.Several special cases and variations are also discussed,including a completely ghost-free D234-like action.In sect.4we investigate the large mass behavior of the D234actions.We conclude in sect.5with a brief summary and sketch of future steps in the improvement program.Appendices A and B summarize our notation for euclidean continuum and lattice QCD,respectively.The reader might want to skim these appendices before starting with the main text,and later refer back to them as necessary.Appendix C discusses the dispersion relation of the D234actions.Finally,in appendix D we give some formulasuseful in the tadpole improvement of the D234actions.Brief accounts of various parts of this work have appeared earlier in[10,11,24,25]. 2Naive Lattice Fermions,Doublers,and GhostsDiscussions of Dirac fermions on the lattice3usually start with the so-called naive lattice fermions,specified by the fermion operator∇/+m.Here∇µis the usualfirst order,anti-hermitean,covariant lattice derivative,1∇µψ(x)≡a2µ∆µ =Dµ+O(a4µ),(2.2)6where∆µis the standard second order lattice derivative of appendix B,and the subscript “c”stands for“continuum-like”.The fermion operator∇/c+m defines what we will refer to as naive improved lattice fermions.They would provide a lattice action with only order a4errors—again,if we could ignore the doublers.The simplest way of discussing the doubler problem for a generic lattice action is in momentum space.Let us consider the dispersion relation E=E(p),obtained from the poles of the free euclidean propagator,p0=p0(p),via E=±ip0.The two signs correspond to particle and anti-particle.For simplicity we will factor out the sign and consider only solutions where the(real part of the)energy is positive.The quantitative details of the dispersion relations of the actions considered in this paper are discussed in appendix C.Infigure1we show the massless dispersion relations of naive and naive improved fermions on an isotropic lattice.There are several noteworthy features.•For naive fermions the one branch of the dispersion relation presented infigure1 is purely real.Since we can only exhibit a cross section of the energy surface,one sees only one of the spatial doublers,which account for half of the doublers.The term“spatial doubler”refers to the fact that for each possible energy E there are generically eight momenta p(with all components positive)such that E=E(p).123401234Figure 1:(Real part of the)massless dispersion relation aE =aE (p )as a function of a |p |,with p ∝(1,1,0),for naive fermions (dashed)and naive improved fermions (solid)on an isotropic lattice.For comparison we also show the dispersion relation of continuum fermions (thin solid).•We also can not show that for each possible E =E (p )of naive fermions there is another pole of the propagator at E +iπ/a 0.This (as well as the existence of the spatial doublers)follows from the fact that in momentum space the action of naive fermions only depends on a µ¯p µ≡sin(a µp µ),which is invariant under a µp µ→π−a µp µ.These complex poles constitute the temporal doublers.•For naive improved fermions the picture is more complex.There are now four branches.The lowest branch is somewhat pathological in that its imaginary part is π/a for all momenta and in that its real part is lower than that of the physical branch.It is easy to see that this branch is related to the temporal doubler of the naive fermion action.Clearly,neither of these two actions corresponds to what one might expect a lattice Dirac fermion to look like.Due to the doublers,the naive fermion action actually describes 16Dirac fermion species in the continuum limit [28].In addition to spatial doublers,naive improved fermions have ghosts (or lattice ghosts ,if confusion could arise),as extra branches of the dispersion relation will be called from now on.4As mentionedin the introduction,if the ghosts should turn out to be a problem,there are always ways of eliminating them,to be discussed in the next section.A solution to the doubler problem was proposed by Wilson[16],who suggested to add a second-order derivative term(now known as the Wilson term)to give the fermion operatorM W=m0+ µ γµ∇µ−1dispersion relation.What justifies naming them ghosts is that they usually(but not always)give negative contributions to the spectral representation of correlation functions.In practice this leads to a characteristic“dip”in effective mass plots.7only subsequently discretize the action.Starting with the continuum action¯ψc M cψc≡ d4x¯ψc(x)(D/+m c)ψc(x),(3.2) we perform afield redefinitionψc=Ωcψ¯ψc=¯ψ¯Ωc¯ψc M cψc=¯ψMΩψ,MΩ≡¯Ωc M cΩc.(3.3)Note that afield transformation does not affect spectral quantities,at least if we take into account the Jacobian of the transformation.Classically the Jacobian does not matter. On the quantum level its leading effect is to renormalize the gauge coupling.Our canonical choice offield redefinition is(with¯Ωc acting to the right)¯Ωc=Ωc,¯ΩcΩc=1−ra0 2ra0(D/2−m2c)=m c(1+12ra0 µD2µ+1123401234123401234Figure 2:The energy a s E (p )of free SW/Wilson fermions with r =1as a function of a s |p |with p ∝(1,1,0).On the left we show the massless case on 1:1(solid),2:1(dashed),and 5:1(dot-dashed)lattices,as well as continuum fermions (thin solid).On the right we show the same for mass a s m c =1.3.2The Sheikholeslami-Wohlert Action and O (a )TermsUsing the leading discretization of the derivatives in (3.5)givesM SW =m c (1+12ra 0µ∆µ−1at the canonical value r=1,for example.To eliminate quantum O(a)errors one thenhas to tune the coefficient of the clover term.On an anisotropic lattice the situation is slightly more complicated.The allowedoperators at O(a)consist of the spatial and temporal parts of the Wilson andclover terms,and the additional operator[γ0D0, iγi D i].The most generalfield transformationsΩc and¯Ωc allowed in this situation lead to three redundant operators,so that one has to tune two coefficients at O(a).These can be choosen to be the spatial and temporal parts of the clover term.Note that on an anisotropic lattice one must also allow a relative coefficient between the temporal and spatial kinetic terms at O(a0), which can be tuned non-perturbatively by demanding a relativistic dispersion relation for the pion,say,at small masses and momenta.3.3The D234ActionsGoing to the next order in the expansion of the continuum derivatives in(3.5)gives the class of D234actionsM D234=m c(1+12ra0 µ∆µ+16,cµ=ra0123401234Figure 3:As in figure 2,for the massless D234c(1)action on 1:1(solid)and 2:1(dashed)lattices.We only show the real part of the energy,relevant for the top branch of each anisotropy,which has imaginary part π/a 0,and to the right of the branch point on the 1:1lattice.relation is a quartic equation for sinh(a 0E/2)2,E =E (p ),so there will be three ghost branches.5Since the coefficients of the quartic are real,the energies will be real,come in complex conjugate pairs,or have imaginary part π/a 0.Note that the qualitative branch structure (e.g.the number of branches)depends only on the temporal coefficients r,b 0and c 0.For m c =0and p =0the only way a lattice spacing enters the dispersion relation is via a 0E .This implies that for small momenta and masses the height of the ghosts is inversely proportional to the temporal lattice spacing.The most basic question we can ask about the ghosts,is how many ghost branches we can completely eliminate by a suitable choice of the free parameters.We summarize the conclusions of appendix C concerning this question as follows:•If we choose b 0=2c 0there will be at most two ghosts.•If we further choose r =1−2b 0or b 0=0there is (at most)one ghost.•The only way to eliminate all ghosts is to choose r =1,b 0=c 0=0,which is of course the standard SW/Wilson case (if r =1the SW/Wilson action will have one ghost).If we want to go beyond the SW action we will therefore have at least one ghost branch.Let us now discuss our“favorite”D234actions on isotropic and anisotropic lattices in turn.3.4.1Isotropic D234ActionOn an isotropic lattice one will presumably prefer an isotropic action with manifest space-time exchange symmetry,so that one does not have to restore this symmetry by tuning on the quantum level.With bµ=1and cµ=13)action to be c0=13action by the name D234i(23)on a2:1(solid)and SW/Wilson fermions on a1:1(dotted)lattice.The real part of E(p)is shown to the right of the D234i(23)action to an isotropic latticedoes not give the isotropic D234action.Because the spatial c i of the former were chosen to not introduce a3i errors,this action has anisotropic coefficients even on an isotropic lattice;it was designed for use on anisotropic lattices.3.4.3VariationsBy relaxing the requirement of just one ghost one can construct actions that might be interesting for sufficiently anisotropic lattices.We will not discuss these here,but just make the general remark that for larger anisotropies a s/a t it is advantageous to choose larger values of r.Otherwise one will recover spatial doublers,as is obvious from the fact that our canonicalfield transformation(3.4)Ωc→1as a0→0forfixed r.7 We should briefly discuss one modification of the D234i(26The“i”stands for mass-“independent”,since the coefficients in this action enjoy this property.In the next subsection we will describe a closely related D234action with mass-dependent coefficients,to which we have previously[11]given the name D234(2This action is obtained by a somewhat more complicated change of variable from the continuum Dirac action,¯Ωc=Ωc,¯ΩcΩc=1−1614a0m cb0=14a0m c12a0m cc0=131+31+76and c i=ra0/24a i.We will refer to this action as D234(23)only for very large masses;for m c=0they are identical.Finally,we remark that it is easy to improve the dispersion relation of D234-like actions at large momenta still further by introducing suitablefifth and sixth order derivative terms.This can be done by afield transformation and/or by simply adding such terms to the action.However,in the relevant momentum regime the hadron dispersion relations measured in simulations of D234actions are already so good,even on coarse lattices[10,11],that the additional cost and complication from the higher derivative terms seems unjustified.3.5Other ActionsWe conclude this section by briefly discussing several other classes of actions(or other ways of writing actions)that are of interest for various conceptual and practical reasons.3.5.1Ghost-free D234-like ActionsWe will now demonstrate that it is straightforward to write down a highly improved action,at tree level,that has no ghosts whatsoever.This comes at a price,of course. Such an action is more complicated and therefore more costly to simulate.The idea is to usefield transformations to eliminate the cubic temporal termsγ0∇0∆0 in the naive improved fermion action in favor of spatial terms.Starting with the continuum action M c=m c+D/,we perform afield transformationψc=Ωc1ψ,¯ψc=¯ψ¯Ωc114with 8Ωc 1=1+a 2012 D 20−(D /+m c )(D /−m c ) ,(3.12)where the purely spatial derivative D /=i γi D i .This gives ¯Ωc 1M c Ωc 1=m c +D /+112{m 2c − i D 2i −16a 20γ0D 30will not contain any lattice timederivative above the first,and there is no other temporal derivative in the action.We can now proceed with a second change of variable to introduce even derivatives,defined by ¯Ωc 2=Ωc 2and ¯Ωc 2Ωc 2=1+16a 20γ0D 30−m c −δK c .(3.14)This implies¯Ωc 2¯Ωc 1M c Ωc 1Ωc 2=m c (1+16a 20γ0D 30+(1+ra 0m c )δK c −16a 20γ0D 30)2+O (a 4).(3.15)Finally,we discretize this ing(D /+112 i a 2i ∆2i +12ra 0m c )+∇/0+∇/c +(1+ra 0m c )δK −12σ·F +ra 012{m 2c − i ∆i −18This field transformation is similar to ones used in [21].15123401234123401234Figure 6:As in figure 2,for the ghost-free D234-like action on 1:1(solid),2:1(dashed)and 3:1(dot-dashed)lattices.undoing the above field transformations one can achieve the same errors for off-shell quantities.Obviously the above action is the analog of the D234actions of the previous sections,with δK appearing in place of cubic and quartic temporal derivative terms.Now,however,we have just one branch if we set r =1,as for the Wilson and SW actions.This is illustrated in figure 6.For the a 30errors to be negligible compared to the a 4ones,we can again use anisotropiclattices.In that case the ghost branches of the D234actions of the previous section are presumably harmless,and it seems doubtful that having no ghosts outweighs the disadvantage of having to include the costly anti-commutator term δK .Comparisons to simulations with this action should,however,allow one to discern whether the ghost branches have any effect besides that on correlation functions at small times.Another,less ambitious ghost-free action can easily be constructed if one is willing totolerate a 20in addition to a 30and a 4errors.Such an action can be obtained,for example,by simply neglecting the temporal third and fourth order terms in the D234c(1)action.3.5.2D34ActionRecently a tadpole-improved version of an improved action discussed in [29]was used in a Monte Carlo simulation of the hadron spectrum [30].This action has third and fourth order derivative terms,but no second order Wilson term.We will therefore refer to it as the D34action.Generalized to an anisotropic lattice it reads in our notationM D34=m c +∇/c + µc µa 3µ∆2µ.(3.19)16123401234123401234Figure 7:As in figure 5,for D34fermions with c µ=16was used.The D34action is obtained fromthe naive improved fermion action not by a change of variable,but simply by adding the ∆2term,which leads to an a 3error (and means that the fields are already improved up to a 3errors;no change of variable has to be undone).This action is of course a special case of the general class of D234actions,with r =0and b µ=112,when there are two.There is no obvious canonical choice for the c µ;for all values of c µthe ghost branches seem to lie rather low.In figure 7we show various dispersion relations for the c µ=12γµ∆µ(3.20)can be expressed in terms of (spinor-)projection operators.Most conveniently this is expressed as γµW µ=−∇+µP −µ+∇−µP +µ,(3.21)where P ±µ≡1a µ U ±µ(x )ψ(x ±µ)−ψ(x )(3.22)17。

CFL条件

CFL条件

1 什么叫CFL数?CFL数是收敛条件,具体是差分方程的依赖域必须包含相应微分方程的依赖域,最简单可以理解为时间推进求解的速度必须大于物理扰动传播的速度,只有这样才能将物理上所有的扰动俘获到。

Time stepping technique是指时间推进技术,一般有统一时间步长和当地时间步长,而选择当地时间步长也就是当地CFL条件允许的最大时间步长,采用这种方法能够加速收敛,节省计算时间。

RCFL条件的来历在有限差分和有限体积方法中的稳定性和收敛性分析中有一个很重要的概念------CFL条件。

CFL条件是以Courant,Friedrichs,Lewy三个人的名字命名的,他们最早在1928年一篇关于偏微分方程的有限差分方法的文章中首次踢出这个概念的时候,并不是用来分析差分格式的稳定性,而是仅仅以有限差分方法作为分析工具来证明某些偏微分方程的解的存在性的。

其基本思想是先构造PDE的差分方程得到一个逼近解的序列,只要知道在给定的网格系统下这个逼近序列收敛,那么久很容易证明这个收敛解就是愿微分方程的解。

Courant,Friedrichs,Lewy发现,要使这个逼近序列收敛,必须满足一个条件,那就是著名的CFL条件,记述如下:CFL condition:An numerical method can be convergent only if its numericaldomain of dependence contains the true domain of dependence of the PDE,at least in the limit as dt and dx go to zero.随着计算机的迅猛发展,有限差分方法和有限体积方法越来越多的应用于流体力学的数值模拟中,CFL条件作为一个格式稳定性和收敛性的判据,也随之显得非常重要了。

但值得注意的是,CFL条件仅仅是稳定性(收敛性)的必要条件,而不是充分条件,举例来说,数值流通量构造方法中的算术平均构造,它在dt足够小的情况下是可以满足CFL条件,但对于双曲问题而言这种构造方法是不稳定,不可用的。

Nonlinear dynamics in one dimension On a criterion for coarsening and its temporal law

Nonlinear dynamics in one dimension On a criterion for coarsening and its temporal law

a r X i v :c o nd -m a t /0512055v 2 [c o n d -m a t .s t a t -me c h ] 22 F e b 2006Nonlinear dynamics in one dimension:On a criterion for coarsening and its temporal lawPaolo Politi 1,∗and Chaouqi Misbah 2,†1Istituto dei Sistemi Complessi,Consiglio Nazionale delle Ricerche,Via Madonna del Piano 10,50019Sesto Fiorentino,Italy 2Laboratoire de Spectrom´e trie Physique,CNRS,Univ.J.Fourier,Grenoble 1,BP87,F-38402Saint Martin d’H`e res,France(Dated:February 2,2008)We develop a general criterion about coarsening for a class of nonlinear evolution equations de-scribing one dimensional pattern-forming systems.This criterion allows one to discriminate between the situation where a coarsening process takes place and the one where the wavelength is fixed in the course of time.An intermediate scenario may occur,namely ‘interrupted coarsening’.The power of the criterion on which a brief account has been given [P.Politi and C.Misbah,Phys.Rev.Lett.92,090601(2004)],and which we extend here to more general equations,lies in the fact that the statement about the occurrence of coarsening,or selection of a length scale,can be made by only inspecting the behavior of the branch of steady state periodic solutions.The criterion states that coarsening occurs if λ′(A )>0while a length scale selection prevails if λ′(A )<0,where λis the wavelength of the pattern and A is the amplitude of the profile (prime refers to differentiation).This criterion is established thanks to the analysis of the phase diffusion equation of the pattern.We connect the phase diffusion coefficient D (λ)(which carries a kinetic information)to λ′(A ),which refers to a pure steady state property.The relationship between kinetics and the behavior of the branch of steady state solutions is established fully analytically for several classes of equations.An-other important and new result which emerges here is that the exploitation of the phase diffusion coefficient enables us to determine in a rather straightforward manner the dynamical coarsening exponent.Our calculation,based on the idea that |D (λ)|∼λ2/t ,is exemplified on several nonlinear equations,showing that the exact exponent is captured.We are not aware of another method that so systematically provides the coarsening exponent.Contrary to many situations where the one dimensional character has proven essential for the derivation of the coarsening exponent,this idea can be used,in principle,at any dimension.Some speculations about the extension of the present results are outlined.PACS numbers:05.70.Ln,05.45.-a,82.40.Ck,02.30.JrI.INTRODUCTIONPattern formation is ubiquitous in nature,and espe-cially for systems which are brought away from equi-librium.Examples are encountered in hydrodynam-ics,reaction-diffusion systems,interfacial problems,and so on.There is now an abundant literature on this topic [1,2].Generically,the first stage of pattern for-mation is the loss of stability of the homogeneous solu-tion against a spatially periodic modulation.This gen-erally occurs at a critical value of a control parameter,µ=µc (where µstands for the control parameter)and at a critical wavenumber q =q c .The dispersion rela-tion about the homogeneous solution (where perturba-tions are sought as e iqx +ωt ),in the vicinity of the critical point assumes,in most of pattern-forming systems,the following parabolic form (Fig.1,inset)ω=δ−(q −q c )2(1)δcorresponding to unstable modes (Fig.1),so that infinitesimal perturbations grow exponentially with time until nonlinear effects can no longer be ignored.In the vicinity of the bifurcation point (δ=0)only the princi-pal harmonic with q =q c is unstable,while all other har-monics are stable.For example,Rayleigh-B´e nard convec-tion,Turing systems,and so on,fall within this category,and their nonlinear evolution equation is universal in the vicinity of the bifurcation point.If the field of interest (say a chemical concentration)is written as A (x,t )e iq c x ,where A is a complex slowly varying amplitude,then A obeys the canonical equation∂t A =A +∂xx A −|A |2A(2)where it is supposed that the coefficient of the cubic term is negative to ensure a nonlinear saturation.Because the band of active modes is narrow and centered around the principal harmonic,no coarsening can occur,and the pat-tern will select a given length,which is often close to that of the linearly fastest growing mode.However,the ampli-tude equation above exhibits a phase instability,known under the Eckhaus instability [1],stating that among theband ofallowed states,|∆q|=√δ/3are stable withrespect to a wavelength modulation.There are many other situations where the bifurca-tion wavenumber q c→0and therefore a separation ofa slow amplitude and a fast oscillation is illegitimate.Contray to the case(1),where thefield can be writtenas A(x,t)e iq c x with A being supposed to vary slowly inspace and time,if q c→0the supposed fast oscillation,e iq c x,becomes slow as well and a separation of A doesnot make a sense anymore.In this case,a generic formof the dispersion relation is(Fig.2,main)ω=δq2−q4.(3)A third situation is the one where the dispersion relationtakes the form(Fig.2,inset)ω=δ−q2.(4)In both cases,Eqs.(3,4),the instability occurs forδ>0,and the band of unstable modes extends from q=0toq=√1In case(4)an equation similar to(2)may arise,but it describesthe fullfield and not just the envelope.is c(dotted line).Forδ>0,the unstable band extends fromq=q1to q=q2(full line).With increasingδthe unstableregion widens(dashed line).The parabolic shape ofω(q)isan approximation,valid close to its maximum.This applies,e.g.,to the dispersion curve(38)of the Swift-Hohenberg eq.(see the mainfigure):ω=δ−(1−q2)2[q c=1].Whenδ=1(dashed line)the unstable band extends down to q=0andω(q)resembles the dispersion curve of the Cahn-Hilliard eq.(see(3)and Fig.2).(δ<0).Full line:just above threshold.Dashed line:wellabove threshold.The vanishing ofω(0)for anyδis a con-sequence of the traslational invariance of the CH eq.in the‘growth’direction.Inset:The Ginzburg-Landau eq.is onecase where such invariance is absent and the dispersion curvehas the form(4):ω=δ−q2.which leads to spatio-themporal chaos.Note that by set-ting u=∂x h we obtain an equivalent form of this equa-tion,namely∂t h=−∂xx h−∂xxxx h+(∂x h)2/2.Thisequation arises in several contexts:liquidfilmsflowingdown an inclined plane[5],flame fronts[7],stepflowgrowth of a crystal surface[3].Complex dynamics such as chaos,coarsening,etc...,are naturally expected if modes of arbitrarily large wave-length are unstable.However,these dynamics may occurfor systems characterized by the dispersion relation(1)3as well,if the system is further driven away from the critical point(i.e.,if q2≫q1,see Fig.1)because higher and higher harmonics become active.We may expect, for example,coarsening to become possible up to a total wavelength of the order of2π/q1.For systems which are at global equilibrium the nonlin-earity u∂x u is not allowed,and a prototypical equation having the dispersion relation(3)is the Cahn-Hilliard equation∂t u=−∂xx[u+∂xx u−u3].(6) The linear terms are identical to the KS one,and the dif-ference arises from the nonlinear term.Note that if dy-namics is not subject to a conservation constraint,(−∂xx) on the right hand side is absent,and the dispersion rela-tion is given by Eq.(4).The resulting equation is given by(2)for a real A and it is called real Ginzburg-Landau (GL)equation or Allen-Cahn equation.The KS equation,or its conserved form(obtained by applying∂xx on the right hand side),was suspected for a long time to arise as the generic nonlinear evolution equation for nonequilibrium systems(the quadratic term is non variational in that it can not be written as a func-tional derivative)whenever a dispersion relation is of type (3).Several recent studies,especially in Molecular Beam Epitaxy(MBE),have revealed an increasing evidence for the occurrence of completely new types of equations,with a variety of dynamics:besides chaos,there are ordered multisoliton[8,9]solutions,coarsening[10],freezing of the wavelength accompanied by a perpetual increase of the amplitude[11].Moreover,equations bearing strong resemblance with each other[12]exhibit a completely different dynamics.Thus it is highly desirable to extract some general criteria that allow one to discriminate be-tween various dynamics.A central question that has remained open so far, and which has been the subject of a recent brief expo-sition[13],was the understanding of the general condi-tions under which dynamics should lead to coarsening, or rather to a selection of a length scale.In this paper we shall generalize our proof presented in[13]to a larger number of classes of nonlinear equations,for which the same general criterion applies:the sign of the phase dif-fusion coefficient D is linked to a property of the steady state branch.More precisely,the sign of D is shown to be the opposite of the sign ofλ′(A),the derivative of the wavelengthλof the steady state with respect its ampli-tude A.Therefore,coarsening occurs if(and only if)the wavelength increases with the amplitude.Another important new feature that constitutes a sub-ject of this paper,is the fact that the exploitation of the phase diffusion coefficient D(λ)will allow us to derive an-alytically the coarsening exponent,i.e.the law according to which the wavelength of the pattern increases in time. For all known nonlinear equations whose dispersion rela-tion has the form(3)or(4)and display coarsening,we have obtained the exact value of the coarsening expo-nent,and we predict exponents for other non exploited yet equations.An important point is that this is expectedto work at any dimension.Indeed,the derivation of the phase equation can be done in higher dimension as well.If our criterion,based on the idea that|D(λ)|∼λ2/t, remains valid at higher dimensions,it should become aprecious tool for a straightforward derivation of the coars-ening exponent at any dimension.II.THE PHASE EQUATION METHODA.GeneralityCoarsening of an ordered pattern occurs if steady state periodic solutions are unstable with respect to wave-lengthfluctuations.The phase equation method[14]al-lows to study in a perturbative way the modulations ofthe phaseφof the pattern.For a periodic structure of periodλ,φ=qx,where q=2π/λis a constant.If weperturb this structure,q acquires a space and time de-pendence and the phaseφis seen to satisfy a diffusion equation,∂tφ=D∂xxφ.The quantity D,called phasediffusion coefficient,is a function of the steady state so-lutions and its sign determines the stable(D>0)orunstable(D<0)character of a wavelength perturba-tion.A negative value of D induces a coarsening process,2whose typical time and length scales are related by |D(λ)|∼λ2/t,as simply derived from the solution of the phase diffusion equation:this relation allows tofindthe coarsening lawλ(t).Therefore,the phase equation method not only allows to determine if certain classes of partial differential equations(PDE)display coarsen-ing or not;it also allows tofind the coarsening laws, when D<0.In the rest of this section,we are going to offer a short exposition of the phase equation method without referring to any specific PDE.Explicit evolution equations will be treated in the next sections,with some calculations relegated to the appendix.Let us consider a general PDE of the form3∂t u(x,t)=˜N[u](7)where˜N is an unspecified nonlinear operator,which is assumed not to depend explicitly on space and time. u0(x)is a periodic steady state solution:˜N[u0]=0and u0(x+λ)=u0(x).When studying the perturbation of a steady state,it is useful to separate a fast spatial variable from slow time and space dependencies.The stationary solution u0does4 not depend on time and it has a fast spatial dependence,which is conveniently expressed through the phaseφ=qx.Once we perturb the stationary solution,u=u0+ǫu1+...,(8)the wavevector q=∂xφgets a slow space and time de-pendence:q=q(X,T),where X=ǫx and T=ǫαt.Because of the diffusive character of the phase variable,the exponentαis equal to two.Space and time deriva-tives now read∂x=q∂φ+ǫ∂X(9a)∂t=ǫ(∂Tψ)∂φ(9b)where the second order term in the latter equation(ǫ2∂T)has been neglected.Finally,along with the phaseφit isuseful to introduce the slow phaseψ(X,T)=ǫφ(x,t),sothat q=∂Xψ.Replacing the u−expansion(8)and the derivates(9)with respect to the new variables in Eq.(7),wefind anǫ−expansion which must be vanished term by term.Thezero order equation is trivial,˜N0[u0]=0:this equation isjust the rephrasing of the time-independent equation interms of the phase variableφ(the subscript in˜N0meansthat Eqs.(9)have been applied at zero order inǫ,i.e.∂x=q∂φ).Thefirst order equation is more complicated,becauseboth the operator˜N and the solution u areǫ−expanded.On very general grounds,we can rewrite∂t u(x,t)=˜N[u]asǫ(∂Tψ)∂φu0=(˜N0+ǫ˜N1)[u0+ǫu1](10)where˜N1comes fromfirst order contributions to thederivatives(9).If we use the Fr´e chet derivative[15],˜L0,defined through the relation˜N0[u0+ǫu1]=˜N0[u0]+ǫ˜L0[u1]+O(ǫ2)(11)we get˜L0[u1]=(∂Tψ)∂φu0−˜N1[u0]≡g(u0,q,ψ).(12)Atfirst order,therefore,we get an heterogeneous linearequation(the Fr´e chet derivative of a nonlinear operatoris linear).The translational invariance of the operator˜N guarantees that∂φu0is solution of the homogeneousequation:according to the Fredholm alternative theo-rem[16],a solution for the heterogeneous equation mayexist only if g is orthogonal to the null space of the ad-joint operator˜L†.In simple words,if˜L†[v]=0,v and gmust be orthogonal.This condition,see Eq.(12),readsv,∂φu0 ∂Tψ= v,˜N1[u0] ,(13)where4 f,g =(2π)−1 2π0dφf∗g.5 If we define w=vG(u0),the equation˜L†0[v]=0is iden-tical to˜L0[w]=0,so that we can choose w=∂φu0andv=∂φu0/G(u0).The orthogonality condition between v and g reads(∂Tψ) v,∂φu0 −(∂X Xψ) v,G(u0)(2q∂q+1)∂φu0 =0(22)and replacing the explicit expression for v,we get thephase diffusion equation∂Tψ=D∂X Xψ(23)withD=∂q q(∂φu0)2G(u0)≡D12π λ0dx(u′0)2=J2π∂J4π2 ∂λ4π2B(A)∂A−1(26)where A is the amplitude of the oscillation,i.e.the(pos-itive)maximal value for u0(x).If G(u)≡1,a compact formula for D isD=−λ2B(A)2,called the most unstable wavevector.The linear regime corresponds to an exponential unsta-ble growth of such mode,with a rateω(q u),followed by a logarithmic coarsening.5The above equation can be made of wider application by considering the following generalized Cahn-Hilliard (gCH)equation∂t u=−C(u)∂xx[B(u)+G(u)u xx].(29)In Sec.III D we will discuss thoroughly the coarsening of this class of models,because of its relevance for the crystal growth of vicinal surfaces.6In that case,the local height z(x,t)of the steps satisfies the equation∂t z=−∂x{B(m)+G(m)∂x[C(m)∂x m]}(30) where m=∂x z.If we pass to the new variable u(m)= m0dsC(s)and take the spatial derivative of the above equation,we get the gCH equation(29).It is worthnoting that steady states are given by the equa-tion B(u0)+G(u0)u′′0=j0,where j0is a constant de-termined by the condition u0 =m0that imposes the (conserved)average value of the order parameter.If steps are oriented along a high-symmetry orientation, m0=0=j0.In the following we are considering this case only,so the equation determining steady states, B(u0)+G(u0)u′′0=0,is the same as for the gGL equa-tion.If we proceed along the lines explained in Sec.II A and keep in mind notations used in Sec.II B1,thefirst order equation in the small parameterǫreads−q2∂φφ˜L0[u1]=(∂Tψ)∂φu0C(u0) (∂Tψ)(33) +q2 v,∂φφ[G(u0)(2q∂q+1)∂φu0] (∂X Xψ)=0.6The quantity multiplying(∂X Xψ)can be rewritten as v,∂φφ[G(u0)(2q∂q+1)∂φu0 =∂φu0v,∂φu0˜D2.(35) In App.B we prove that the denominator˜D2is always positive.If C and G are(positive)constants the proof isstraightforward,because− v∂φu0 = (∂φv)u0 = u20 . The diffusion coefficient(35)for the gCH equation istherefore similar to the diffusion coefficient(24)for the nonconserved gGL equation:their sign is determined by the increasing or decreasing character ofλ(A),the wave-length of the steady state,with respect to its amplitude. The q2term in the numerator of(35)is evidence of the conservation law,i.e.,of the second derivative∂xx in Eq.(29).The denominators D2and˜D2differ:this is irrelevant for the sign of D,but it is relevant for the coarsening law.If C(u)≡G(u)≡1,formulas simplify:D1=−λ3B(A)/4π2(∂Aλ)and˜D2= u20 =I/λ,where I= u20(x)has the same role as J= (∂x u0)2in the non-conserved model.Putting everything together we obtain D=−λ2B(A)1−√1+√2).The most unstable wavevector is q u=1for anyδ.For smallδthe unstable band is narrow;in fact,forδ<0.36,q1>q2/2and period doubling is not allowed.In other words study-ing coarsening for the Swift-Hohenberg equation close to the thresholdδ=0is not very interesting:nonetheless we will write the phase diffusion equation for anyδand for a generalized form of the Swift-Hohenberg equation as well.The zero order equation is easy to write˜N0[u0]≡−q4∂4φu0−2q2∂2φu0−(1−δ)u0−u30=0(39) and thefirst order equation has the expected form ˜L0[u1]=g,where˜L0≡−q4∂4φ−2q2∂2φ−(1−δ)−3u20(40) is the Fr´e chet derivative of˜N0andg≡(∂Tψ)∂φu0(41)+2(∂X Xψ)[(2q3∂q+3q2)∂3φu0+(2q∂q+1)∂φu o]. The operator˜L0is self-adjoint,so the solution of the homogeneous equation˜L†0[v]=0is immediately found, because of the translational invariance of˜N0along x: v=∂φu0.We therefore have(∂Tψ) (∂φu0)2 =(42)−(∂X Xψ)[ ∂φu0(4q3∂q+6q2)∂3φu0+2 ∂φu0(2q∂q+1)∂φu0 ].It is easy to check that both terms appearing in square brackets on the right hand side can be written as∂q(...):∂φu0(4q3∂q+6q2)∂3φu0 =−∂q 2q3(∂2φu0)2 (43a)∂φu0(2q∂q+1)∂φu0 ]=∂q q(∂φu0)2 (43b) so that the phase diffusion coefficients readsD=∂q[2q3 (∂2φu0)2 −2q (∂φu0)2 ]2 (∂φu0)2n(−1)k+1nc n∂q q n−1(∂n/2φu0)2 (46)The standard Swift-Hohenberg equation corresponds to c2=−2and c4=1.The quantity(−1)k+1nc n q n−1/2 therefore gives2q3for n=4ans−2q for n=2,as shown by Eq.(44).7 III.THE COARSENING EXPONENTWe now want to use the results obtained in the previ-ous section for the phase diffusion coefficient D in orderto get the coarsening lawλ(t).In one dimensional sys-tems,noise may be relevant and change the coarseninglaw.In the following we will restrict our analysis to thedeterministic equations.A negative D implies an unstable behavior of the phasediffusion equation,∂tψ=−|D|∂xxψ,which displays anexponential growth(we have reversed to the old coordi-nates for the sake of clarity):ψ=exp(t/τ)exp(2πix/λ),with(2π)2|D|=λ2/τ(in the following the time scaleτwill just be written as t).The relation|D(λ)|≈λ2/t willtherefore be used to obtain the coarsening lawλ(t):itwill be done for several models displaying the scenario ofperpetual coarsening(i.e.,λ′(A)>0for divergingλ).A.The standard Ginzburg-Landau andCahn-Hilliard modelsIt is well known[17]that in the absence of noise,boththe nonconserved GL equation(15)and the conservedCH equation(28)display logarithmic coarsening,λ(t)≈ln t.Let us remind that steady states correspond to thetrajectories of a classical particle moving in the potentialV(u)=u2/2−u4/4.The wavelength of the steady state,i.e.the oscillation period,diverges as the amplitude Agoes to one.This limit corresponds to the‘late stage’regime in the dynamical problem,and the profile of theorder parameter is a sequence of kinks and antikinks.Thekink(antikink)is the stationary solution u+(x)(u−(x))which connects u=−1(u=1)at x=−∞to u=1(u=−1)at x=∞,u±(x)=±tanh(x/√√2)solution,7Q(x)≃Q0exp(7This may also be directly seen by expanding the differential equa-tion∂xx u+u−u3=0about u=1.Expansion to leading orderin Q=1−u yields∂xx Q−2Q=0,from which the solution√ QβQ=Q0e81.The nonconserved caseThe relationλ2J (∂A λ)(50)givest ∼Q −β/2β−2(51)so that λ(t )∼t n with n =(β−2)/(3β−2).2.The conserved caseIf the order parameter is conserved,wesimplyneed to replace J ∼1with I ∼λin Eq.(50),so as to obtaint ∼λλ3β−2β−2.(52)The coarsening exponent is therefore equal to n =(β−2)/(4β−4).We observe that in the limit β→2we recover logarithmic coarsening (n =0)both in the non-conserved and conserved case,as it should be.We also remark that in the opposite limit β→∞we get n =1/3in the nonconserved case and n =1/4in the conserved case,which make a bridge towards the models discussed in the next section.C.Models without uniform stable solutionsThe models considered in the previous subsection have uniform stable solutions,u =±1:the linear instabil-ity of the trivial solution u =0leads to the formation of domains where the order parameter is alternatively equal to ±1,separated by domain walls,called kinks and antikinks.This property is related to the fact that B (u )=u −u 3vanishes for finite u (up to a sign,B (u )is the force in the mechanical analogy for the steady states).In the following we are considering a modified class of models,where B (u )vanishes in the limit u →∞only,so that the potential V (u )= duB (u )does not have maxima at finite u .Therefore,it is not possible to define ‘domains’wherein the order parameter takes a constant value.These models [18],which may be relevant for the epitaxial growth of a high-symmetry crystal surface [10],are defined as follows (α>1):∂t u =B (u )+u xx(53)∂t u =−∂xx [B (u )+u xx ](54)B (u )=u2(α−1)1λ2∼1α−1,which is slighty more complicated,be-cause the asymptotic contribution vanishes for α>2:in this case the finite,constant contribution coming from the motion within the ‘close region’dominates.There-fore,J ∼λ2α+1.Finally,B (A )∼λ1α−2α−1λ1−1α−2α∼λ22.For αlarger than two,λ23α−2.We can sum upour results,λ(t )∼t n ,withn =13α−2α>2(59b)The coarsening exponent varies with continuity from n =1/2for α<2to n =1/3for α→∞.These results confirm what had already been found by one of us with a different approach [18].2.The conserved caseFrom Eq.(36)we haveD ∼λ2λ1λ2α∼14.(61)The constant coarsening exponent n=1/4clashes with numerical results found in Ref.[18],n=1/4for α<2and n=α/(5α−2)forα>2.The opinion of the authors of Ref.[18]is that forα>2a crossover should exist from n=α/(5α−2)to n=1/4,the correct asymptotic exponent.Details and supporting arguments will be given elsewhere[19].D.Conserved models for crystal growthIt is interesting to consider a model of physical interest which belongs to the class of the full generalized Cahn-Hilliard equations,meaning that all the functions B(u), C(u)and G(u)appearing in(29)are not trivial.The starting point is Eq.(30),∂t z=−∂x{B(m)+G(m)∂x[C(m)∂x m]}which describes the meandering of a step,or—more generally—the meandering of a train of steps moving in phase.z is the local displacement of the step with re-spect to its straight position and m=∂x z is the local slope of the step.We do not give details here about the origin of the previous equation,which is presented in[12],but just write the explicit form of the functions B,G and C: B(m)=m1+m2(1+c)(1+m2)3/2(62b)and define the meaning of the two adimensional,positive parameters appearing there:βis the relative strength between the two relaxing mechanisms,line diffusion and terrace diffusion;c is a measure of the elastic coupling between steps.If we pass to the new variable u= m0ds C(s),we get Eq.(29),∂t u=−C(u)∂xx[B(u)+G(u)u xx](29) whose steady states,for high-symmetry steps,are given by the equation u xx=−B(u)/G(u).In App.C we study the potential V(u)= du[B(u)/G(u)]and the dynami-cal scenarios emerging from∂Aλ.We give here the results only.If c=0(see Fig.3),∂Aλ<0,while there is asymptotic coarsening if c>0(see Figs.4,5).Asymptotic coarsening means that∂Aλ>0for large enough A:according to the values of c andβ,λ(A)may be always increasing or it may have a minimum followed by∂Aλ>0:the distinction between the two cases is not relevant for the dynamics and it will not be further considered.Let us now determine the asymptotic behavior of all the relevant quantities,when c>0.In the limit of large m,we have C(m)∼m and B(m)∼1/m.As for G,G(m)∼1/m2and G(m)∼1/m,for V(u)=−√u so that C(u)∼√u and G(u)∼1/u(β=0)or G(u)∼1/√A forβ=0 (Fig.5).Similar and straightforward relations can be determined and the following general expression for the phase diffusion coefficient is established,D∼√λ2∼λ26β=0(64a)λ(t)∼t1B(A)(65a)∂t u=−∂xx[B(u)+u xx]⇒t∼I(∂Aλ)10√|u |3/2for large u and λ′(A )>0(main,full circles).For large amplitude,λ≈A 1/4(main,full line).The dashed line in the inset is the harmonic potential,u 2/2.If c >0there is m 2A (main,full line).The dashed line in theinset is the harmonic potential,u 2/2.For β>0,λ(t )≈t 1/4.Passing from the standard GL/CH models (Sec.III A),to models where V (u )have (non quadratic)maxima at finite u (Sec.III B)and to models where V (u )has no maxima at all at finite u (Sec.III C),the coarsening ex-ponents change with continuity from n =0(logarithmic coarsening)to n =1/2for the nonconserved models and from n =0to n =1/4for the conserved models.The conservation law,as expected,always slows down the coarsening process.Formally,this corresponds to re-place the action J with the quantity I in the denominator of D .In most cases,J is a constant while I increases as λκ,with κ≥1:a smaller D implies a lower coarsening.We remark that only in a very special case (models with-out uniform stable solutions and α<2),I/J ∼λ2:when this happens,the double derivative ∂xx —which charac-terizes the conserved models—is equivalent (as for the coarsening law)to the factor 1/λ2.We stress again that this is an exception,it is not the rule.III D has been devoted to a class of conserved mod-are relevant for the physical problem of a grow-In that case the full expression (35)for D be considered (the result is reported in Eqs.(64a-It is remarkable that for all the models we have we found n ≤1/4and n ≤1/2for conserved models,respectively.It would be inter-to understand how general these inequalities are.9SWIFT-HOHENBERG EQUATION ANDCOARSENINGus start from the standard Swift-Hohenberg equa-tion (37),∂t u =−∂4x u −2∂2x u −(1−δ)u −u 3(66)linear dispersion curve is ω(q )=δ−(q 2−1)2.Thediffusion coefficient (see Eq.(44))isD =2q∂q ( u 2xx − u 2x )2ω′′+(ω′)22ωdqωd ωd 9The condition n ≤1/2for the nonconserved models is equivalent to say that |D (λ)|does not diverge with increasing λ,which seems to be a fairly reasonable condition.11The amplitude A is defined as A=[ dx u2(x)/λ]1/2. vanishes at q=q2and at q=q1,asωdoes,so that A un-dergoes a fold singularity at the center of the band.This is imposed by symmetry,since in the vicinity of threshold the band of active modes is symmetric.In this case we are in the situation with the dispersion relation(1).The phase diffusion coefficient must also be symmetric with respect to the center,and therefore it can change sign at the fold,due to this symmetry.Thus D does not have the sign of A′in this case.Nonetheless,in the vicinity of q2the sign of D is still given by A′,as shown here below. Our speculation is that the existence of a fold is likely to destroy the simple link between D and A′.A meaningful expression for D can be found also for finiteδ,close to q2= δ(let us remind that ω(q1,2)=0and q2>q1).In this limit we getω′(q)≃ω′(q2)=4q2−4q32andD=2(q32−q2)1dq=D E(72)so that D is equal to a positive quantity times dω/dq. Sinceω(q)=A2(q)/2,the sign of D is equal to the sign of dA/dq.This result follows from a perturbative scheme where use has been made of the fact that u∼cos(qx). This is legitimate as long as one considers small devia-tions from the threshold.Ifδis not small,or ifδ=1we fall in the dispersion relation(3).As one deviates from q2towards the center of the band,higher and higher har-monics become active,and one should in generalfind nu-merically the steady state solutions in order to ascertain whether D is positive or negative.In the general case, we have not been able to establish a link between D and the slope of the steady state branch as done in the previ-ous sections.Our belief,on which some evidences will be reported on in the future,is that depending on the class of equations,it is not always the slope of the steady state solution that provides direct information on the nonlinear dynamics,but somewhat a bit more abstract quantities, as we have found,for example,by investigating the KS equation,another question on which we hope to report in the near future[20].Numerical solutions of the SH equation in the limitδ=1reveal a fold singularity inbranchλ(A),as shown in Fig.6.V.EQUATIONS WITH A POTENTIAL Some of the equations discussed in Sec.II B are deriv-from a potential:it is therefore possible to define function F which is minimized by the dynamics.This always the case for the generalized Ginzburg-Landau(16),which can be written as∂t u=B(u)+G(u)u xx=−G(u)δF2(u x)2−V(u) (74)where V(u)is the potential entering in the study of the stationary solutions,i.e.V′(u)=B(u)/G(u).If we eval-uate the time derivative of F wefindd Fδuu t=− dxG(u) δFδu].(76) If C(u)=G(u),wefindd Fδu2≤0.(77)We now want to evaluate F for the steady states.The pseudo free-energy F is nothing but the integral of the Lagrangian function L for the mechanical analogy defin-ing the stationary solutions.If E=(u x)2/2+V(u)is the ‘energy’in the mechanical analogy and J is the action,F[uλ(x)]=ℓJdλ=ℓdλ−E=−ℓJ。

matlab偏微分方程组求解

matlab偏微分方程组求解

MATLAB学习(序列1)偏微分方程组的求解ode23 解非刚性微分方程,低精度,使用Runge-Kutta法的二三阶算法。

ode45 解非刚性微分方程,中等精度,使用Runge-Kutta法的四五阶算法。

ode113 解非刚性微分方程,变精度变阶次Adams-Bashforth-Moulton PECE算法。

ode23t 解中等刚性微分方程,使用自由内插法的梯形法则。

ode15s 解刚性微分方程,使用可变阶次的数值微分(NDFs)算法。

ode23s 解刚性微分方程,低阶方法,使用修正的Rosenbrock公式。

ode23tb 解刚性微分方程,低阶方法,使用TR-BDF2方法,即Runger-Kutta公式的第一级采用梯形法则,第二级采用Gear法。

[t,YY]=solver('F',tspan,Yo解算ODE初值问题的最简调用格式。

solver指上面的指令。

tspan=[0,30]; %时域t的范围y0=[1;0]; %y(1)y(2的初始值[tt,yy]=ode45(@DyDt,tspan,y0;plot(tt,yy(:,1,title('x(t'function ydot=DyDt(t,yydot=[y(2; 2*(1-y(1^2*y(2-y(1]刚性方程:刚性是指其Jacobian矩阵的特征值相差十分悬殊。

在解的性态上表现为,其中一些解变化缓慢,另一些变化快,且相差较悬殊,这类方程常常称为刚性方程,又称为Stiff方程。

刚性方程和非刚性方程对解法中步长选择的要求不同。

刚性方程一般不适合由ode45这类函数求解,而应该采用ode15s等。

如果不能分辨是否是刚性方程,先试用ode45,再用ode15s。

[t,YY,Te,Ye,Ie] = solver('F',tspan,Yo,options,p1,p2,…解算ODE初值问题的最完整调用格式。

为了能够解出方程,要用指令odeset确定求解的条件和要求。

Second-order water wave diffraction by an array of vertical cylinders

Second-order water wave diffraction by an array of vertical cylinders
J. Fluic 1999 Cambridge University Press
Printed in the United Kingdom
349
Second-order water wave diffraction by an array of vertical cylinders
1. Introduction Even under the simplifying assumptions of potential flow, the nonlinear interaction of water waves with floating bodies is too difficult a problem to be treated directly. Only a few studies intended to solve the complete three-dimensional problem in the time domain are known (e.g. Romate 1989; Ferrant 1996; Xue & Yue 1995). Some encouraging results for simple configurations have been obtained, though the computational times for these kinds of calculations are still prohibitive in a design context. There is still a need for simple approaches which capture the essential features of the hydrodynamics. Linearization is the usual way to treat the wave–body interaction. This leads to a relatively much simpler problem and one can reasonably state that the analysis of linearized water wave diffraction–radiation by arbitrary floating bodies (not having forward speed) is now completely mastered. The linear solution however has several limitations. Perhaps the most important is its inability to predict the loads at frequencies different from those contained in the incident wave spectrum. It is known from physical experiments that responses of a floating body can occur at its natural frequencies, at which however the incident wave spectrum may have negligible energy. The observations indicate that the responses at these frequencies can be very significant. The excitation at these frequencies, however, can be explained only by introducing nonlinearities into the model. This is why ‘second-order hydrodynamics’ has received much attention in the recent past. It is now generally accepted that

Aly Kha.FOURTH-ORDER TIME STEPPING FOR STIFF PDES

Aly Kha.FOURTH-ORDER TIME STEPPING FOR STIFF PDES

FOURTH-ORDER TIME STEPPING FOR STIFF PDES∗ALY-KHAN KASSAM†AND LLOYD N.TREFETHEN‡Abstract.A modification of the ETDRK4(Exponential Time Differencing fourth-order Runge-Kutta)method for solving stiffnonlinear PDEs is presented that solves the problem of numerical instability in the scheme as proposed by Cox and Matthews and generalizes the method to non-diagonal operators.A comparison is made of the performance of this modified ETD scheme against the competing methods of implicit–explicit differencing,integrating factors,time-splitting,and Forn-berg and Driscoll’s“sliders”for the KdV,Kuramoto-Sivashinsky,Burgers,and Allen-Cahn equations in one space dimension.Implementation of the method is illustrated by short Matlab programs for two of the equations.It is found that for these applications withfixed time steps,the modified ETD scheme is the best.Key words.ETD,exponential time-differencing,KdV,Kuramoto-Sivashinsky,Burgers,Allen-Cahn,implicit–explicit,split step,integrating factorAMS subject classifications.1.Introduction.Many time-dependent partial differential equations(PDEs) combine low-order nonlinear terms with higher-order linear terms.Examples include the Allen-Cahn,Burgers,Cahn-Hilliard,Fisher-KPP,Fitzhugh-Naguno,Gray-Scott, Hodgkin-Huxley,Kuramoto-Sivashinsky,Navier-Stokes,nonlinear Schr¨o dinger,and Swift-Hohenberg equations.To obtain accurate numerical solutions of such prob-lems,it is desirable to use high-order approximations in space and time.Yet because of the difficulties introduced by the combination of nonlinearity and stiffness,most computations heretofore have been limited to second order in time.Our subject in this paper is fourth order time-differencing.We shall write the PDE in the formu t=L u+N(u,t),(1.1)where L and N are linear and nonlinear operators,respectively.Once we discretise the spatial part of the PDE we get a system of ODEs,(1.2)u t=L u+N(u,t).There seem to befive principal competing methods for solving problems of this kind, which we will abbreviate by IMEX,SS,IF,SL,and ETD.Of course these are not the only schemes that are being used.Noteworthy schemes that we ignore are the exponential Runge–Kutta schemes[26]and deferred correction[37]or semi–implicit deferred correction[6,45].IMEX=Implicit–explicit.These are a well studied family of schemes that have an established history in the solution of stiffPDE.Early work looking at some stability issues dates to the beginning of the1980’s[61].Schemes have been proposed for specific examples,e.g.the KdV equation[13]and the Navier-Stokes equations [11,32,34],as well as certain classes of problems,for example reaction-diffusion2 A.-K.KASSAM AND L.N.TREFETHENproblems[51]and atmospheric modelling problems[62].An overview of the stability properties and derivations of implicit–explicit schemes can be found in[2].Implicit–explicit schemes consist of using an explicit multi-step formula,for ex-ample the second order Adams–Bashforth formula,to advance the nonlinear part of the problem and an implicit scheme,for example the second order Adams–Moulton formula,to advance the linear part.Other kinds of formulations also exist;for de-velopments based around Runge-Kutta rather than Adams-Bashforth formulae,for example,see again work by Ascher et al.[3]as well as very recent work by Calvo et al.[10]and Kennedy and Carpenter[33].In this report,we use a scheme known either as AB4BD4(in[14])or SBDF4(in[2]),which consists of combining a fourth order Adams–Bashforth and a fourth order backward differentiation scheme.The formula for this scheme is(1.3)u n+1=(25−12h L)−1(48u n−36u n−1+16u n−2−3u n−3+48h N n−72N n−1+48N n−2−12N n−3)(AB4BD4).SS=Split Step.The idea of split step methods seems to have originated with Bagrinovskii and Godunov in the late1950’s[4]and to have been independently developed by Strang for the construction offinite difference schemes[57](the simplest of these is often called‘Strang Splitting’).The idea has been widely used in modelling Hamiltonian dynamics,with the Hamiltonian of a system split into its potential and kinetic energy parts.Some early work on this was done by Ruth[50].Yoshida [63]developed a technique to produce split-step methods of arbitrary even order. McLachlan and Atela[41]studied the accuracy of such schemes and McLachlan[42] made some further comparisons of different symplectic and non-symplectic schemes. Overviews of these methods can be found in Sanz-Serna and Calvo[53]and Boyd[7], and a recent discussion of the relative merits of operator splitting in general can be found in a paper by Schatzman[54].In essence,with the split step method,we want to write the solution as a com-position of linear and nonlinear steps(1.4)u(t)≈exp(c1t L)F(d1t N)exp(c2t L)F(d2t N)···exp(c k t L)F(d k t N)u(0), where c i and d i are real numbers and represent fractional time steps(though we use product notation,the nonlinear substeps are nonlinear).Generating split step methods becomes a process of generating the appropriate sets of real numbers,{c i} and{d i},such that this product matches the exact evolution operator to high order. The time–stepping for such a scheme can be either a multistep or a Runge-Kutta formula.We use a fourth order Runge-Kutta formula for the time–stepping in this experiment.IF=Integrating factor.Techniques that multiply both sides of a differential equation by some integrating factor and then make a relevant change of variable are well known in the theory of ODEs(see for example[38]).A similar method has been developed for the study of PDEs.The idea is to make a change of variable that allows us to solve for the linear part exactly,and then use a numerical scheme of our choosing to solve the transformed,nonlinear equation.This technique has been used for PDEs by Milewski and Tabak[44],Maday et al.[40],Smith and Waleffe[55,56],FornbergFOURTH-ORDER TIME-STEPPING FOR STIFF PDE3 and Driscoll[20],Trefethen[60],Boyd[7]and Cox and Matthews[14].Starting with our generic discretised PDE,we definev=e−L t u.(1.5)The term e−L t is known as the integrating factor.In many applications we can work in Fourier space and render L diagonal,so that scalars rather than matrices are involved. Differentiating(1.5)givesv t=−e−L t L u+e−L t u t.(1.6)Now,multiplying(1.2)by the integrating factor givese−L t u t−e−L t L uv t =e−L t N(u),(1.7)that is,v t=e−L t N(e L t v).(1.8)This has the effect of ameliorating the stifflinear part of the PDE,and we can use a time–stepping method of our choice(for example a fourth order Runge-Kutta for-mula)to advance the transformed equation.In practice,one doesn’t use the equation as it is written in(1.8),but rather replaces actual time,t,with the timestep,∆t, and incrementally updates the formula from one timestep to the next.This greatly improves the stability.In both the split step method and the integrating factor method,we use a fourth order Runge–Kutta method for the time–stepping.The fourth order Runge–Kutta algorithm that we used to perform the time integration for this method was:a=hf(v n,t n),(1.9)b=hf(v n+a/2,t n+h/2),c=hf(v n+b/2,t n+h/2),d=hf(v n+c,t n+h),v n+1=v n+14 A.-K.KASSAM AND L.N.TREFETHENLow|k|High|k|AB4/AM62(32L u n−1),(1.10)where h is the timestep.Unfortunately,this scheme is stable only for purely dispersive equations.In order to generalise the concept,Driscoll has developed a very similar idea using Runge-Kutta time–stepping[17].Again,the idea is to make use of different schemes for ‘fast’and‘slow’modes.In this case,he uses the fourth-order Runge–Kutta formula to deal with the slow,nonlinear modes,and an implicit–explicit third order Runge–Kutta method to advance the‘fast’linear modes.This is the method that we explore in this paper.ETD=Exponential Time Differencing.This method is the main focus of this paper,and we will describe it in Section2.***One might imagine that extensive comparisons would have been carried out of the behavior of these methods for various PDEs such as those listed in thefirst paragraph, but this is not so.One reason is that SL and ETD are quite new;but even the other three methods have not been compared as systematically as one might expect.Our aim in beginning this project was to make such a comparison.However, we soon found that further development of the ETD schemes wasfirst needed.As partly recognized by their originators Cox and Matthews,these methods as originally proposed encounter certain problems associated with eigenvalues equal to or close to zero,especially when the matrix L is not diagonal.If these problems are not addressed,ETD schemes prove unsuccessful for some PDE applications.In Section2we propose a modification of the ETD schemes that solves these numerical problems.The key idea is to make use of complex analysis and evaluate certain coefficient matrices or scalars via contour integrals in the complex plane. Other modifications would very possibly also achieve the same purpose,but so far as we know,this is thefirst fully practical ETD method for general use.In Section3we summarize the results of experimental comparison of thefive fourth-order methods listed above for four PDEs:the Burgers,Korteweg-de Vries, Allen-Cahn,and Kuramoto-Sivashinsky equations.Wefind that the ETD scheme outperforms the others.We believe it is the best method currently in existence for stiffPDEs,at least in one space dimension.In making such a bold statement,however,we should add the caveat that we are only consideringfixed time steps.Our ETD methods do not extend cheaply to variable time-stepping;an IMEX scheme,for example,is a more natural candidate for such problems.Sections4and5illustrate the methods in a little more detail for a diagonal example(Kuramoto-Sivashinsky)and a non-diagonal example(Allen-Cahn).They also provide brief Matlab codes for use by our readers as templates.2.A modified ETD scheme.Low order ETD schemes arose originally in the field of computational electrodynamics[59].They have been independently derivedFOURTH-ORDER TIME-STEPPING FOR STIFF PDE5 several times[5,12,14,21,46,48]–indeed Arieh Iserles has pointed out to us that in the ODE context,related ideas go back as far as Filon in1928[18,30]–but the most comprehensive treatment,and in particular the fourth order ETDRK4formula,is in the paper by Cox and Matthews[14],and it is from this paper that we take details of the scheme.Cox and Matthews argue that ETD schemes outperform IMEX schemes because they treat transient solutions better(where the linear term dominates),and outperform IF schemes because they treat non-transient solutions better(where the nonlinear term dominates).Algebraically,ETD is similar to the IF method.The difference is that we do not make a complete change of variable.If we proceed as in the IF approach and apply the same integrating factor and then integrate over a single time step of length h,we getu n+1=e L h u n+e L h h0e−LτN(u(t n+τ),t n+τ)dτ.(2.1)This equation is exact,so far,and the various order ETD schemes come from how one approximates the integral.In their paper Cox and Matthewsfirst present a sequence of recurrence formulae that provide higher and higher order approximations of a multistep type.They propose a generating formulau n+1=e L h u n+h s−1m=0g m m k=0(−1)k m k N n−k,(2.2)where s is the order of the scheme.The coefficients g m are given by the recurrence relationL hg0=e L h−I,L hg m+1+I=g m+13g m−2+...+g06 A.-K.KASSAM AND L.N.TREFETHENTable2.1Computation of g(z)by two different methods.The formula(2.4)is inaccurate for small z, and the order-5partial sum of the Taylor series is inaccurate for larger z.For z=1e−2,neither is fully accurate.All computations are done in IEEE double precision artithmetic.z5-term Taylor1 1.716666666666671.05170918075648 1.051709180756481e-2 1.005016708416671.00050016670838 1.000500166708341e-4 1.000050001666711.00000500000696 1.000005000016671e-6 1.000000500000171.00000004943368 1.000000050000001e-8 1.000000005000001.00000008274037 1.000000000500001e-10 1.000000000050001.00000008274037 1.000000000005001e-12 1.000000000000500.99920072216264 1.00000000000005the case,consider the expressione z−1g(z)=FOURTH-ORDER TIME-STEPPING FOR STIFF PDE7 operators that are diagonal,they use a Taylor series representation of the coefficients for diagonal elements below the cutoff,much as in Table2.1.This approach,however, entails some problems.One is that as the table illustrates,one must be careful to ensure that there is no overlap region where neither formula is accurate.Another more serious problem is,how does the method generalize to nondiagonal problems, i.e.,matrices rather than scalars?To handle such cases gracefully one would like a single formula that is simultaneously accurate for all values of z.We have found that this can be achieved by making use of ideas of complex analysis.First let us describe the accuracy problem in general terms.We have a function f(z)to evaluate that is analytic except for a removable singularity at z=0.For values of z close to that singularity,though the formula given for f(z)is mathematically exact,it is numerically inaccurate because of cancellation errors.We seek a uniform procedure to evaluate f(z)accurately for values of z that may or may not lie in this difficult region.The solution we have found is to evaluate f(z)via an integral over a contourΓin the complex plane that encloses z and is well separated from0:f(z)=1t−zdt.(2.6)When z becomes a matrix L instead of a scalar,the same approach works,with the term1/(t−z)becoming the resolvent matrix(t I−L)−1:f(L)=18 A.-K.KASSAM AND L.N.TREFETHENthis procedure,and we do not claim that our particular implementations are optimal, merely that they work and are easy to program.For non-diagonal problems,quite a bit of computation is involved—say,32matrix inverses—but as this is done just once before the time-stepping begins(assuming that the time steps are of afixed size),the impact on the total computing time is small.It would be greater for some problems in multiple space dimensions,but in some cases one could ameliorate the problem with a preliminary Schur factorisation to bring the matrix to triangular form.Contour integrals and Taylor series are not the only solutions that have been proposed for this problem.Both Beylkin[5]and Friesner et al.[21],for example,use a method that is based on scaling and squaring.That method is also effective,but the contour integral method appeals to us because of its greater generality for dealing with arbitrary functions.To demonstrate the effectiveness of our stabilization method,Table2.2considers the computation of the coefficientγ(z)of(2.5)(here z=L and h=1)by use of the formula(2.5)and by a contour integral method.Here we follow the simplest approach in which the contour is a circle of radius2sampled at equally spaced points at angles π/64,3π/64,...,127π/64.The integral becomes just a mean over these points,and because of the±i symmetry,it is enough to compute the mean over the32points in the upper half-plane and then take the real part of the result.The table shows accuracy in all digits printed.(In fact for this example,the same is achieved with as few as12sample points in the upper half-plane.)Table2.2Computation ofγ=γ(z)from the formula(2.5)(unstable)and from a mean over32points on a semicircle in the upper half-plane.The contour integral gives full accuracy for all these values of z.Again,all computations are done in double precision.z contour integral10−132.2927947688400.154845485377140.154845485377141e-10.166580495025740.166665830469980.166665830549591e-30.166666658330550.166089364483920.166666666583331e-50.16666666666583−888.1784197001250.16666666666666 1e-70.1666666666666700.166666666666671e-90.16666666666667FOURTH-ORDER TIME-STEPPING FOR STIFF PDE9 divided by the maximum value of the solution.Thus the error plotted in the graphs is a relative one.In a similar vein,the timesteps displayed have all been divided by the overall simulation time scale and are thus scaled from0to1.A relative timestep of1e-2,for example,implies that the actual timestep was one hundredth of the total simulation time,or that the simulation required100steps.We studied the following four problems.In each case we work with afixed, spectrally accurate space discretisation and vary the timestep.Korteweg-de Vries equation with periodic boundary conditions,u t=−uu x−u xxx,x∈[−π,π],(3.1)u(x,t=0)=3A2sech(A(x+2)2)2,with A=25,B=16.The simulation runs to t=0.001.Here and for the next two equations we use a512-point Fourier spectral discretisation in x.Burgers equation with periodic boundary conditions,u t=−(116)(1+sin(x10 A.-K.KASSAM AND L.N.TREFETHENaccuracy by fourth-order time-stepping.Most simulations in the past have been of lower order in time,typically second-order,but we believe that for most purposes,aFig.3.1.Accuracy vs.time step and computer time for three schemes for KdV equation.Fig.3.2.Accuracy vs.time step and computer time for four schemes for Burgers’equation.Turning now to the differences between methods revealed in Figures3.1–3.4,the first thing we note is that the differences are very considerable.The methods differ in efficiency by factors as great as10or higher.We were not able to make every method work in every case.If a method does not appear on a graph it means that it did not succeed,seemingly for reasons of nonlinear instability(which perhaps might have been tackled by dealiasing in our spectral discretisations).A key feature to look for in thefirst plot in eachfigure is the relative positioning of the different methods.Schemes that are further to the right for a given accuracy take fewer steps to achieve that accuracy.It is possible that each step is more costly,Matlab code is listed in Section4.Fig.3.3.Results for the Kuramoto-Sivashinsky equation.OurFig.3.4.Results for the Allen-Cahn equation.This problem is non-diagonal and more chal-lenging than the others.Our Matlab code is listed in Section5.however,so just because a scheme achieves a good accuracy in few steps does not mean that it is the most efficient.The second plot in thefigures give insight into these computation times.We can make a few comments on each of the methods investigated:Exponential time differencing is very good in every case.It works equally well for diagonal and non–diagonal problems,it is fast,accurate and can take large timesteps.The implicit–explicit scheme used in this study does not perform well.This is striking,as these are probably the most widely used of all the schemes.This fares particularly poorly for the dispersive equations,KdV and Burgers’equation,and for KdV,we could not get the IMEX scheme to work at all at the spatial resolution that we used.Fig.3.5.Loss of stability in the ETD scheme applied to Burgers’equation as the radius of the contour shrinks to zero.The contour of zero radius corresponds to an ETD calculation directly from the defining formula.The split step method also performed poorly.It was unstable for all of the experiments that we performed with512points.The main problem with this scheme, even if it is stable,is the long computation time caused by the large number of Runge-Kutta evaluations at each time-step for the nonlinear term.This becomes a particular problem with schemes of higher than second order.For second-order calculations,split step schemes are certainly competitive.The slider method does well in all of the diagonal cases.It is fast,accurate and very stable.This is remarkable when we compare its performance with that of the IMEX schemes from which it was derived.The only problem with this scheme is the difficulty in generalising it to nondiagonal cases.Finally,the integrating factor scheme performs well for Burgers’equation.It doesn’t do well for the KS equation,though,coming offworst of all,and we couldn’t get it to work for the KdV equation or the Allen-Cahn equation with the spatial discretisation that we used.This is also a little surprising,considering how widely used this scheme is.One important consideration is,how easily do these schemes generalise to several space dimensions?With the exception of the slider method,they all generalise in a straightforward manner.Formally,almost nothing changes other than the fact that we must work with tensor product matrices.There are a few problems that arise from this fact,though.The ETD,IF and SS schemes all need to calculate and store a matrix exponential. Even if the original matrix is sparse,this is not an insignificant amount of work,and the matrix exponential will not itself be sparse,which can be a significant amount of storage.It is true that these can be calculated in advance,and for one dimensional-problems the calculation is not very expensive.As the dimension of the problem increases,however,the cost goes up.Our difficulty with the IF method for the non-diagonal problem was that numerical instability meant that we were unable to calculate the appropriate exponential at all.The nature of these matrices depends crucially on whether the problem is peri-odic.Each periodic dimension corresponds to a diagonalisation;if all dimensions are periodic,we have only scalars to deal with,and if only one dimension is non-periodic we have a collection of small blocks.Another generalisation that one might consider would be how easily these schemes could be adapted to take advantage of variable time–stepping.The IMEX and Slider methods should be relatively easy to adapt,while those methods that use a matrix exponential would present some difficulties.Overall,then it appears that the ETD scheme requires the fewest steps to achieve a given accuracy.It is also the fastest method in computation time,has excellent stability properties and is the most general.It might be noted that the numerical ex-periments we have presented,since they resolve the the spatial part of the problem to very high accuracy,are somewhat stiffer than if the spatial errors had been permitted on the same scale as the temporal errors,raising the question of whether ETD would also be the best for less fully resolved problems.Experiments with coarser resolutions indicate that yes,the advantages of ETD are compelling there too.We conclude this section with an illustration of how crucial our complex contour integrals,or other stabilisation devices,are to the success of ETD schemes.Figure 3.5shows what happens if instead of a contour of radius1we shrink the radius to 10−3,10−8,or0.The accuracy is quickly lost.The case of radius0corresponds to an ETD scheme implemented directly from the formula without any stabilisation device beyond the use of L’Hˆo pital’s rule to eliminate the removable singularity at z=0.4.A diagonal example:Kuramoto-Sivashinsky.We now give a little more detail about the Kuramoto-Sivashinsky equation,which dates to the mid–1970’s and has been used in the study of a variety of reaction-diffusion systems[39].Our1D problem can be written asu t=−uu x−u xx−u xxxx,x∈[0,32π].(4.1)As it contains both second and fourth order derivatives,the KS equation produces complex behaviour.The second order term acts as an energy source and has a desta-bilising effect,and the nonlinear term transfers energy from low to high wavenumbers where the fourth order term has a stabilising effect.The KS equation is also very interesting from a dynamical systems point of view,as it is a PDE that can exhibit chaotic solutions[28,47].We use the initial conditionu(x,0)=cos(x/16)(1+sin(x/16)).(4.2)As the equation is periodic,we discretise the spatial part using a Fourier spectral method.Transforming to Fourier space gives,u t=−ik2(F((F−1(ˆu))2)),(4.4)where F denotes the discrete Fourier transform.We solve the problem entirely in Fourier space and use ETDRK4time stepping to solve to t=150.Figure4.1shows the result,which took less than1second of computer time on our worksation.Despite the extraordinary sensitivity of the solution at later times to perturbations in the initial data(such perturbations are amplified by as much as108up to t=150),we are confident that this image is correct to plotting accuracy.It would not have been practical to achieve this with a time-stepping scheme of lower order.We produced Figure4.1with the Matlab code listed in Figure4.2.Fig.4.1.Time evolution for Kuramoto-Sivashinsky equation.Time runs from0at the bottom of thefigure to150at the top.This is a PDE example of deterministic chaos[1].5.A non-diagonal example:Allen-Cahn.The Allen-Cahn equation is an-other well-known equation from the area of reaction-diffusion systems:(5.1)u t= u xx+u−u3,x∈[−1,1],and following p34.m of[60],we used the initial condition(5.2)u(x,0)=.53x+.47sin(−1.5πx),u(−1,t)=−1,u(1,t)=1.It has stable equilibria at u=±1and an unstable equilibrium at u=0.One of the interesting features of this equation is the phonomenon of metastability.Regions%kursiv.m-solution of Kuramoto-Sivashinsky equation by ETDRK4scheme%%u_t=-u*u_x-u_xx-u_xxxx,periodic BCs on[0,32*pi]%computation is based on v=fft(u),so linear term is diagonal%compare p27.m in Trefethen,"Spectral Methods in MATLAB",SIAM2000%AK Kassam and LN Trefethen,July2002%Spatial grid and initial condition:N=128;x=32*pi*(1:N)’/N;u=cos(x/16).*(1+sin(x/16));v=fft(u);%Precompute various ETDRK4scalar quantities:h=1/4;%time stepk=[0:N/2-10-N/2+1:-1]’/16;%wave numbersL=k.^2-k.^4;%Fourier multipliersE=exp(h*L);E2=exp(h*L/2);M=16;%no.of points for complex meansr=exp(1i*pi*((1:M)-.5)/M);%roots of unityLR=h*L(:,ones(M,1))+r(ones(N,1),:);Q=h*real(mean((exp(LR/2)-1)./LR,2));f1=h*real(mean((-4-LR+exp(LR).*(4-3*LR+LR.^2))./LR.^3,2));f2=h*real(mean((2+LR+exp(LR).*(-2+LR))./LR.^3,2));f3=h*real(mean((-4-3*LR-LR.^2+exp(LR).*(4-LR))./LR.^3,2));%Main time-stepping loop:uu=u;tt=0;tmax=150;nmax=round(tmax/h);nplt=floor((tmax/100)/h);g=-0.5i*k;for n=1:nmaxt=n*h;Nv=g.*fft(real(ifft(v)).^2);a=E2.*v+Q.*Nv;Na=g.*fft(real(ifft(a)).^2);b=E2.*v+Q.*Na;Nb=g.*fft(real(ifft(b)).^2);c=E2.*a+Q.*(2*Nb-Nv);Nc=g.*fft(real(ifft(c)).^2);v=E.*v+Nv.*f1+2*(Na+Nb).*f2+Nc.*f3;if mod(n,nplt)==0u=real(ifft(v));uu=[uu,u];tt=[tt,t];endend%Plot results:surf(tt,x,uu),shading interp,lighting phong,axis tightview([-9090]),colormap(autumn);set(gca,’zlim’,[-550])light(’color’,[110],’position’,[-1,2,2])material([0.300.600.6040.001.00]);Fig. 4.2.Matlab code to solve the Kuramoto-Sivashinsky equation and produce Figure4.1. Despite the extraordinary sensitivity of this equation to perturbations,this code computes correct results in less than1second on an800MHz Pentium machine.of the solution that are near±1will beflat,and the interface between such areas can remain unchanged over a very long timescale before changing suddenly.We can write a discretisation of this equation in our standard form(1.2),with (5.3)L= D2,N(u,t)=u−u3,where D is the Chebyshev differentiation matrix[60].L is now a full matrix.Again we use ETDRK4for the time stepping and we solve up to t=70with =0.01.Figure 5.1shows the result produced by the Matlab code listed in Figure5.2,which also runs in less than a second on our workstation.This code calls the function cheb.m from[60],available at /work/nick.trefethen.Fig.5.1.Time evolution for Allen-Cahn equation.The x axis runs from x=−1to x=1and the t-axis runs from t=0to t=70.The initial hump is metastable and disappears near t=45.Acknowledgments.It has been a pleasure to learn about high-order ETD schemes from one of their inventors,Paul Matthews.We are also grateful for use-ful discussions with Uri Ascher,Gino Biondini,Elaine Crooks,Arieh Iserles,´Alvaro Meseguer,and Brynwulf Owren.。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

0898-1221/$ – see front matter. Published by Elsevier Ltd doi:10.1016/j.camwa.2009.08.066 Please cite this article in press as: S.G. Li, et al., Some fourth-order nonlinear solvers with closed formulae for multiple roots, Computers and Mathematics with Applications (2009), doi:10.1016/j.camwa.2009.08.066
,
(6)
y = xn − aun , n f (xn ) vn = , f (yn ) ηn = xn − bun − c vn .
(7)
Neta and Johnson [11] give a table of values for the parameters a, b, c , a1 , a2 , a3 for several values of m. Neta [13] has developed another fourth-order method requiring one-function and three-derivative evaluation per iteration. This method is based on Murakami’s method [14] given by xn+1 = xn − a1 un − a2 vn − a3 w3 (xn ) − ψ(xn ), where un is defined by (3), vn , yn and ηn are given by (7) and f (xnFinding the roots of nonlinear equations is very important in numerical analysis and has many applications in engineering and other applied sciences. In this paper, we consider iterative methods to find a multiple root α of multiplicity m, i.e., f (j) (α) = 0, j = 0, 1, . . . , m − 1 and f (m) (α) = 0, of a nonlinear equation f (x) = 0. The modified Newton’s method for multiple roots is written as [1] xn+1 = xn − m f (xn ) f (xn )
There are, however, not yet so many fourth- or higher-order methods known that can handle the case of multiple roots. In [11], Neta and Johnson have proposed a fourth-order method requiring one-function and three-derivative evaluation per iteration. This method is based on the Jarratt method [12] given by the iteration function xn+1 = xn − where f (xn ) a1 f (xn ) + a2 f (yn ) + a3 f (ηn )
Article history: Received 2 July 2009 Accepted 25 August 2009 Keywords: Newton’s method Multiple roots Nonlinear equations Iterative methods Root finding
m +1 f 2m f (xn )f (xn ) 2f (xn )
( xn ) −
.
(4)
The third-order Osada method [7] is written as xn+1 = xn − 1 2 m(m + 1)un + 1 2
(m − 1)2
f (xn ) f (xn )
.
(5)
Some fourth-order nonlinear solvers with closed formulae for multiple roots
S.G. Li, L.Z. Cheng, B. Neta ∗
School of Science, National University of Defense Technology, Changsha, 410073, China
ARTICLE IN PRESS
2 S.G. Li et al. / Computers and Mathematics with Applications ( ) –
The cubically convergent Halley’s method which is a special case of the Hansen and Patrick’s method [3], is written as xn+1 = xn − f ( xn )
article
info
abstract
In this paper, we present six new fourth-order methods with closed formulae for finding multiple roots of nonlinear equations. The first four of them require one-function and three-derivative evaluation per iteration. The last two require one-function and twoderivative evaluation per iteration. Several numerical examples are given to show the performance of the presented methods compared with some known methods. Published by Elsevier Ltd
w3 (xn ) = ψ(xn ) =
,
f (xn ) (9)
b1 f (xn ) + b2 f (yn )
.
A table of values for the parameters a, b, c , a1 , a2 , a3 , b1 , b2 for several values of m is also given by Neta [13]. In [15], a fourth-order method is proposed,
,
(1)
which is quadratically convergent. In recent years, some modifications of Newton’s method for multiple roots have been proposed and analyzed, most of which are of third-order convergence. For example, see Traub [2], Hansen and Patrick [3], Victory and Neta [4], Dong [5,6], Osada [7], Neta [8], Chun and Neta [9], Chun, Bae and Neta [10], etc. All of these methods require the knowledge of the multiplicity m. The third-order Chebyshev’s method for finding multiple roots [2,8] is given by xn+1 = xn − where un = f (xn ) f (xn ) m(3 − m) 2 un − m2 f (xn )2 f (xn ) 2 f (xn )3 (2)
ARTICLE IN PRESS
Computers and Mathematics with Applications ( ) –
Contents lists available at ScienceDirect
Computers and Mathematics with Applications
journal homepage: /locate/camwa
.
(3)

Corresponding address: Naval Postgraduate School, Department of Applied Mathematics, CA 93943, Monterey, United States. Tel.: +1 (831) 656 2235. E-mail addresses: lsg_998@ (S.G. Li), bneta@ (B. Neta).
2m yn = xn − m + 2 un , 2 −m 1 m(m − 2) mm f (yn ) − m f ( xn ) +2 2 xn+1 = xn − 2 un . −m m f (xn ) − m+2 f (yn )
(10)
This method requires one-function and two-derivative evaluation per iteration. The methods proposed in [11,13] do not have closed formulae there. In this paper, by further investigating these methods in [11,13], we present six fourth-order methods with closed formulae for multiple roots of nonlinear equations. The first four of these new methods require one-function and three-derivative evaluation per iteration. The last two require one-function and two-derivative evaluation per iteration. These last ones are more efficient since they require less functional evaluations. Finally, we use some numerical examples to compare the new fourth-order methods with some known third-order methods. From the results, we can see that the fourth-order methods can be competitive to these third-order methods and usually require less functional evaluations. 2. The fourth-order methods For simplicity, we define Aj = f (m+j) (α) f (m) (α) m−a m
相关文档
最新文档