IGLib  1.7.2
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Num.Numeric Class Reference

Static Public Member Functions

static double IntegralSimpson (DlgFunctionValue f, double from, double to, int numintervals)
 Returns numerical integral of a function calculated by the composite Simpson's rule. Error: -(to-from)*h^4*f(4)(mi)/180 More...
 
static double IntegralSimpson (double[] tabx, double[] tabf)
 Returns numerical integral of a function calculated by the Simpson's rule. Function is specified as a table of values in equidistant points. Intervals need to be equidistant, minimal number of points is 3 and must be odd. Error: -(to-from)*h^4*f(4)(mi)/180 More...
 
static double IntegralTrapezoidal (DlgFunctionValue f, double from, double to, int numintervals)
 Returns numerical integral of a function calculated by the composite trapezoidal rule. Error: -(a-b)*h^2*f''(mi)/12 More...
 
static double IntegralTrapezoidal (double[] tabx, double[] tabf)
 Returns numerical integral of a function calculated by the trapezoidal rule. Function is specified as a table of values in specified points. Intervals do not need to be equidistant, minimal number of points is 2. Error: -(a-b)*h^2*f''(mi)/12 More...
 
static double DerivativeFD (DlgFunctionValue f, double x, double step)
 Calculates numerical derivative of a function according to the forward difference formula. Error: -h*f''(mi)/2 More...
 
static double DerivativeBD (DlgFunctionValue f, double x, double step)
 Calculates numerical derivative of f according to the backward difference formula. Error: h*f''(mi)/2 More...
 
static double DerivativeCD (DlgFunctionValue f, double x, double step)
 Calculates numerical derivative of a function according to the central difference formula. Error: -h^2*f(3)(mi)/6 More...
 
static double Derivative4Point (DlgFunctionValue f, double x, double h)
 Calculates the derivative of a function with a 4 point formula. Error is of order O(h^4). More...
 
static double SecondDerivativeCD (DlgFunctionValue f, double x, double step)
 Calculates numerical second derivative of a function according to the central difference formula. Error: -h^2*f(4)(mi)/12 More...
 
static double SecondDerivative5Point (DlgFunctionValue f, double x, double h)
 Calculates the second order derivative of a function with a 5 point formula. Error is O(h^4). More...
 
static double ThirdDerivative4Point (DlgFunctionValue f, double x, double h)
 Calculates the third order derivative of a function with a 5 point formula. Error is O(h^2). More...
 
static double ThirdDerivative6Point (DlgFunctionValue f, double x, double h)
 Calculates the third order derivative of a function with a 5 point formula. Error is O(h^4). More...
 
static double FourthDerivative5Point (DlgFunctionValue f, double x, double h)
 Calculates the fourth order derivative of a function with a 5 point formula. Error is O(h^2). More...
 
static double FourthDerivative7Point (DlgFunctionValue f, double x, double h)
 Calculates the fourth order derivative of a function with a 5 point formula. Error is O(h^4). More...
 
static double FifthDerivative7Point (DlgFunctionValue f, double x, double h)
 Calculates the fifth order derivative of a function with a 7 point formula. More...
 
static double FifthDerivative9Point (DlgFunctionValue f, double x, double h)
 Calculates the fifth order derivative of a function with a 9 point formula. More...
 
static void TestDifferentiation ()
 Tests numerical differentiation methods. More...
 
static void TestIntegration ()
 Test for numerical integration methods. More...
 

Static Private Member Functions

static double IntegralSimpsonTab (DlgFunctionValue f, double from, double to, int numintervals)
 Calculates numerical integral of a function by Simpson's rule, but through a table of values. More...
 
static double IntegralTrapeZoidalTab (DlgFunctionValue f, double from, double to, int numintervals)
 Calculates numerical integral of a function by Trapezoidal rule, but through a table of values. More...
 

Member Function Documentation

static double IG.Num.Numeric.IntegralSimpson ( DlgFunctionValue  f,
double  from,
double  to,
int  numintervals 
)
inlinestatic

Returns numerical integral of a function calculated by the composite Simpson's rule. Error: -(to-from)*h^4*f(4)(mi)/180

Parameters
fFunction to be integrated.
fromLower bound of integration interval.
toUpper bound of integration interval.
numintervalsNumber of sub-intervals (1 less than the numbe of evaluation points).
Returns
Integral approximation.

References IG.Num.s.

Referenced by IG.Num.RealFunctionBase.NumericalIntegral().

static double IG.Num.Numeric.IntegralSimpson ( double[]  tabx,
double[]  tabf 
)
inlinestatic

Returns numerical integral of a function calculated by the Simpson's rule. Function is specified as a table of values in equidistant points. Intervals need to be equidistant, minimal number of points is 3 and must be odd. Error: -(to-from)*h^4*f(4)(mi)/180

Parameters
tabxTable of equidistant points at which function is evaluated.
tabfTable of function values in points contained in tabx.
Returns
Integral approximation.
static double IG.Num.Numeric.IntegralTrapezoidal ( DlgFunctionValue  f,
double  from,
double  to,
int  numintervals 
)
inlinestatic

Returns numerical integral of a function calculated by the composite trapezoidal rule. Error: -(a-b)*h^2*f''(mi)/12

Parameters
fFunction to be integrated.
fromLower bound of integration interval.
toUpper bound of integration interval.
numintervalsNumber of sub-intervals (1 less than the numbe of evaluation points).
Returns
Integral approximation.

References IG.Num.s.

static double IG.Num.Numeric.IntegralTrapezoidal ( double[]  tabx,
double[]  tabf 
)
inlinestatic

