1.14 Solution of EquationsΒΆ
FriCAS also has state-of-the-art algorithms for the solution of systems
of polynomial equations. When the number of equations and unknowns is
the same, and you have no symbolic coefficients, you can use solve
for
real roots and complexSolve
for complex roots. In each case, you tell
FriCAS how accurate you want your result to be. All operations in the
solve family return answers in the form of a list of solution sets,
where each solution set is a list of equations.
A system of two equations involving a symbolic parameter t.
S(t) == [x^2-2*y^2 - t,x*y-y-5*x + 5]
Type: Void
Find the real roots of S(19) with rational arithmetic, correct to within 1/1020.
solve(S(19),1/10^20)
Type: List List Equation Polynomial Fraction Integer
Find the complex roots of S(19) with floating point coefficients to 20 digits accuracy in the mantissa.
complexSolve(S(19),10.e-20)
Type: List List Equation Polynomial Complex Float
If a system of equations has symbolic coefficients and you want a solution in radicals, try radicalSolve.
radicalSolve(S(a),[x,y])
Type: List List Equation Expression Integer
For systems of equations with symbolic coefficients, you can apply solve, listing the variables that you want FriCAS to solve for. For polynomial equations, a solution cannot usually be expressed solely in terms of the other variables. Instead, the solution is presented as a triangular system of equations, where each polynomial has coefficients involving only the succeeding variables. This is analogous to converting a linear system of equations to triangular form.
A system of three equations in five variables.
eqns := [x^2 - y + z,x^2*z + x^4 - b*y, y^2 *z - a - b*x]
Type: List Polynomial Integer
Solve the system for unknowns [x,y,z], reducing the solution to triangular form.
solve(eqns,[x,y,z])
Type: List List Equation Fraction Polynomial Integer