PRODUCTS
Products Overview
Mathematica
Mathematica Student Edition
Mathematica Home Edition
Wolfram
CDF Player
(free download)
Computable Document Format (CDF)
web
Mathematica
grid
Mathematica
Wolfram
Workbench
Wolfram
SystemModeler
Wolfram
Finance Platform
Mathematica
Add-Ons
Wolfram|Alpha Products
SOLUTIONS
Solutions Overview
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts & Entertainment
Game Design, Special Effects & Generative Art
Education
STEM Education Initiative
Higher Education
Community & Technical College Education
Primary & Secondary Education
Students
Technology
Computable Document Format (CDF)
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
Merchandise
SUPPORT
Support Overview
Mathematica
Documentation
Knowledge Base
Learning Center
Technical Services
Community & Forums
Training
Does My Site Have a License?
Wolfram User Portal
COMPANY
About Wolfram Research
News
Events
Wolfram Blog
Partnerships
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
All Sites
Wolfram|Alpha
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Media
Wolfram
Tones
Wolfram Science
Stephen Wolfram
SEARCH MATHEMATICA 8 DOCUMENTATION
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE
DOCUMENTATION CENTER
FOR THE LATEST INFORMATION.
Mathematica
>
Mathematics and Algorithms
>
Equation Solving
>
Built-in
Mathematica
Symbol
Numerical Mathematics: Basic Operations
Numerical Equation Solving
Equations in One Variable
Numerical Mathematics in Mathematica
Numerical Solution of Polynomial Equations
Tutorials »
|
Solve
FindRoot
NDSolve
NMinimize
InterpolatingFunction
See Also »
|
Equation Solving
Numerical Evaluation & Precision
Polynomial Equations
Polynomial Systems
More About »
NSolve
NSolve
[
lhs
rhs
,
var
]
gives a list of numerical approximations to the roots of a polynomial equation.
NSolve
[{
eqn
1
,
eqn
2
,
...
}, {
var
1
,
var
2
,
...
}]
solves a system of polynomial equations.
MORE INFORMATION
NSolve
[
eqns
,
vars
,
n
]
gives results to
n
-digit precision.
NSolve
[
eqns
,
vars
]
gives the same final result as
N
[
Solve
[
eqns
,
vars
]]
, apart from issues of numerical precision.
EXAMPLES
CLOSE ALL
Basic Examples
(1)
Approximate solutions to a polynomial equation:
Approximate solutions to a system of polynomial equations:
Approximate solutions to a polynomial equation:
In[1]:=
Out[1]=
Approximate solutions to a system of polynomial equations:
In[2]:=
Out[2]=
Scope
(5)
A univariate polynomial equation:
A system of polynomial equations with a finite number of solutions:
A system of polynomial equations with infinitely many solutions:
Polynomial equations with inexact coefficients:
Equations involving radicals:
Generalizations & Extensions
(3)
Eliminate a variable and solve the resulting system:
Polynomial equations with parameters:
Transcendental equations:
Options
(2)
By default
NSolve
computes a Gröbner basis in
DegreeReverseLexicographic
order:
Here using the
Lexicographic
order is faster, since
polys
already form a Gröbner basis:
By default the solutions are machine-precision numbers:
The values of
polys
at some of the machine precision-solutions are relatively large:
This computes solutions using 50 digits of precision:
The solutions computed with 50 digits of precision satisfy the equations much more accurately:
Applications
(2)
Solve a polynomial equation with inexact coefficients:
Find intersection points of a circle and a parabola:
Properties & Relations
(6)
NSolve
gives approximate solutions to the equations:
Solutions are given as replacement rules and can be directly used for substitution:
NSolve
uses
{}
to represent the empty or no solution:
NSolve
uses
{{}}
to represent the universal solution or that all points satisfy the equations:
NSolve
will produce solutions according to their multiplicity:
NSolve
computes numeric approximations of solutions:
Use
Solve
to get exact values of solutions:
NSolve
finds solutions in complex numbers:
Use
Reduce
to find solutions over specified domains:
Use
N
and
ToRules
to get approximations of the solutions given as replacement rules:
Use
FindRoot
to find an approximate solution instance starting the search at
x
=1
and
y
=-1
:
Use
FindInstance
to find exact solution instances:
Use
N
to get a numeric approximation of the solution:
Use
NDSolve
to solve differential equations numerically:
Possible Issues
(2)
If the solutions set is infinite,
NSolve
gives its intersection with random hyperplanes:
Solutions obtained with machine-precision numeric computations may not be accurate:
SEE ALSO
Solve
FindRoot
NDSolve
NMinimize
InterpolatingFunction
TUTORIALS
Numerical Mathematics: Basic Operations
Numerical Equation Solving
Equations in One Variable
Numerical Mathematics in
Mathematica
Numerical Solution of Polynomial Equations
RELATED LINKS
Demonstrations with NSolve
(
Wolfram Demonstrations Project
)
Implementation notes: Numerical and Related Functions
NKS|Online
(
A New Kind of Science
)
MORE ABOUT
Equation Solving
Numerical Evaluation & Precision
Polynomial Equations
Polynomial Systems
New in 2 | Last modified in 4.1