WOLFRAM

gives True if basic symbolic and numerical methods suggest that expr has value zero, and gives False otherwise.

Details and Options

  • The general problem of determining whether an expression has value zero is undecidable; PossibleZeroQ provides a quick but not always accurate test.
  • With the setting Method->"ExactAlgebraics", PossibleZeroQ will use exact guaranteed methods in the case of explicit algebraic numbers.

Examples

open allclose all

Basic Examples  (1)Summary of the most common use cases

Test whether a numeric expression is zero:

Out[1]=1

Test whether a symbolic expression is likely to be identically zero:

Out[2]=2

Scope  (4)Survey of the scope of standard use cases

Show that a numeric expression is zero:

Out[1]=1

Show that a numeric expression is nonzero:

Out[1]=1

Decide that a numeric expression is zero based on approximate computations:

Out[1]=1

Test whether symbolic expressions are likely to be identically zero:

Out[1]=1
Out[2]=2

Options  (2)Common values & functionality for each option

Assumptions  (1)

For arbitrary complex x, f is not identically zero:

Out[2]=2

When Re[x]>0, f is identically zero:

Out[3]=3

Method  (1)

By default, numeric approximations may be used to decide that an algebraic number is zero:

Out[1]=1
Out[2]=2

Approximate methods may give incorrect positive answers:

Out[3]=3

With Method->"ExactAlgebraics" exact methods are used for explicit algebraic numbers:

Out[4]=4

For explicit algebraic numbers the answer is provably correct:

Out[5]=5

Applications  (1)Sample problems that can be solved with this function

Solving polynomial equations requires deciding whether coefficients are zero:

Out[2]=2

Wolfram Language equation solvers use zero testing automatically:

Out[3]=3

Properties & Relations  (1)Properties of the function, and connections to other functions

SameQ[e,0] returns True only if e is explicitly identical to zero:

Out[2]=2

Equal[e,0] uses simple tests to decide whether e is zero:

Out[3]=3

When Equal cannot decide whether an expression is zero it returns unchanged:

Out[5]=5

PossibleZeroQ uses numeric methods to test whether ee is zero:

Out[6]=6

FullSimplify proves symbolically that ee is zero:

Out[7]=7

Possible Issues  (1)Common pitfalls and unexpected behavior

PossibleZeroQ may return True for nonzero numeric expressions that are close to zero:

Out[1]=1
Out[2]=2
Out[3]=3
Wolfram Research (2007), PossibleZeroQ, Wolfram Language function, https://reference.wolfram.com/language/ref/PossibleZeroQ.html.
Wolfram Research (2007), PossibleZeroQ, Wolfram Language function, https://reference.wolfram.com/language/ref/PossibleZeroQ.html.

Text

Wolfram Research (2007), PossibleZeroQ, Wolfram Language function, https://reference.wolfram.com/language/ref/PossibleZeroQ.html.

Wolfram Research (2007), PossibleZeroQ, Wolfram Language function, https://reference.wolfram.com/language/ref/PossibleZeroQ.html.

CMS

Wolfram Language. 2007. "PossibleZeroQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PossibleZeroQ.html.

Wolfram Language. 2007. "PossibleZeroQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PossibleZeroQ.html.

APA

Wolfram Language. (2007). PossibleZeroQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PossibleZeroQ.html

Wolfram Language. (2007). PossibleZeroQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PossibleZeroQ.html

BibTeX

@misc{reference.wolfram_2025_possiblezeroq, author="Wolfram Research", title="{PossibleZeroQ}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/PossibleZeroQ.html}", note=[Accessed: 07-May-2025 ]}

@misc{reference.wolfram_2025_possiblezeroq, author="Wolfram Research", title="{PossibleZeroQ}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/PossibleZeroQ.html}", note=[Accessed: 07-May-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_possiblezeroq, organization={Wolfram Research}, title={PossibleZeroQ}, year={2007}, url={https://reference.wolfram.com/language/ref/PossibleZeroQ.html}, note=[Accessed: 07-May-2025 ]}

@online{reference.wolfram_2025_possiblezeroq, organization={Wolfram Research}, title={PossibleZeroQ}, year={2007}, url={https://reference.wolfram.com/language/ref/PossibleZeroQ.html}, note=[Accessed: 07-May-2025 ]}