Returns numerical integral of a function calculated by the trapezoidal rule. Function is specified as a table of values in specified points. Intervals do not need to be equidistant, minimal number of points is 2. Error: -(a-b)*h^2*f''(mi)/12

Parameters
tabxTable of equidistant points at which function is evaluated.
tabfTable of function values in points contained in tabx.
Returns
Integral approximation.
static double IG.Num.Numeric.IntegralSimpsonTab ( DlgFunctionValue  f,
double  from,
double  to,
int  numintervals 
)
inlinestaticprivate

Calculates numerical integral of a function by Simpson's rule, but through a table of values.

static double IG.Num.Numeric.IntegralTrapeZoidalTab ( DlgFunctionValue  f,
double  from,
double  to,
int  numintervals 
)
inlinestaticprivate

Calculates numerical integral of a function by Trapezoidal rule, but through a table of values.

static double IG.Num.Numeric.DerivativeFD ( DlgFunctionValue  f,
double  x,
double  step 
)
inlinestatic

Calculates numerical derivative of a function according to the forward difference formula. Error: -h*f''(mi)/2

Parameters
fFunction whose derivative is calculated.
xValue of independent variable at which derivative is calculated.
stepStep size used in differentiation.
Returns
Derivative approximation.
static double IG.Num.Numeric.DerivativeBD ( DlgFunctionValue  f,
double  x,
double  step 
)
inlinestatic

Calculates numerical derivative of f according to the backward difference formula. Error: h*f''(mi)/2

Parameters
fFunction whose derivative is calculated.
xValue of independent variable at which derivative is calculated.
stepStep size used in differentiation.
Returns
Derivative approximation.
static double IG.Num.Numeric.DerivativeCD ( DlgFunctionValue  f,
double  x,
double  step 
)
inlinestatic

Calculates numerical derivative of a function according to the central difference formula. Error: -h^2*f(3)(mi)/6

Parameters
fFunction whose derivative is calculated.
xValue of independent variable at which derivative is calculated.
stepStep size used in differentiation.
Returns
Derivative approximation.

Referenced by IG.Num.RealFunctionBase.NumericalDerivative().

static double IG.Num.Numeric.Derivative4Point ( DlgFunctionValue  f,
double  x,
double  h 
)
inlinestatic

Calculates the derivative of a function with a 4 point formula. Error is of order O(h^4).

Parameters
fFunction whose derivative is calculated.
xValue of independent variable at which derivative is calculated.
hStep size.
static double IG.Num.Numeric.SecondDerivativeCD ( DlgFunctionValue  f,
double  x,
double  step 
)
inlinestatic

Calculates numerical second derivative of a function according to the central difference formula. Error: -h^2*f(4)(mi)/12

Parameters
fFunction whose derivative is calculated.
xValue of independent variable at which derivative is calculated.
stepStep size used in differentiation.
Returns
Derivative approximation.

Referenced by IG.Num.RealFunctionBase.NumericalSecondDerivative().

static double IG.Num.Numeric.SecondDerivative5Point ( DlgFunctionValue  f,
double  x,
double  h 
)
inlinestatic

Calculates the second order derivative of a function with a 5 point formula. Error is O(h^4).

Parameters
fFunction whose derivative is calculated.
xValue of independent variable at which derivative is calculated.
hStep size.
static double IG.Num.Numeric.ThirdDerivative4Point ( DlgFunctionValue  f,
double  x,
double  h 
)
inlinestatic

Calculates the third order derivative of a function with a 5 point formula. Error is O(h^2).

Parameters
fFunction whose derivative is calculated.
xValue of independent variable at which derivative is calculated.
hStep size.
static double IG.Num.Numeric.ThirdDerivative6Point ( DlgFunctionValue  f,
double  x,
double  h 
)
inlinestatic

Calculates the third order derivative of a function with a 5 point formula. Error is O(h^4).

Parameters
fFunction whose derivative is calculated.
xValue of independent variable at which derivative is calculated.
hStep size.
static double IG.Num.Numeric.FourthDerivative5Point ( DlgFunctionValue  f,
double  x,
double  h 
)
inlinestatic

Calculates the fourth order derivative of a function with a 5 point formula. Error is O(h^2).

Parameters
fFunction whose derivative is calculated.
xValue of independent variable at which derivative is calculated.
hStep size.
static double IG.Num.Numeric.FourthDerivative7Point ( DlgFunctionValue  f,
double  x,
double  h 
)
inlinestatic

Calculates the fourth order derivative of a function with a 5 point formula. Error is O(h^4).

Parameters
fFunction whose derivative is calculated.
xValue of independent variable at which derivative is calculated.
hStep size.
static double IG.Num.Numeric.FifthDerivative7Point ( DlgFunctionValue  f,
double  x,
double  h 
)
inlinestatic

Calculates the fifth order derivative of a function with a 7 point formula.

Parameters
fFunction whose derivative is calculated.
xValue of independent variable at which derivative is calculated.
hStep size.
static double IG.Num.Numeric.FifthDerivative9Point ( DlgFunctionValue  f,
double  x,
double  h 
)
inlinestatic

Calculates the fifth order derivative of a function with a 9 point formula.

Parameters
fFunction whose derivative is calculated.
xValue of independent variable at which derivative is calculated.
hStep size.
static void IG.Num.Numeric.TestDifferentiation ( )
inlinestatic

Tests numerical differentiation methods.

References IG.Num.DlgFunctionValue().

static void IG.Num.Numeric.TestIntegration ( )
inlinestatic

Test for numerical integration methods.

References IG.Num.DlgFunctionValue().


The documentation for this class was generated from the following file: