Skip to content

Solve ​

The list of solutions of an equation, or a system of equations, for its unknown(s).

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageSolve!
Solve(equation, unknown)solves equation (an Equal, or a bare expression read as = 0) for unknown.
Solve(equation)as above; the unknown defaults to the equation's single free variable, or to x when there are several and one of them is x.
Solve([eq1, eq2, …], [x, y, …])solves a system of equations; each solution is a tuple of values in the order of the variable list.
Solve(equation, unknown?)The list of solutions of an equation, or a system of equations, for its unknown(s).
Typed signatures
TypePackageApplies
(any, any*) -> listanalyticreplaces evaluationalways
(any, any*) -> listcompute-enginealways
(any, any*) -> listevaluationreplaces compute-enginealways

Domain: Compute engine

Examples

3 more kept as data, checked against the oracles
Basic #

Solve x2=1x^2 = 1 for xx

live ↗
InSolve(x2=1,x)\mathrm{Solve}(x^2=1, x)Out[1,−1]\bigl\lbrack1, -1\bigr\rbrack

Solve x2−4x^2 - 4; a bare expression reads as =0= 0

live ↗
InSolve(x2−4,x)\mathrm{Solve}(x^2-4, x)Out[2,−2]\bigl\lbrack2, -2\bigr\rbrack

Solve x+1=0x + 1 = 0, a single real root

live ↗
InSolve(x+1=0,x)\mathrm{Solve}(x+1=0, x)Out[−1]\bigl\lbrack-1\bigr\rbrack
live ↗
InSolve(x2+ax+1=0,x)\mathrm{Solve}(x^2+ax+1=0, x)Out[12(a2−4−a),12(−a−a2−4)]\bigl\lbrack\frac{1}{2}(\sqrt{a^2-4}-a), \frac{1}{2}(-a-\sqrt{a^2-4})\bigr\rbrack
live ↗
InSolve((x2+2)(x2−2)=0,x∈R)\mathrm{Solve}((x^2+2)(x^2-2)=0, x∈ℝ)Out[−2,2]\bigl\lbrack-\sqrt{2}, \sqrt{2}\bigr\rbrack
Scope #

Solve x2+1=0x^2 + 1 = 0; yields complex roots

live ↗
InSolve(x2+1=0,x)\mathrm{Solve}(x^2+1=0, x)Out[i,−i]\bigl\lbrack i, -i\bigr\rbrack

Contradictory equations have no solution: an empty list

live ↗
InSolve(x=1∧x=2,x)\mathrm{Solve}(x=1∧x=2, x)Out[]\bigl\lbrack\bigr\rbrack
live ↗
InSolve(ax2+bx+c=0,x)\mathrm{Solve}(ax^2+bx+c=0, x)Out[b2−4ac−b2a,−b−b2−4ac2a]\bigl\lbrack\frac{\sqrt{b^2-4ac}-b}{2a}, \frac{-b-\sqrt{b^2-4ac}}{2a}\bigr\rbrack
live ↗
InSolve((x4−1)(x4−4)=0,x∈C)\mathrm{Solve}((x^4-1)(x^4-4)=0, x∈ℂ)Out[−2,−1,1,2,2i,i,−i,−2i]\bigl\lbrack-\sqrt{2}, -1, 1, \sqrt{2}, \sqrt{2}i, i, -i, -\sqrt{2}i\bigr\rbrack
live ↗
InSolve((x4−1)(x4−4)=0,x∈R)\mathrm{Solve}((x^4-1)(x^4-4)=0, x∈ℝ)Out[−2,−1,1,2]\bigl\lbrack-\sqrt{2}, -1, 1, \sqrt{2}\bigr\rbrack
live ↗
InSolve((x4−1)(x4−4)=0,x∈Z)\mathrm{Solve}((x^4-1)(x^4-4)=0, x∈ℤ)Out[−1,1]\bigl\lbrack-1, 1\bigr\rbrack

Over the reals, x2=ax^2 = a has roots only for a≥0a \ge 0; with aa unknown the call stays unevaluated

