SOLVE

From iMath
Revision as of 19:23, 28 June 2017 by Jrheinlaender (talk | contribs) (Created page with "{{Keyword | <code>SOLVE (equation, expression, integer )</code> | Symbolically solve the equation for the expression. If there are several possible solutions (e.g....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Syntax

SOLVE (equation, expression, integer )


Implemented in iMath since version 2.2.0 or earlier.

Explanation

Symbolically solve the equation for the expression. If there are several possible solutions (e.g. for a quadratic equation), you can specify which one you want in the third argument. Note that this argument is not optional, so you must specify 1 for a linear equation.

It is possible to solve for an arbitrary expression. This works by substituting the expression with a temporary symbol inside the equation, then solving for the symbol, and finally re-substituting the expression.

Currently iMath can only solve polynomial equations up to grade 4.


Example

EQDEF x^3 + x^2 + x + 1 = 0

EQDEF SOLVE(@prev@, x, 1)

This will find the first solution of the cubic equation.

See also