is an option to Solve and related functions that controls whether to verify solutions.
VerifySolutions
is an option to Solve and related functions that controls whether to verify solutions.
Details
- VerifySolutions controls whether the solutions obtained using non-equivalent transformations or numerical methods should be verified.
- Possible settings include:
-
Automatic automatically determine whether to verify True attempt to verify False do not verify
Examples
open all close allBasic Examples (1)
Solve[Sqrt[x] + x == -2, x, VerifySolutions -> False]Use VerifySolutions to check if they are solutions or not:
Solve[Sqrt[x] + x == -2, x, VerifySolutions -> True]x^1 / 2 + x == -2 /. x -> (1/2)(-3 - ISqrt[7])Scope (4)
Solve verifies solutions obtained using non-equivalent transformations:
eqns = Sqrt[x + Sqrt[x]] == 2 && y ^ 9 - y - 2x ^ (1 / 7) == 3;sol1 = Solve[eqns, {x, y}];//TimingWith VerifySolutions False, Solve does not verify the solutions:
sol2 = Solve[eqns, {x, y}, VerifySolutions -> False];//TimingSome of the solutions returned with VerifySolutions False are not correct:
Length /@ {sol1, sol2}Use a fast numeric test in an attempt to select correct solutions:
sol3 = Select[sol2, TrueQ[eqns /. N[#, 20]]&];//TimingIn this case, numeric verification gives the correct solution set:
sol3 === sol1Reduce returns only the correct solutions:
Reduce[eqns, {x, y}]Length[%]Solve an equation symbolically without verifying the solution:
solns = Solve[Sqrt[x] + x == -2, x, VerifySolutions -> False]This can yield solutions that are not mathematically valid:
Table[Sqrt[x] + x == -2 /. soln, {soln, solns}]Solve the same equation numerically:
nsolns = NSolve[Sqrt[x] + x == -2, x, VerifySolutions -> False]Note the unverified solutions do not satisfy the given equation:
Table[Sqrt[x] + x == -2 /. soln, {soln, nsolns}]Verifying the solution discards the invalid result, returning an empty list indicating there are no solutions:
Solve[Sqrt[x] + x == -2, x, VerifySolutions -> True]NSolve[Sqrt[x] + x == -2, x, VerifySolutions -> True]Using Automatic solution verification attempts to detect and discard possibly invalid results:
Solve[Sqrt[x] + x == -2, x, VerifySolutions -> Automatic]NSolve[Sqrt[x] + x == -2, x, VerifySolutions -> Automatic]Properties & Relations (1)
History
Introduced in 1988 (1.0)
Text
Wolfram Research (1988), VerifySolutions, Wolfram Language function, https://reference.wolfram.com/language/ref/VerifySolutions.html.
CMS
Wolfram Language. 1988. "VerifySolutions." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/VerifySolutions.html.
APA
Wolfram Language. (1988). VerifySolutions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VerifySolutions.html
BibTeX
@misc{reference.wolfram_2026_verifysolutions, author="Wolfram Research", title="{VerifySolutions}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/VerifySolutions.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_verifysolutions, organization={Wolfram Research}, title={VerifySolutions}, year={1988}, url={https://reference.wolfram.com/language/ref/VerifySolutions.html}, note=[Accessed: 13-June-2026]}