Revision history [back]

Returning only one root in a given interval is not a limitation of Sage, per se. Without any sort of "insight" into the given function, the number of roots, whether there are an infinite number of roots, or the approximate locations of the roots are all unknown.

In practice, one must have some understanding the behavior of the function in order to use numerical methods to find all roots.

In the given case $f(x) = \tanh(a \cdot x) - x$:

• If $a \leq 1$, then the only root of $f(x)$ is $x = 0$.

• If $a > 1$, then there are three distinct roots: $0$, $r$ and $-r$. Numerical evidence suggests that $0 < r < 1$.

Returning only one root in a given interval is not a limitation of Sage, per se. Without any sort of "insight" into the given function, the number of roots, whether there are an infinite number of roots, or the approximate locations of the roots are all unknown.

In practice, one must have some understanding the behavior of the function in order to use numerical methods to find all roots.

In the given case $f(x) = \tanh(a \cdot x) - x$:

• If $a \leq 1$, then the only root of $f(x)$ is $x = 0$.

• If $a > 1$, then there are three distinct roots: $0$, $r$ $r$, and $-r$. Numerical evidence suggests that $0 < r < 1$.

Returning only one root in a given interval is not a limitation of Sage, per se. Without any sort of "insight" into the given function, the number of roots, whether there are an infinite number of roots, or the approximate locations of the roots are all unknown.

In practice, one must have some understanding the behavior of the function in order to use numerical methods to find all roots.

In the given case $f(x) = \tanh(a \cdot x) - x$:

• If $a \leq 1$, then the only root of $f(x)$ is $x = 0$.

• If $a > 1$, then there are three distinct roots: $0$, $r$, and $-r$. Numerical evidence suggests It can be shown that $0 < r < 1$.

Returning only one root in a given interval is not a limitation of Sage, per se. Without any sort of "insight" into the given function, the number of roots, whether there are an infinite number of roots, or the approximate locations of the roots are all unknown.impossible to determine.

In practice, one must have some understanding the behavior of the function in order to use numerical methods to find all roots.

In the given case $f(x) = \tanh(a \cdot x) - x$:

• If $a \leq 1$, then the only root of $f(x)$ is $x = 0$.

• If $a > 1$, then there are three distinct roots: $0$, $r$, and $-r$. It can be shown that $0 < r < 1$.