Generic and Non-Generic Solutions

If you have an equation like 2x==0, it is perfectly clear that the only possible solution is x->0. However, if you have an equation like ax==0, things are not so clear. If a is not equal to zero, then x->0 is again the only solution. However, if a is in fact equal to zero, then any value of x is a solution. You can see this by using (RefLink[Reduce, paclet:ref/Reduce]).

(RefLink[Solve, paclet:ref/Solve]) implicitly assumes that the parameter a does not have the special value 0:

Solve[a x==0,x]

(RefLink[Reduce, paclet:ref/Reduce]), on the other hand, gives you all the possibilities, without assuming anything about the value of a:

Reduce[a x==0,x]

A basic difference between (RefLink[Reduce, paclet:ref/Reduce]) and (RefLink[Solve, paclet:ref/Solve]) is that (RefLink[Reduce, paclet:ref/Reduce]) gives all the possible solutions to a set of equations, while (RefLink[Solve, paclet:ref/Solve]) gives only the generic ones. Solutions are considered "generic" if they involve conditions only on the variables that you explicitly solve for, and not on other parameters in the equations. (RefLink[Reduce, paclet:ref/Reduce]) and (RefLink[Solve, paclet:ref/Solve]) also differ in that (RefLink[Reduce, paclet:ref/Reduce]) always returns combinations of equations, while (RefLink[Solve, paclet:ref/Solve]) gives results in the form of transformation rules.

Solving equations.

This is the solution to an arbitrary linear equation given by (RefLink[Solve, paclet:ref/Solve]):

Solve[a x+b==0,x]

(RefLink[Reduce, paclet:ref/Reduce]) gives the full version, which includes the possibility a==b==0. In reading the output, note that && has higher precedence than ||:

Reduce[a x+b==0,x]

Here is the full solution to a general quadratic equation. There are three alternatives. If a is nonzero, then there are two solutions for x, given by the standard quadratic formula. If a is zero, however, the equation reduces to a linear one. Finally, if a, b, and c are all zero, there is no restriction on x:

Reduce[a x^2+b x+c==0,x]

When you have several simultaneous equations, (RefLink[Reduce, paclet:ref/Reduce]) can show you under what conditions the equations have solutions. (RefLink[Solve, paclet:ref/Solve]) shows you whether there are any generic solutions.

This shows there can never be any solution to these equations:

Reduce[{x==1,x==2},x]

There is a solution to these equations, but only when a has the special value 1:

Reduce[{x==1,x==a},x]

The solution is not generic, and is rejected by (RefLink[Solve, paclet:ref/Solve]):

Solve[{x==1,x==a},x]

But if a is constrained to have value 1, then (RefLink[Solve, paclet:ref/Solve]) again returns a solution:

Solve[{x==1,x==a,a==1},x]

This equation is true for any value of x:

Reduce[x==x,x]

This is the kind of result (RefLink[Solve, paclet:ref/Solve]) returns when you give an equation that is always true:

Solve[x==x,x]

When you work with systems of linear equations, you can use (RefLink[Solve, paclet:ref/Solve]) to get generic solutions, and (RefLink[Reduce, paclet:ref/Reduce]) to find out for what values of parameters solutions exist.

Here is a matrix whose i,j(^th) element is i+j:

m=Table[i+j,{i,3},{j,3}]

The matrix has determinant zero:

Det[m]

This makes a set of three simultaneous equations:

eqn=m.{x,y,z}=={a,b,c}

(RefLink[Solve, paclet:ref/Solve]) reports that there are no generic solutions:

Solve[eqn,{x,y,z}]

(RefLink[Reduce, paclet:ref/Reduce]), however, shows that there would be a solution if the parameters satisfied the special condition a==2b-c:

Reduce[eqn,{x,y,z}]

For nonlinear equations, the conditions for the existence of solutions can be much more complicated.

Here is a very simple pair of nonlinear equations:

eqn={x y==a,x^2 y^2==b}

(RefLink[Solve, paclet:ref/Solve]) shows that the equations have no generic solutions:

Solve[eqn,{x,y}]

(RefLink[Reduce, paclet:ref/Reduce]) gives the complete conditions for a solution to exist:

Reduce[eqn,{x,y}]