Mathematica Demystified

Chapter 8: Solving Equations

Many problems in mathematics ultimately boil down to solving an equation, or system of equations. Mathematica has a variety of tools for solving equations, which we'll learn about in this chapter.

8.1 Polynomial Equations

Let's start by solving a simple quadratic equation, x 2 + 3 x ? 5 = 0. Example 8.1.1 shows how to use the function Solve to do this.

Example 8.1.1
In[1]= (*   solving a polynomial equation *)       <b class="bold">Solve[x<sup2</sup> + 3x-5==0, x]</b>

Solve takes two arguments. The first is the equation we want to solve and the second is the variable that we want to solve for. Notice that we have used double equal signs in the equation. Recall that a single equal sign is not used to represent an abstract equation, but rather to replace the left-hand side of the expression with the right-hand side. For example a=2 assigns the value 2 to the variable a.

Mathematica finds that there are two solutions, that is, values of x that make the equation true. In general, any number that makes a polynomial zero is called a root of the polynomial. So in this case, the solutions of the equation are also the roots of the polynomial x 2 + 3 x ?5. Instead of just listing the solutions, Mathematica gives replacement rules of the form {x ?x 0}, where

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Cylindrical Lenses
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.