live ↗
InSolve(x2=a,x∈R)\mathrm{Solve}(x^2=a, x∈ℝ)OutSolve(x2=a,x∈R)\mathrm{Solve}(x^2=a, x∈ℝ)
live ↗
InSolve(x4−x2−5=0,x)\mathrm{Solve}(x^4-x^2-5=0, x)Out[−12+211/22,12+212,12−211/22,−1/2−211/2/2]\bigl\lbrack-\sqrt{\frac{1}{2}+\frac{21^{1/2}}{2}}, \sqrt{\frac{1}{2}+\frac{\sqrt{21}}{2}}, \sqrt{\frac{1}{2}-\frac{21^{1/2}}{2}}, -\sqrt{1/2-21^{1/2}/2}\bigr\rbrack
live ↗
InSolve((x2−1)(x4−1)=0,x)\mathrm{Solve}((x^2-1)(x^4-1)=0, x)Out[−1,1,i,−i]\bigl\lbrack-1, 1, i, -i\bigr\rbrack
live ↗
InSolve(ax5+bx+c=0,x)\mathrm{Solve}(ax^5+bx+c=0, x)OutSolve(ax5+bx+c=0,x)\mathrm{Solve}(ax^5+bx+c=0, x)
live ↗
InSolve(sin⁡(x)=13,x)\mathrm{Solve}(\sin(x)=\frac{1}{3}, x)OutSolve(sin⁡(x)=13,x)\mathrm{Solve}(\sin(x)=\frac{1}{3}, x)
live ↗
InSolve(x2a+2xa+1=0,x)\mathrm{Solve}(x^{2a}+2x^{a}+1=0, x)OutSolve(x2a+2xa+1=0,x)\mathrm{Solve}(x^{2a}+2x^{a}+1=0, x)
live ↗
InSolve((x5−1)x=0,x)\mathrm{Solve}((x^5-1)^{x}=0, x)OutSolve((x5−1)x=0,x)\mathrm{Solve}((x^5-1)^{x}=0, x)
live ↗
InSolve(5=x×2x2,x)\mathrm{Solve}(5=x×2^{x^2}, x)OutSolve(5=x×2x2,x)\mathrm{Solve}(5=x×2^{x^2}, x)
live ↗
InSolve(Γ(x)−ln⁡(x)=i2∧∣x−2∣<32,x)\mathrm{Solve}(Γ(x)-\ln(x)=\frac{i}{2}∧\vert x-2\vert\lt\frac{3}{2}, x)OutSolve(Γ(x)−ln⁡(x)=i2∧∣x−2∣<32,x)\mathrm{Solve}(Γ(x)-\ln(x)=\frac{i}{2}∧\vert x-2\vert\lt\frac{3}{2}, x)
live ↗
InSolve(x=e1/x∧∣x∣<5,x)\mathrm{Solve}(x=e^{1/x}∧\vert x\vert\lt5, x)OutSolve(x=e1/x∧∣x∣<5,x)\mathrm{Solve}(x=e^{1/x}∧\vert x\vert\lt5, x)
live ↗
InSolve(cos⁡(ex)=3e−x+1∧0≤Re(x)≤1,x)\mathrm{Solve}(\cos(e^{x})=3e^{-x}+1∧0≤\mathrm{Re}(x)≤1, x)OutSolve(cos⁡(ex)=3e−x+1∧0≤Re(x)≤1,x)\mathrm{Solve}(\cos(e^{x})=3e^{-x}+1∧0≤\mathrm{Re}(x)≤1, x)
live ↗
InSolve({x+2y+3z=43x+4y+5z=67x+7y+8z=9,x,y,z)\mathrm{Solve}(\begin{cases}x+2y+3z=4\\3x+4y+5z=6\\7x+7y+8z=9\end{cases}, x, y, z)Out[(0,−1,2)]\bigl\lbrack(0,-1,2)\bigr\rbrack
Applications #

A 2x2 linear system; each solution is a tuple of (x,y)(x, y)

live ↗
InSolve({x+y=3x−y=1,[x,y])\mathrm{Solve}(\begin{cases}x+y=3\\x-y=1\end{cases}, \bigl\lbrack x, y\bigr\rbrack)Out[(2,1)]\bigl\lbrack(2,1)\bigr\rbrack
About
Examples28
Checked againstWolfram Language 17 agree11 differ
CrosswalkWolfram Language

See also: Root, D