Table Of Contents

Polynomial Real Zeros Counter (G Dataflow)

Last Modified: December 18, 2017

Calculates the number of zeros of a real polynomial in a real interval. This node does not determine the values of the zeros.

connector_pane_image
datatype_icon

p(x)

Real polynomial. The first element of the array relates to the constant coefficient of the polynomial.

datatype_icon

start

Leftmost point of the real interval. start must be less than or equal to end.

Default: 0

datatype_icon

end

Rightmost point of the real interval.

Default: 0

datatype_icon

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

datatype_icon

number of zeros

Number of zeros of the real polynomial in the interval.

datatype_icon

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 the Number of Zeros of a Real Polynomial

This node uses the Sturm algorithm to calculate the number of zeros. Let p(x) be a real polynomial in x and let p'(x) be the derivative of p(x). If d(x) denotes the greatest common divisor (GCD) of p(x) and p'(x), such that

d(x) = gcd(p(x), p'(x))

Then p(x) has multiple zeros, if d(x) is a nonconstant polynomial. In other words, the polynomial p(x)/d(x) has only single zeros.

Repeating this idea, you can combine p(x) as the product of simple polynomials, each of which has single real zeros. The number of zeros of p(x) is equal to the sum of all zeros of the defined simple polynomials that have only single zeros.

How to Determine the Zeros of a Real Polynomial

To determine the number of zeros of a real polynomial p(x) with the single zero property, use the following Euclidean algorithm:

p ( x ) = q 1 ( x ) p 1 ( x ) p 2 ( x ) p 1 ( x ) = q 2 ( x ) p 2 ( x ) p 3 ( x ) p r 2 ( x ) = q r 1 ( x ) p r 1 ( x ) p r ( x )

The Sturm's chain (p(x), p1(x), ..., pr(x)) determines the two values W(start) and W(end), where W(x) is the number of sign changes of the Sturm's chain.

The number of all zeros of p(x) is exactly equal to W(end) - W(start).

How to Determine All Real Zeros of a Real Polynomial

To determine all real zeroes of a real polynomial, choose start and end that satisfies the following conditions:

start = max { ( | a 0 | + + | a n 1 | ) | a n | , 1 }
e n d = max { ( | a 0 | + + | a n 1 | ) | a n | , 1 }

where a0, a1, ..., an are the elements of the polynomial.

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


Recently Viewed Topics