# NSolve

NSolve[expr,vars]

attempts to find numerical approximations to the solutions of the system expr of equations or inequalities for the variables vars.

NSolve[expr,vars,Reals]

finds solutions over the domain of real numbers.

# Details and Options

• The system expr can be any logical combination of:
•  lhs==rhs equations lhs!=rhs inequations lhs>rhs or lhs>=rhs inequalities expr∈dom domain specifications {x,y,…}∈reg region specification ForAll[x,cond,expr] universal quantifiers Exists[x,cond,expr] existential quantifiers
• NSolve[{expr1,expr2,},vars] is equivalent to NSolve[expr1&&expr2&&,vars].
• A single variable or a list of variables can be specified.
• NSolve gives solutions in terms of rules of the form:
•  {} no solutions {{x->solx,y->soly,…},…} several solutions {{}} solution set is full dimensional
• When a single variable is specified and a particular root of an equation has multiplicity greater than one, NSolve gives several copies of the corresponding solution.
• NSolve[expr,vars] assumes by default that quantities appearing algebraically in inequalities are real, while all other quantities are complex.
• In NSolve[expr,vars,Reals] all variables, parameters, constants, and function values are restricted to be real.
• NSolve[expr&&varsReals,vars,Complexes] solves for real values of variables, but function values are allowed to be complex.
• NSolve[,xreg,Reals] constrains x to be in the region reg. The different coordinates for x can be referred to using Indexed[x,i].
• NSolve deals primarily with linear and polynomial equations.
• The following options can be given:
•  Method Automatic what method should be used VerifySolutions Automatic whether to verify solutions WorkingPrecision Automatic precision to be used in computations
• Possible Method settings include "EndomorphismMatrix" and "Homotopy".

# Examples

open allclose all

## Basic Examples(5)

Approximate solutions to a polynomial equation:

 In[1]:=
 Out[1]=

Approximate real solutions to a polynomial equation:

 In[1]:=
 Out[1]=

Approximate solutions to a system of polynomial equations:

 In[1]:=
 Out[1]=

Approximate real solutions to a system of polynomial equations:

 In[1]:=
 Out[1]=

Solve equations in a geometric region:

 In[1]:=
 Out[1]=
 In[2]:=
 Out[2]=