Home Login  |   Contact  |   About Us       Thursday, November 28, 2024   

j0110924 - Back to Home
   Skip Navigation LinksHOME ›  AREAS OF EXPERTISE  #3 ›   Numerical Integration ›  ~ Gauss-Legendre



Skip Navigation Links.



"Numerical Integration Solutions"
Gauss-Legendre Method


Results from Gauss-Legendre method



IMPLEMENTATION
Gauss-Legendre Integration

The Gauss-Legendre integration is used to numerically calculate the following integral:

I = ∫-11 f(x)dx = ∑i=0n-1 wi f(xi)

This case corresponds to the Gauss integration with the weighting function w(x) = 1

From the above equation, the Gauss-Legendre integration is completely determined by a set of nodes xi and weights wi. The nodes and weights for the Gauss-Legendre integration have been computed with great precision and tabulated in literature. These data can be used without knowing the theory behind them, since all we need are the values of xi and wi.

In order to test the Gauss-Legendre integration we will compute the following integral:

I = ∫-12 1/√2π e-x2/2 dx

Running this example creates the results shown above. It can be seen that the result for n = 3 is already very accurate.



Testing the Gauss-Legendre Integration Method

In order to test the Gauss-Legendre method as defined above, a new TestGaussLegendre() static method has been added and executed. Supporting code and methods are not shown.

           static void TestGaussLegendre();
              {
                 ListBox1.Items.Clear();
                 double result;
                 for (int n = 1; n < 9; n++)
                 (
                   result = Integration.GaussLegendre(f2, 1, 2, n);
                   ListBox1.Items.Add(" n = " + n + ", result = " + result);
                 )
              }



Other Implementations...


Object-Oriented Implementation
Graphics and Animation
Sample Applications
Ore Extraction Optimization
Vectors and Matrices
Complex Numbers and Functions
Ordinary Differential Equations - Euler Method
Ordinary Differential Equations 2nd-Order Runge-Kutta
Ordinary Differential Equations 4th-Order Runge-Kutta
Higher Order Differential Equations
Nonlinear Systems
Numerical Integration
Numerical Differentiation
Function Evaluation


   Quotes

Consulting Services - Back to Home


Home

Home Math, Analysis,
  expertise..."

EIGENVALUE
SOLUTIONS...


> Rayleigh-Quotient Method

> Cubic Spline Method

 

Applied Mathematical Algorithms

Home

ComplexFunctions

Home

NonLinear
Home

Differentiation
Home

Integration
About Us


KMP Software Engineering is an independent multidisciplinary engineering consulting company specializing in mathematical algorithms.

      (About Us) →
Areas of
Expertise


SpecialFunctions
VectorsMatrices
OptimizationMethods
ComplexNumbers
Interpolation
CurveFitting
NonLinearSystems
LinearEquations
DistributionFunctions
NumericalDifferentiation
NumericalIntegration
DifferentialEquations
Smalltalk
FiniteBoundary
Eigenvalue
Graphics
Understanding
Mining


MiningMastery
MineralNews
MineralCommodities
MineralForum
Crystallography
Services


NumericalModeling
WebServices
MainframeServices
OutsourceServices

LINKED IN
MINE REVIEW(by G.Pacheco)
Brand





Home

Login

Contact
Since 2006 All Rights Reserved  © KMP Software Engineering LINKS | PRIVACY POLICY | LEGAL NOTICE