Chebfun


Nick Trefethen
Chebfun is an open-source software system for numerical computing with functions. The mathematical basis of Chebfun is piecewise polynomial interpolation implemented with what we call “Chebyshev technology”. The foundations are described, with Chebfun examples, in the book _Approximation Theory and Approximation Practice_. Chebfun has extensive capabilities for dealing with linear and nonlinear differential and integral operators, and it also includes continuous analogues of linear algebra notions like QR and singular value decomposition. The Chebfun2 extension works with functions of two variables defined on a rectangle in the x-y plane. To get a sense of the breadth and power of Chebfun, a great place to start is by looking at our [Examples][1].

To install, you can either clone the directory with Git or download a .zip file. Note that a call to `clear classes` is required if you had a previous version of Chebfun installed.

## Option 1: Download .zip file Download a .zip of Chebfun from - https://github.com/chebfun/chebfun/archive/master.zip

After unzipping, you will need to add Chebfun to the matlab path. You can do this either (a) by typing
```
addpath(chebfunroot), savepath

where `chebfunroot` is the path to the unzipped directory, (b) by selecting the `chebfun` directory with the `pathtool` command, or (c) though the File > Set Path... dialog from the matlab menubar.

## Option 2: Clone with Git
To clone the Chebfun repository, first navigate in a terminal to where you want the repository cloned, then type
```
git clone https://github.com/chebfun/chebfun.git
```
To use Chebfun in matlab, you will need to add the `chebfun` directory to the matlab path as above.

Chebop


A chebop represents a differential or integral operator that acts on chebfuns. Like chebfuns, chebops are built on the premise of appoximation by piecewise Chebyshev polynomial interpolants; in the context of differential equations such techniques are called spectral collocation methods. As with chebfuns, the discretizations are chosen automatically to achieve the maximum possible accuracy available from double precision arithmetic.

A chebop has a domain, an operator, and sometimes boundary conditions. For example, here is the chebop corresponding to the second-derivative operator on [-1,1]:

(For scalar operators like this, one may also dispense with the x and just write L.op = @(u) diff(u,2).) This operator can now be applied to chebfuns defined on [-1,1]. For example, taking two derivatives of sin(3x) multiplies its amplitude by 9.

 

  1. Chebfun Guide 7: Linear Differential Operators and Equations Mathworks.
  2. Driscoll, T.A., Hale, N., Trefethen, L.N., Chebfun Guide.
  3. Trefethen, Nick, List of publications.