An NDoc Documented Class Library

SimpsonsIntegrator Class

The extended Simpson's rule for numerically integrating functions.

For a list of all members of this type, see SimpsonsIntegrator Members.

System.Object
   numerics4net.IterativeMethod
      numerics4net.integration.SimpsonsIntegrator

public class SimpsonsIntegrator : IterativeMethod

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

For example, to evaluate definite integrals for sine, first a Function delegate is defined:

Function sine = new Function(Math.Sin);

Then, a Simpson's integrator is created with the above function delegate:

SimpsonsIntegrator integrator = new SimpsonsIntegrator(sine);

Lastly, evaluating definite integrals is accomplished using the Integrate method:

// integrate sine from 0 to Pi. double two = integrator.Integrate(0.0, Math.PI); // integrate sine from Pi/2 to 2 Pi. double one = integrator.Integrate(Math.PI / 2.0, Math.PI);

References:

  1. Eric W. Weisstein. "Newton-Cotes Formulas." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/Newton-CotesFormulas.html
  2. Eric W. Weisstein. "Simpson's Rule." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/SimpsonsRule.html

Requirements

Namespace: numerics4net.integration

Assembly: numerics4net-1.2 (in numerics4net-1.2.dll)

See Also

SimpsonsIntegrator Members | numerics4net.integration Namespace