Partial Derivatives of f(x1,x2) (G Dataflow)

Calculates the partial derivatives of a function that contains two independent variables.

number of points

Numbers of values for both variables used in the function calculation.

formula

Formula that defines the function. The formula can contain any number of valid variables.

Entering Valid Variables

This node accepts variables that use the following format rule: variables must start with a letter or an underscore followed by any number of alphanumeric characters or underscores.

start

Start values of the variables in the interval where this node starts calculating values.

This input can contain only two elements. Otherwise, this node returns an error.

Default: [0.00, 0.00]

end

End values of the variables in the interval where this node stops calculating values.

This input can contain only two elements. Otherwise, this node returns an error.

Default: [1.00, 1.00]

variables

Names of the variables.

Variable names must start with a letter or an underscore followed by any number of alphanumeric characters or underscores.

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

derivative

Variable whose partial derivative you want to calculate.

Name Value Description
first variable 0 Calculates the partial derivative of the first variable.
second variable 1 Calculates the partial derivative of the second variable.

Default: first variable

x1 values

Values of the first variable used in the function calculation. The values are equally spaced from start to end.

x2 values

Values of the second variable used in the function calculation. The values are equally spaced from start to end.

partial derivative

Fixed partial derivatives at the defined grid points.

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.

Algorithm for Calculating partial derivative

This node calculates partial derivative using the following equation:

$\mathrm{partial}\text{\hspace{0.17em}}\mathrm{derivative}=\left\{\begin{array}{cc}\frac{\mathrm{df}\left(x1,\text{\hspace{0.17em}}x2\right)}{dx1}& \text{\hspace{0.17em}}\left(\mathrm{if}\text{\hspace{0.17em}}\mathrm{derivative}\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{first}\text{\hspace{0.17em}}\mathrm{variable}\right)\\ \frac{\mathrm{df}\left(x1,\text{\hspace{0.17em}}x2\right)}{dx2}& \left(\mathrm{if}\text{\hspace{0.17em}}\mathrm{derivative}\text{\hspace{0.17em}}\mathrm{is}\text{\hspace{0.17em}}\mathrm{second}\text{\hspace{0.17em}}\mathrm{variable}\right)\end{array}$

To investigate the x1-derivative of function f(x1, x2) = sin(x12 - x2) - cos(sin(x2) - x1) in the interval (-2, 2) by (-2, 2), enter the following values on the panel:

start: [-2, 2]

end: [2, 2]

formula: sin(x1*x1 - x2) - cos(sin(x2) - x1)

derivative: first variable

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices

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