# Maple/方程求解

## 二次多项式方程

${\displaystyle f:=a*x^{2}+b*x+c;}$

solve(f,x);

${\displaystyle (1/2)*(-b+{\sqrt {(}}b^{2}-4*a*c))/a,-(1/2)*(b+{\sqrt {(}}b^{2}-4*a*c))/a}$
${\displaystyle }$

## 三次多项式方程

${\displaystyle f:=5*x^{3}+6*x^{2}+7*x+8}$

solve(f，x);

${\displaystyle -(1/15)*(1971+15*{\sqrt {(}}18726))^{(}1/3)+23/(5*(1971+15*{\sqrt {(}}18726))^{(}1/3))-2/5,}$

${\displaystyle (1/30)*(1971+15*{\sqrt {(}}18726))^{(}1/3)-23/(10*(1971+15*{\sqrt {(}}18726))^{(}1/3))-2/5+(1/2*I)*{\sqrt {(}}3)*(-(1/15)*(1971+15*{\sqrt {(}}18726))^{(}1/3)-23/(5*(1971+15*{\sqrt {(}}18726))^{(}1/3)))}$,

${\displaystyle (1/30)*(1971+15*{\sqrt {(}}18726))^{(}1/3)-23/(10*(1971+15*{\sqrt {(}}18726))^{(}1/3))-2/5-(1/2*I)*{\sqrt {(}}3)*(-(1/15)*(1971+15*{\sqrt {(}}18726))^{(}1/3)-23/(5*(1971+15*{\sqrt {(}}18726))^{(}1/3)))}$
${\displaystyle }$
${\displaystyle }$
${\displaystyle }$
${\displaystyle }$
${\displaystyle }$
${\displaystyle }$

## 高次多项式方程

f := x^7+3*x = 7;

solve(f,x);

RootOf(${\displaystyle Z^{7}+3Z-7}$, index = 1),
RootOf(${\displaystyle Z^{7}+3Z-7}$, index = 2),
RootOf(${\displaystyle Z^{7}+3Z-7}$, index = 3),
RootOf(${\displaystyle Z^{7}+3Z-7}$, index = 4),
RootOf(${\displaystyle Z^{7}+3Z-7}$, index = 5),
RootOf(${\displaystyle Z^{7}+3Z-7}$, index = 5),
RootOf(${\displaystyle Z^{7}+3Z-7}$, index =7),

evalf(%);

• (1.1922047171828134),
• (0.8658388666792263) + (0.9230818802764879) I,
• (0.2099602786426775) + (1.3442579297631496) I,
• (1.2519809466279554) + (0.6424819505558892) I,
• (1.2519809466279554) - (0.6424819505558892) I,
• (0.2099602786426775) - (1.3442579297631496) I,
• (0.8658388666792263) - (0.9230818802764879) I

## 三角函数方程

f := sin(x)^3+5*cosh(x) = 0;

${\displaystyle sin^{3}(x)+5cosh(x)=0}$

> solve(f, x);

RootOf(${\displaystyle sin^{3}(Z)-arccosh({\frac {-1}{5}}sin(Z)}$))

> evalf(%);

0.2873691672 - 1.111497506 I

## 方程组

> p1 := x*y*z-x*y^2-z-x-y; p2 := x*z-x^2-z-y+x; p3 := z^2-x^2-y^2;
> sys := {p1, p2, p3};
> var := {x, y, z};
> solve(sys, var);
： {x = 0, y = y, z = -y}, {x = 3, y = 4, z = 5}, {x = 1, y = 0, z = -1}

## 三角函数方程组

> f1 := cos(x)+sin(3*y)+tan(5*z) = 0;
> f2 := cos(3*z)+tan(3*y^2)-sin(2*z^3) = 33;
> f3 := tan(4*x+y)-sin(5*y-4*z) = 2*x;
> sys1 := {f1, f2, f3};
> var1 := {x, y, z};
{x, y, z}
> fsolve(sys1, var1);
{x = -10.77771790, y = -2.397849343, z = -7.382158103}