摘要本文介绍了定积分近似计算的几种数值计算方法,包括矩形法、梯形法、抛物线法 和蒙特卡罗法,并用 matlab 编程实现对定积分的近似计算。其中将矩形法细分为左矩形 法、右矩形法和中点矩形法,通过对 matlab 运行结果的对比,可以发现,不同矩形法的 效果在某些情况下有明显的不同。通过例子对几种计算方法的效果进行对比,发现,对 于不同走势的被积曲线,选择不同的方法进行试验,得出的近似结果精度有差别,这说 明,不同方法适合不同的被积曲线,各有各的优势所在。蒙特卡罗法的优势在于算法简 单,易于推广,而且不需考虑到被积曲线的特点,即该方法不受被积函数的限定。79600
毕业论文关键词:定积分,matlab,误差估计,近似计算
毕 业 设 计 说 明 书 外 文 摘 要
Title The application of Matlab in the estimation of definite integral
Abstract In this paper, several numerical methods for the approximate calculation of definite integrals are introduced。 The methods including rectangular method, trapezoidal method, parabola method and Monte Carlo method。 I use matlab programming to achieve the approximate calculation of the definite integral in this paper。 The rectangular method is pided into the left rectangle method, the right rectangle method and the midpoint rectangle method。 By comparing the results of the operation, it can be found that the effect of different rectangle method is obviously different in some cases。 Through several examples, the results of several calculation methods are compared。 It is found that there is a difference in the accuracy of the approximate results obtained by different methods when the trend of product curve are different。 It shows that the different methods are suitable for different product curve, and each method has its own advantages。 The advantage of Monte Carlo method is that the algorithm is simple and easy to popularize。 And it does not need to take into account the characteristics of the product curve。 It means that Monte Carlo method is not limited by the product function。
Keywords: Definite integral, MATLAB, error estimation, approximate calculation
本科毕业设计说明书 第 I 页
目 次
0 引言 1
1 概述 2
1。1 背景介绍 2
1。2 近似计算常用方法 2
2 定积分数值计算方法及误差理论估计 4
2。1 矩形法 4
2。2 梯形法 5
2。3 抛物线法(辛普森公式) 6
2。4 蒙特卡罗法 7
2。5 本章小结 10
3 Matlab 编程试验 11
3。1 三种方法试验结果比较 11
3。2 蒙特卡罗法试验结果