# Solve

Solve[equation, vars]
attempts to solve equation for the variables vars.
Solve[equation, vars, domain]
restricts variables to domain, which can be Complexes or Reals.

• Solve[x ^ 2 - 3 x == 4, x]

• Solve[4 y - 8 == 0, y]

Apply the solution:

• sol = Solve[2 x^2 - 10 x - 12 == 0, x]

• x /. sol

• Solve[x + 1 == x, x]

Tautology:

• Solve[x ^ 2 == x ^ 2, x]

Rational equations:

• Solve[x / (x ^ 2 + 1) == 1, x]

• Solve[(x^2 + 3 x + 2)/(4 x - 2) == 0, x]

Transcendental equations:

• Solve[Cos[x] == 0, x]

Solve can only solve equations with respect to symbols or functions:

• Solve[f[x + y] == 3, f[x + y]]

• Solve[a + b == 2, a + b]

This happens when solving with respect to an assigned symbol:

• x = 3;

• Solve[x == 2, x]

• Clear[x]

• Solve[a < b, a]

Solve a system of equations:

• eqs = {3 x ^ 2 - 3 y == 0, 3 y ^ 2 - 3 x == 0};

• sol = Solve[eqs, {x, y}]

• eqs /. sol // Simplify

An underdetermined system:

• Solve[x^2 == 1 && z^2 == -1, {x, y, z}]

Domain specification:

• Solve[x^2 == -1, x, Reals]

• Solve[x^2 == 1, x, Reals]

• Solve[x^2 == -1, x, Complexes]