This is documentation for Mathematica 4, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
Wolfram Research, Inc.

Advanced Topic: Existence of SolutionsSolving Equations with Subsidiary Conditions

3.4.8 Eliminating Variables

When you write down a set of simultaneous equations in Mathematica, you are specifying a collection of constraints between variables. When you use Solve, you are finding values for some of the variables in terms of others, subject to the constraints represented by the equations.

Eliminating variables.

Here are two equations involving x, y and the "parameter" a.

In[1]:= eqn = {x == 1 + 2 a, y == 9 + 2 x}


If you solve for both x and y, you get results in terms of a.

In[2]:= Solve[eqn, {x, y}]


Similarly, if you solve for x and a, you get results in terms of y.

In[3]:= Solve[eqn, {x, a}]


If you only want to solve for x, however, you have to specify whether you want to eliminate y or a. This eliminates y, and so gives the result in terms of a.

In[4]:= Solve[eqn, x, y]


If you eliminate a, then you get a result in terms of y.

In[5]:= Solve[eqn, x, a]


In some cases, you may want to construct explicitly equations in which variables have been eliminated. You can do this using Eliminate.

This combines the two equations in the list eqn, by eliminating the variable a.

In[6]:= Eliminate[eqn, a]


This is what you get if you eliminate y instead of a.

In[7]:= Eliminate[eqn, y]


As a more sophisticated example of Eliminate, consider the problem of writing in terms of the "symmetric polynomials" and .

To solve the problem, we simply have to write f in terms of a and b, eliminating the original variables x and y.

In[8]:= Eliminate[ {f == x^5 + y^5, a == x + y, b == x y},

{x, y} ]


Advanced Topic: Existence of SolutionsSolving Equations with Subsidiary Conditions