# Special Polynomials (Legendre) (G Dataflow)

Evaluates the Legendre polynomial of a given degree and order.  ## x

Real number between -1 and 1.

Default: 0 ## degree

Degree of the Legendre polynomial. degree must be nonnegative.

Default: 0 ## order

Order of the Legendre polynomial. order must be nonnegative and less than or equal to degree.

Default: 0 ## type

Type of Legendre polynomial.

Name Value Description
Standard 0 Computes the associated Legendre function.
Semi-Normalized 1 Computes the semi-normalized Legendre function.
Normalized 2 Computes the normalized associated Legendre function.

Default: Standard ## 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 ## Legendre polynomial

Value of the associated Legendre polynomial of degree and order at point x. ## 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 Evaluating the Legendre Polynomial

The associated Legendre polynomial of degree n and order m is the solution of the following associated Legendre differential equation.

$\left(1-{x}^{2}\right)\frac{{d}^{2}y}{d{x}^{2}}-2x\frac{dy}{dx}+\left[\left(n+1\right)n-\frac{{m}^{2}}{1-{x}^{2}}\right]y=0$

where

• x is a real number between -1 and 1
• y is the associated Legendre polynomial of degree n and order m at point x
• m is the order of the Legendre polynomial
• n is the degree of the Legendre polynomial

The following graph shows the associated Legendre polynomials of degree n = 3 and order m = 0, 1, 2, 3. Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

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