| IGLib 1.5 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Static Public Member Functions | Static Private Member Functions | List of all members
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
| ) |  |
| inline static

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

Parameters

  f | Function to be integrated.
  from | Lower bound of integration interval.
  to | Upper bound of integration interval.
  numintervals | Number 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
| ) |  |
| inline static

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

  tabx | Table of equidistant points at which function is evaluated.
  tabf | Table 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
| ) |  |
| inline static

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

Parameters

  f | Function to be integrated.
  from | Lower bound of integration interval.
  to | Upper bound of integration interval.
  numintervals | Number 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
| ) |  |
| inline static

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

  tabx | Table of equidistant points at which function is evaluated.
  tabf | Table 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
| ) |  |
| inline static private

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
| ) |  |
| inline static private

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
| ) |  |
| inline static

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

Parameters

  f | Function whose derivative is calculated.
  x | Value of independent variable at which derivative is calculated.
  step | Step size used in differentiation.

Returns
  Derivative approximation.

static double IG.Num.Numeric.DerivativeBD | ( | DlgFunctionValue | f,
|  | double | x,
|  | double | step
| ) |  |
| inline static

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

Parameters

  f | Function whose derivative is calculated.
  x | Value of independent variable at which derivative is calculated.
  step | Step size used in differentiation.

Returns
  Derivative approximation.

static double IG.Num.Numeric.DerivativeCD | ( | DlgFunctionValue | f,
|  | double | x,
|  | double | step
| ) |  |
| inline static

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

Parameters

  f | Function whose derivative is calculated.
  x | Value of independent variable at which derivative is calculated.
  step | Step 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
| ) |  |
| inline static

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

Parameters

  f | Function whose derivative is calculated.
  x | Value of independent variable at which derivative is calculated.
  h | Step size.

static double IG.Num.Numeric.SecondDerivativeCD | ( | DlgFunctionValue | f,
|  | double | x,
|  | double | step
| ) |  |
| inline static

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

Parameters

  f | Function whose derivative is calculated.
  x | Value of independent variable at which derivative is calculated.
  step | Step 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
| ) |  |
| inline static

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

Parameters

  f | Function whose derivative is calculated.
  x | Value of independent variable at which derivative is calculated.
  h | Step size.

static double IG.Num.Numeric.ThirdDerivative4Point | ( | DlgFunctionValue | f,
|  | double | x,
|  | double | h
| ) |  |
| inline static

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

Parameters

  f | Function whose derivative is calculated.
  x | Value of independent variable at which derivative is calculated.
  h | Step size.

static double IG.Num.Numeric.ThirdDerivative6Point | ( | DlgFunctionValue | f,
|  | double | x,
|  | double | h
| ) |  |
| inline static

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

Parameters

  f | Function whose derivative is calculated.
  x | Value of independent variable at which derivative is calculated.
  h | Step size.

static double IG.Num.Numeric.FourthDerivative5Point | ( | DlgFunctionValue | f,
|  | double | x,
|  | double | h
| ) |  |
| inline static

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

Parameters

  f | Function whose derivative is calculated.
  x | Value of independent variable at which derivative is calculated.
  h | Step size.

static double IG.Num.Numeric.FourthDerivative7Point | ( | DlgFunctionValue | f,
|  | double | x,
|  | double | h
| ) |  |
| inline static

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

Parameters

  f | Function whose derivative is calculated.
  x | Value of independent variable at which derivative is calculated.
  h | Step size.

static double IG.Num.Numeric.FifthDerivative7Point | ( | DlgFunctionValue | f,
|  | double | x,
|  | double | h
| ) |  |
| inline static

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

Parameters

  f | Function whose derivative is calculated.
  x | Value of independent variable at which derivative is calculated.
  h | Step size.

static double IG.Num.Numeric.FifthDerivative9Point | ( | DlgFunctionValue | f,
|  | double | x,
|  | double | h
| ) |  |
| inline static

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

Parameters

  f | Function whose derivative is calculated.
  x | Value of independent variable at which derivative is calculated.
  h | Step size.

static void IG.Num.Numeric.TestDifferentiation | ( |  | ) |
| inline static

Tests numerical differentiation methods.

References IG.Num.DlgFunctionValue().

static void IG.Num.Numeric.TestIntegration | ( |  | ) |
| inline static

Test for numerical integration methods.

References IG.Num.DlgFunctionValue().

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

- igbase/numeric/FunctionNumeric.cs