Version:

Last Modified: March 15, 2017

Determines a zero of a function in a given interval using the Ridders' method.

The function must be continuous and must have different signs at the end points of the interval.

Function to calculate. 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 value of the interval where this node starts searching for zeros.

**Default: **0

End value of the interval where this node stops searching for zeros.

**Default: **1

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.

**Default: **No error

Accuracy and maximum iterations used to determine the zeros.

Accuracy used to determine the zeros.

**Default: **1E-8

Maximum number of iterations that the node runs to find the zeros.

**Default: **200

Point of determined zero of **formula**. **zero** is the approximate value of the underlying zero of the function.

Function value at the point given by **zero**. The value should be very close to zero.

Number of evaluations that the formula performs in finding the zeros.

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

**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.

Given the function *f*(*x*) with *f*(*a*) * *f*(*b*) < 0, Ridders' method calculates *c*_{new} using the following equation:

${c}_{\mathrm{new}}=c+(c-a)\frac{\mathrm{sign}\left(f\left(a\right)-f(b))f\right(c)}{\sqrt{{f\left(c\right)}^{2}-f\left(a\right)f(b)}}$

where

*c*_{new}is the new guess to be used in the new iteration*a*and*b*are given values of the variable that satisfy*f*(*a*) **f*(*b*) < 0- $c=\frac{a+b}{2}$

The values **start**, *c*_{new}, and **end** are the base for the new iteration, depending on which of the following inequalities is true:

*f*(**start**) * *f*(*c*_{new}) < 0

*f*(*c*_{new}) * *f*(**end**) < 0

The algorithm stops if |*a* - *b*| < **accuracy**.

**Where This Node Can Run: **

Desktop OS: Windows

FPGA: This product does not support FPGA devices