Magma

MAGMA Computational Algebra System

Magma
 •  How to get it
 •  Download
 •  Online Demo
 
Resources
 •  Online Help
 •  Discovering Mathematics with Magma
 •  Citations
 •  How to cite Magma
 •  Links
 •  Contact us
 
[Next][Prev] [Right] [Left] [Up] [Index] [Root]

Numerical Functions

This section contains some functions for numerical analysis, taken from Pari.

Subsections

Summation of Infinite Series

There are three functions for evaluating infinite sums of real numbers. The sum should be specified as a map m from the integers to the real field, such that m(n) is the n th term of the sum. The summation begins at term i. The precision of the result will be the default precision of the real field.

InfiniteSum(m, i) : Map, RngIntElt -> FldReElt
An approximation to the infinite sum m(i) + m(i + 1) + m(i + 2) + ... . This function also works for maps to the complex field.
PositiveSum(m, i) : Map, RngIntElt -> FldReElt
An approximation to the infinite sum m(i) + m(i + 1) + m(i + 2) + ... . Designed for series in which every term is positive, it uses van Wijngaarden's trick for converting the series into an alternating one. Due to the stopping criterion, terms equal to 0 will create problems and should be removed.
AlternatingSum(m, i) : Map, RngIntElt -> FldReElt
    Al: MonStgElt                       Default: "Villegas"
An approximation to the infinite sum m(i) + m(i + 1) + m(i + 2) + ... . Designed for series in which the terms alternate in sign. The optional argument Al can be used to specify the algorithm used. The possible values are "Villegas" (the default), and "EulerVanWijngaarden". Due to the stopping criterion, terms equal to 0 will create problems and should be removed.

Integration

A number of `Romberg-like' integration methods have been taken from Pari. The precision should not be made too large for this, and singularities are not allowed in the interval of integration (including its boundaries).

Interpolation(P, V, x) : [FldReElt], [FldReElt], FldReElt -> FldReElt, FldReElt
Using Neville's algorithm, interpolate the value of x under a polynomial p such that p(P[i]) = V[i]. An estimate of the error is also returned.
RombergQuadrature(f, a, b: parameters) : Program, FldReElt, FldReElt -> FldReElt
    Precision: FldReElt                 Default: 1.0e-6
    MaxSteps: RngIntElt                 Default: 20
    K: RngIntElt                        Default: 5
Using Romberg's method of order 2K, approximate the integral of f from a to b. The desired accuracy may be specified by setting the Precision parameter, and the order of the algorithm by changing K. The algorithm ceases after MaxSteps iterations if the desired accuracy has not been achieved.
SimpsonQuadrature(f, a, b, n) : Program, FldReElt, FldReElt, RngIntElt -> FldReElt
Using Simpson's rule on n sub-intervals, approximate the integral of f from a to b.
TrapezoidalQuadrature(f, a, b, n) : Program, FldReElt, FldReElt, RngIntElt -> FldReElt
Using the trapezoidal rule on n sub-intervals, approximate the integral of f from a to b.
 [Next][Prev] [Right] [Left] [Up] [Index] [Root]
                       

Version: V2.16 of Mon Nov 16 15:04:45 EST 2009

Valid HTML 4.01! Valid CSS!