Chebfun,功能的数值计算

我最近参加了在英格兰牛津的为期三天的研讨会“ Chebfun and Beyond”。Chebfun是用于具有功能数值计算的数学研究和开源软件项目。我计划写一系列有关Chebfun的Cleve Corner博客文章。

内容

Chebfun

For a description of Chebfun we quote the web site,>

Chebfun是针对对象MATLAB的算法和开源软件系统的集合,它扩展了熟悉的数值计算方法,涉及数字到连续或分段连续函数。

Runge的功能

Exercise 3.9 and the programrungeinterp使用MATLAB的数值计算involves an example due to Carle Runge, $$ f(x) = \frac{1}{1+25x^2} $$ The program demonstrates the fact that interpolation of $f$ by polynomials based on sampling $f(x)$ at equally spaced points does not provide uniformly accurate approximants. Chebfun provides the answer to part 3.9b of the exercise, which asks how the interpolation points should be distributed to generate satisfactory interpolants. The answer, Chebyshev points, also generates the first half of Chebfun's name. Here is a chebfun of Runge's function, plotted with linestyle'.-'to show the Chebyshev points.
f = @(x) 1./(1 + 25*x.^2); F = chebfun(f); plot(F,'.-')xlabel('X') 标题('Runge''s function')
You can see that the interpolation points are concentrated nearer the ends of the interval, at the zeros of the Chebyshev polynomials, $$ x_j = - \cos {j \frac {\pi}{n}}, \ \ \ j = 0, ..., n $$ Here we need a fair number of points to get a polynomial approximation that is accurate to floating point precision across the entire interval.
n = length(F)-1
n = 182
Chebyshev点的使用不仅导致准确的近似值,还可以在基础操作中使用功能强大的数学工具,包括傅立叶变换和Barycentric坐标。

准确性

我们可以通过在间隔中以大量随机选择点计算残差来评估此示例的准确性。
x = 2*rand(2^10,1)-1; residual = max(abs(f(x) - F(x)))
residual = 1.8874e-15
The computed residual results from three quantities, all of roughly the same size, the actual error $|f(x) - F(x)|$, as well as the floating rounding errors generated in evaluatingf(x)F(x).

方法

查询
长度(方法(方法)('chebfun'))
ans = 203
reveals that there are over 200 methods defined for thechebfunobject. There are additional methods defined for some subordinate objects. The overall design objective has been to take familiar MATLAB operations on vectors and generalize them to functions. For examplesum,
I = sum(F)
i = 0.5494
计算确定的积分,$$ i = \ int _ { - 1}^{1} {f(x)dx} $$和,
g = cumsum(f);图(g)xlabel('X') 标题(“不确定的积分”)
computes the indefinite integral $$ G(x) = \int_{-1}^{x} {F(s) ds} $$

ChebfunProject

Professor Nick Trefethen and his student Zachary Battles began the Chebfun project in 2001 at the Numerical Analysis Group at Oxford. Today there is a second group at the University of Delaware under Professor Toby Driscoll. There have been a number of graduate and postdoctoral students over the years at both institutions. Dr. Nick Hale at Oxford currently manages the project. The MATLABpublishcommand has been used to prepare the first edition of the documentation, as well as prepare the LaTeX source for a hard copy book that will be published shortly. Version 4.2 of the Chebfun software was released in March and可用来自Chebfun网站。Chebfun团队正在使用开源软件开发模型。

Published with MATLAB® R2012b

|
  • print
  • send email

注释

To leave a comment, please click这里to sign in to your MathWorks Account or create a new one.