Main Content
Select Numeric or Symbolic Solver
You can solve equations to obtain a symbolic or numeric answer.
For example, a solution to is pi
in
symbolic form and 3.14159
in numeric form. The
symbolic solution is exact, while the numeric solution approximates
the exact symbolic solution. Symbolic Math Toolbox™ offers both
symbolic and numeric equation solvers. This table can help you choose
either the symbolic solver (solve
) or the numeric
solver (vpasolve
). A possible strategy is to
try the symbolic solver first, and use the numeric solver if the symbolic
solver is stuck.
Solve Equations Symbolically Using solve | Solve Equations Numerically Using vpasolve |
---|---|
Returns exact solutions. Solutions can then be approximated
using vpa . | Returns approximate solutions. Precision can be controlled
arbitrarily using digits . |
Returns a general form of the solution. | For polynomial equations, returns all numeric solutions that exist. For nonpolynomial equations, returns the first numeric solution found. |
General form allows insight into the solution. | Numeric solutions provide less insight. |
Runs slower. | Runs faster. |
Search ranges can be specified using inequalities. | Search ranges and starting points can be specified. |
solve solves equations and inequalities
that contain parameters. | vpasolve does not solve inequalities,
nor does it solve equations that contain parameters. |
solve can return parameterized solutions. | vpasolve does not return parameterized
solutions. |
vpasolve
uses variable-precision arithmetic.
You can control precision arbitrarily using digits
.
For examples, see Increase Precision of Numeric Calculations.