Mathematica 9 is now available
 Documentation /  Mathematica /  The Mathematica Book /  Advanced Mathematics in Mathematica /  Numerical Operations on Functions /

Numerical Evaluation of Sums and ProductsNumerical Root Finding

3.9.5 Numerical Solution of Polynomial Equations

When Solve cannot find explicit solutions to polynomial equations, it returns a symbolic form of the result in terms of Root objects.

In[1]:= Solve[x^5 + 7x + 1 == 0, x]

Out[1]=

You can get numerical solutions by applying N.

In[2]:= N[%]

Out[2]=

This gives the numerical solutions to 25-digit precision.

In[3]:= N[%%, 25]

Out[3]=

You can use NSolve to get numerical solutions to polynomial equations directly, without first trying to find exact results.

In[4]:= NSolve[x^7 + x + 1 == 0, x]

Out[4]=

Numerical solution of polynomial equations.

NSolve will always give you the complete set of numerical solutions to any polynomial equation in one variable.

You can also get numerical solutions to sets of simultaneous polynomial equations. You can use Solve to "unwind" the simultaneous equations, and then apply N to get numerical results.

Solve writes the solution in terms of roots of a polynomial in one variable.

In[5]:= First[

Solve[{x^2 + y^2 == 1, x^3 + y^3 == 2}, {x, y}]]

Out[5]=

You can apply N to get a numerical result.

In[6]:= N[%]

Out[6]=

Numerical Evaluation of Sums and ProductsNumerical Root Finding



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.