You can solve equations to obtain a symbolic or numeric answer.
For example, a solution to is
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
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 ||Returns approximate solutions. Precision can be controlled
arbitrarily using |
|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.|
vpasolve uses variable-precision arithmetic.
You can control precision arbitrarily using
For examples, see Increase Precision of Numeric Calculations.