Solve Function

The solve() function is used to numerically find the real roots of an expression in a given variable. It can take either two or four arguments:

solve('expression','variable')
solve('expression','variable','lower','upper')

result with 3 decimal places

When given two arguments, the roots will be searched in the range set by Tools > Options... > Roots (range). This is important — if the root is outside that range, it will not be found.

The precision of root finding depends on the Tools > Options... > Decimal places setting. Increase the number of decimal places for greater precision.

result with 5 decimal places

Note: solve() needs an expression, and can sometimes fail. For instance, because SMath calculates integrals numerically, an equation containing an integral cannot always be solved using solve().

solve() failing on an integral

For a broader overview of solving equations in SMath Studio, including roots() and polyroots(), see Solving Equations.

This page is based on a legacy wiki article by Radovan Omorjan.