Qurak

Solve

Disponible

Symbolic equation solver.

`Solve` is reliable on polynomial and rational equations. Equations mixing a variable with its own exponential or logarithm are where it goes wrong, and it goes wrong quietly - the answer has the shape of a solution set and is simply not one: ```wolfram Solve[x + E^x == 1, x] (* {{x -> 1}}, but 1 + E^1 - 1 is E, not 0 *) (x + E^x - 1) /. x -> 0 (* 0 - the actual solution, which is not returned *) Solve[I^w == w, w] (* {{w -> 0}}, though I^0 is 1 *) ``` Both failure directions are present: a returned value that solves nothing, and a real solution missing from the set. Nothing in the result distinguishes either case from a correct answer. Check every solution before relying on it, by substituting into the residual rather than into the equation (see `Equal` for why the `==` form is not trustworthy here): ```wolfram sol = Solve[x^2 == x + 1, x]; Simplify[(x^2 - (x + 1)) /. sol] (* {0, 0} - both solutions hold *) ``` A non-zero residual means the value is not a solution. A residual that will not simplify to anything definite means the check was inconclusive, not that the answer is wrong. When `Solve` returns nothing usable for a transcendental equation, `FindRoot` from a starting point is the reliable route to a numeric root.

Vérifiable indépendamment : une réponse de cette fonction est redérivée par une autre voie puis comparée - l'atelier et l'outil verify le font automatiquement, de sorte qu'une réponse fausse est détectée plutôt que crue. Historique →

Solve[expr, vars]
Solve[expr, vars, dom]
Solve[x^2 == 4, x] → {{x -> -2}, {x -> 2}}Solve[{x + y == 3, x - y == 1}, {x, y}] → {{x -> 2, y -> 1}}Solve[2 - x^2 == 0, x] → {{x -> -Sqrt[2]}, {x -> Sqrt[2]}}Solve[6 - x - x^2 == 0, x] → {{x -> -3}, {x -> 2}}Solve[x^3 == 8, x] → {{x -> 2}, {x -> -2*(-1)^(1/3)}, {x -> 2*(-1)^(2/3)}}Solve[x^3 == 2, x] → {{x -> -(-2)^(1/3)}, {x -> 2^(1/3)}, {x -> (-1)^(2/3)*2^(1/3)}}Solve[x^3 == -8, x] → {{x -> -2}, {x -> 2*(-1)^(1/3)}, {x -> -2*(-1)^(2/3)}}NSolve[x^3 == 8, x] → {{x -> -1. - 1.7320508075688772*I}, {x -> -1. + 1.7320508075688772*I}, {x -> 2.}}Solve[Abs[x] == 2, x] → Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. {{x -> -2}, {x -> 2}}Solve[Abs[x] == 2, x, Reals] → {{x -> -2}, {x -> 2}}Solve[{Abs[x] == 2, x > 0}, x] → {{x -> 2}}Solve[{Sin[x] == 0, 0 < x < 7}, x] → {{x -> Pi}, {x -> 2*Pi}}

Utilisé dans

Thèmes

Connexes

Les 6300 fonctions · Utiliser ceci depuis un client MCP