HyperMath

GaussLobatto

GaussLobatto

Previous topic Next topic No expanding text in this topic  

GaussLobatto

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Approximates the integral of an univariate function using the Gauss-Lobatto quadrature rule.

Syntax

area = GaussLobatto(FuncName, a, b, n)

Arguments

Name

Description

 

FuncName

A string containing the name of the user function to be integrated.

 

a

The starting point of the integration interval.

 

b

The ending point of the integration interval.

 

n

The number of points used to construct the approximation. The minimum is 2 and the maximum is 10.

Output

Name

Description

 

area

The computed area for the integral.

Example

Integrate the sine function on the interval [0, pi].

 

Syntax

 

function func(x)

{

   return = Sin(x)

}

area = GaussLobatto("func", 0, Acos(-1), 10)

 

Result

 

area = 2

Comments

The points selected in the Gauss-Lobatto method include the endpoints of the interval.

See Also:

GaussLegendre

Integral