7.4 Numerical Solution of Polynomial Equations
When Solve cannot find explicit solutions to polynomial equations, it returns a symbolic form of the result.
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 first numerical solution to 20-digit precision.
In[3]:= N[%%, 20] [[1]]
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 use NSolve to solve sets of simultaneous equations numerically.
In[5]:= NSolve[{x + y == 2, x - 3 y + z == 3, x - y + z == 0},
{x, y, z}]
Out[5]=