CountRoots
CountRoots[f,x]
gives the number of real roots of the univariate function f in x.
CountRoots[f,{x,a,b}]
gives the number of roots between a and b.
Details
Examples
open allclose allBasic Examples (4)
Scope (20)
Basic Uses (8)
Find the number of the real roots:
Count roots in a real interval:
Count roots in a closed rectangle:
Count roots in a vertical line segment:
Count roots in a horizontal line segment:
Multiple roots are counted with their multiplicities:
For a root of multiplicity , all the derivatives for also vanish:
Real Elementary Functions (6)
Count the real roots of a high-degree polynomial:
Find the number of non-negative roots of an algebraic function involving high-degree radicals:
Count the non-negative roots of a function involving irrational real powers:
Count the real roots of a real exp-log function:
Count the real roots of a tame real elementary function:
This shows the plot of the function:
Count roots of a real elementary function in a bounded interval:
Holomorphic Functions (3)
Meromorphic Functions (3)
Count roots of a meromorphic elementary function in a closed rectangle:
Visualize roots and poles of the function:
Count roots of a meromorphic special function in a closed rectangle:
Visualize roots and poles of the function:
Find the number of roots of a meromorphic function in a bounded real interval:
Applications (4)
The number of 17 roots of unity in the closed unit square in the first quadrant:
Roots on the boundary are counted:
Check that a function has exactly one root in an interval:
Use FindRoot to approximate the root:
Compute a contour integral of logarithmic derivative of a function using the formula , where is the number of roots for a holomorphic function :
Compare with the result of numeric integration:
Test stability of equilibria at 0 of linear dynamical systems by counting the roots of the CharacteristicPolynomial[m,x] in the right half-plane:
Use a bound for max absolute value of the roots:
Count the roots in the right half-plane:
Since all eigenvalues of m have negative real parts, the equilibrium is asymptotically stable:
Properties & Relations (5)
The number of complex roots of a polynomial is equal to its degree:
This gives a bound on absolute values of roots of a polynomial:
The polynomial indeed has 10 roots within the Cauchy bounded region:
The number of real roots of a polynomial with nonzero terms is at most :
This polynomial has the maximal possible number of real roots:
Use Reduce to find polynomial roots:
Use RootIntervals to find isolating intervals for roots:
Use NumberFieldSignature to count the real roots and the pairs of complex roots of a polynomial:
Text
Wolfram Research (2007), CountRoots, Wolfram Language function, https://reference.wolfram.com/language/ref/CountRoots.html (updated 2017).
CMS
Wolfram Language. 2007. "CountRoots." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/CountRoots.html.
APA
Wolfram Language. (2007). CountRoots. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CountRoots.html