# Numeric Integration (G Dataflow)

Performs numeric integration on the input data using a specific numeric integration method.

The data values you wire to this node must be evenly spaced. If the data values are not evenly spaced, use the Uneven Numeric Integration node to compute the integral.  ## f(x)

Data to integrate.

This input accepts the following data types:

• 1D array of double-precision, floating-point numbers
• 2D array of double-precision, floating-point numbers
• 3D array of double-precision, floating-point numbers

This input changes to f(x,y) when the data type is a 2D array of double-precision, floating-point numbers.

This input changes to f(x,y,z) when the data type is a 3D array of double-precision, floating-point numbers. ## f(x,y)

Data to integrate.

This input accepts the following data types:

• 1D array of double-precision, floating-point numbers
• 2D array of double-precision, floating-point numbers
• 3D array of double-precision, floating-point numbers

This input changes to f(x) when the data type is a 1D array of double-precision, floating-point numbers.

This input changes to f(x,y,z) when the data type is a 3D array of double-precision, floating-point numbers. ## f(x,y,z)

Data to integrate.

This input accepts the following data types:

• 1D array of double-precision, floating-point numbers
• 2D array of double-precision, floating-point numbers
• 3D array of double-precision, floating-point numbers

This input changes to f(x) when the data type is a 1D array of double-precision, floating-point numbers.

This input changes to f(x,y) when the data type is a 2D array of double-precision, floating-point numbers. ## integration method

Method to use to perform the numeric integration.

Name Value Description
Trapezoidal Rule 0 Uses the trapezoidal rule defined by the following equation:

Let x(t) be a function of t and t1 - t0 = dt, then

${\int }_{{t}_{0}}^{{t}_{1}}x\left(t\right)dt\approx \frac{dt}{2}\left(x\left({t}_{0}\right)+x\left({t}_{1}\right)\right)$
Simpson's Rule 1 Uses the Simpson's rule defined by the following equation:

Let x(t) be a function of t and t1 - t0 = t2 - t1 = dt, then

${\int }_{{t}_{0}}^{{t}_{2}}x\left(t\right)dt\approx \frac{dt}{3}\left(x\left({t}_{0}\right)+4x\left({t}_{1}\right)+x\left({t}_{2}\right)\right)$
Simpson's 3/8 Rule 2 Uses the Simpson's 3/8 rule defined by the following equation:

Let x(t) be a function of t and t1 - t0 = t2 - t1 = t3 - t2 = dt, then

${\int }_{{t}_{0}}^{{t}_{3}}x\left(t\right)dt\approx \frac{3dt}{8}\left(x\left({t}_{0}\right)+3x\left({t}_{1}\right)+3x\left({t}_{2}\right)+x\left({t}_{3}\right)\right)$
Boole's Rule 3 Uses the Boole's rule defined by the following equation:

Let x(t) be a function of t and t1 - t0 = t2 - t1 = t3 - t2 = t4 - t3 = dt, then

${\int }_{{t}_{0}}^{{t}_{4}}x\left(t\right)dt\approx \frac{2dt}{45}\left(7x\left({t}_{0}\right)+32x\left({t}_{1}\right)+12x\left({t}_{2}\right)+32x\left({t}_{3}\right)+7x\left({t}_{4}\right)\right)$

Default: Trapezoidal Rule ## error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error  If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error ## dx

Interval size, which represents the sampling step size used in obtaining the input data from the function.

If the interval size is negative, this node uses its absolute value.

This input is available only if you wire a 1D array of double-precision floating-point numbers to f(x).

Default: 1 ## interval size

Interval size of the integration variables.

This input is available only if you wire a 2D array of double-precision, floating-point numbers to f(x,y) or a 3D array of double-precision, floating-point numbers to f(x,y,z). ### dx

Interval size of the integration variable x.

Default: 1 ### dy

Interval size of the integration variable y.

Default: 1 ### dz

Interval size of the integration variable z.

This input is available only if you wire a 3D array of double-precision, floating-point numbers to f(x,y,z).

Default: 1 ## integral

Numeric integral. ## error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error  If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application