Maxima で綴る数学の旅

紙と鉛筆の代わりに、数式処理システムMaxima / Macsyma を使って、数学を楽しみましょう

-数学- 5次方程式を高速に解く。6次方程式も解けた!

 

2引数のfactor()関数を使って各解を原子元Vで表す計算を行うgal_sol_V4()を組み込んだパッケージを作成しました。こちらからダウンロードできます。

このパッケージを読み込んで、5次方程式を解くと、6.38秒で 解くことができました。

ちなみに、冪根では解けない5次方程式をSolveSolvable()に渡すと、原子元Vの最小多項式を求めるところで行う120次多項式因数分解で非常に(数時間程度の)時間がかかります。

 

[追記] ehitoさんのコメントにあるように、最初に配ったパッケージでは問題がありました。gal_phi()の定義がイマイチでした。修正版を上記「こちら」からダウンロード出来ます。

ehitoさんのコメントにある6次方程式はこのパッケージを読み込んだ状態で3分程度で解くことが出来ます。

 

とりあえず、5次方程式を解く様子をお見せしましょう。 

(%i31) p1;

$$ \tag{%o31} x^5+x^4-4\,x^3-3\,x^2+3\,x+1 $$
(%i32) SolveSolvable(p1)$

$$\tag{*} \verb|Minimal polynomial of V|\verb| | $$

$$\tag{*} V^5-3\,V^4-157\,V^3+37\,V^2+6568\,V+16301\verb| | $$

$$\tag{*} \verb|Galois Group of|\verb| |x^5+x^4-4\,x^3-3\,x^2+3\,x+1\verb| | $$

$$\tag{*} \begin{pmatrix} a&b&c&d&e\\ b&c&d&e&a\\ c&d&e&a&b\\ d&e&a&b&c\\ e&a&b&c&d\\ \end{pmatrix} \verb| | $$
$$\tag{*} \verb|Subnormal series and quotients of orders|\verb| | $$

$$\tag{*} \verb|FiniteGroup[1,34,65,91,97]|\verb| | $$

$$\tag{*} \verb|FiniteGroup[1]|\verb| | $$

$$\tag{*} x^5+x^4-4\,x^3-3\,x^2+3\,x+1\verb| |\verb|is solvable.|\verb| | $$
$$\tag{*} \verb|Solutions|\verb| | $$
$$\tag{*} \mathrm{\%x}_{1}=-\frac{6963165886750\,\alpha_{1}^4\,{\rm Z}_{5}^3}{1624010824406531}+\frac{1888034275\,\alpha_{1}^3\,{\rm Z}_{5}^3}{140473213771}+\frac{338545\,\alpha_{1}^2\,{\rm Z}_{5}^3}{12150611}+\frac{130\,\alpha_{1}\,{\rm Z}_{5}^3}{1051}-\frac{4530051042875\,\alpha_{1}^4\,{\rm Z}_{5}^2}{1624010824406531}+\frac{2914651500\,\alpha_{1}^3\,{\rm Z}_{5}^2}{140473213771}+\frac{851530\,\alpha_{1}^2\,{\rm Z}_{5}^2}{12150611}-\frac{58\,\alpha_{1}\,{\rm Z}_{5}^2}{1051}+\frac{709427668375\,\alpha_{1}^4\,{\rm Z}_{5}}{1624010824406531}+\frac{2692614200\,\alpha_{1}^3\,{\rm Z}_{5}}{140473213771}+\frac{573570\,\alpha_{1}^2\,{\rm Z}_{5}}{12150611}-\frac{61\,\alpha_{1}\,{\rm Z}_{5}}{1051}+\frac{4621555039250\,\alpha_{1}^4}{1624010824406531}+\frac{1248010850\,\alpha_{1}^3}{140473213771}+\frac{405335\,\alpha_{1}^2}{12150611}-\frac{89\,\alpha_{1}}{1051}-\frac{1}{5}\verb| | $$
$$\tag{*} \mathrm{\%x}_{2}=\frac{2433114843875\,\alpha_{1}^4\,{\rm Z}_{5}^3}{1624010824406531}-\frac{222037300\,\alpha_{1}^3\,{\rm Z}_{5}^3}{140473213771}-\frac{168235\,\alpha_{1}^2\,{\rm Z}_{5}^3}{12150611}+\frac{89\,\alpha_{1}\,{\rm Z}_{5}^3}{1051}+\frac{7672593555125\,\alpha_{1}^4\,{\rm Z}_{5}^2}{1624010824406531}-\frac{1666640650\,\alpha_{1}^3\,{\rm Z}_{5}^2}{140473213771}-\frac{573570\,\alpha_{1}^2\,{\rm Z}_{5}^2}{12150611}+\frac{219\,\alpha_{1}\,{\rm Z}_{5}^2}{1051}+\frac{11584720926000\,\alpha_{1}^4\,{\rm Z}_{5}}{1624010824406531}-\frac{2914651500\,\alpha_{1}^3\,{\rm Z}_{5}}{140473213771}-\frac{235025\,\alpha_{1}^2\,{\rm Z}_{5}}{12150611}+\frac{31\,\alpha_{1}\,{\rm Z}_{5}}{1051}+\frac{6963165886750\,\alpha_{1}^4}{1624010824406531}-\frac{1026617225\,\alpha_{1}^3}{140473213771}+\frac{277960\,\alpha_{1}^2}{12150611}+\frac{28\,\alpha_{1}}{1051}-\frac{1}{5}\verb| | $$
$$\tag{*} \mathrm{\%x}_{3}=\frac{5239478711250\,\alpha_{1}^4\,{\rm Z}_{5}^3}{1624010824406531}-\frac{1248010850\,\alpha_{1}^3\,{\rm Z}_{5}^3}{140473213771}+\frac{46635\,\alpha_{1}^2\,{\rm Z}_{5}^3}{1104601}-\frac{28\,\alpha_{1}\,{\rm Z}_{5}^3}{1051}+\frac{9151606082125\,\alpha_{1}^4\,{\rm Z}_{5}^2}{1624010824406531}+\frac{640023425\,\alpha_{1}^3\,{\rm Z}_{5}^2}{140473213771}+\frac{235025\,\alpha_{1}^2\,{\rm Z}_{5}^2}{12150611}+\frac{61\,\alpha_{1}\,{\rm Z}_{5}^2}{1051}+\frac{4530051042875\,\alpha_{1}^4\,{\rm Z}_{5}}{1624010824406531}+\frac{1666640650\,\alpha_{1}^3\,{\rm Z}_{5}}{140473213771}+\frac{66790\,\alpha_{1}^2\,{\rm Z}_{5}}{12150611}+\frac{191\,\alpha_{1}\,{\rm Z}_{5}}{1051}-\frac{2433114843875\,\alpha_{1}^4}{1624010824406531}+\frac{1444603350\,\alpha_{1}^3}{140473213771}-\frac{338545\,\alpha_{1}^2}{12150611}+\frac{3\,\alpha_{1}}{1051}-\frac{1}{5}\verb| | $$
$$\tag{*} \mathrm{\%x}_{4}=\frac{3912127370875\,\alpha_{1}^4\,{\rm Z}_{5}^3}{1624010824406531}+\frac{1026617225\,\alpha_{1}^3\,{\rm Z}_{5}^3}{140473213771}-\frac{405335\,\alpha_{1}^2\,{\rm Z}_{5}^3}{12150611}-\frac{3\,\alpha_{1}\,{\rm Z}_{5}^3}{1051}-\frac{709427668375\,\alpha_{1}^4\,{\rm Z}_{5}^2}{1624010824406531}+\frac{804579925\,\alpha_{1}^3\,{\rm Z}_{5}^2}{140473213771}-\frac{66790\,\alpha_{1}^2\,{\rm Z}_{5}^2}{12150611}-\frac{31\,\alpha_{1}\,{\rm Z}_{5}^2}{1051}-\frac{7672593555125\,\alpha_{1}^4\,{\rm Z}_{5}}{1624010824406531}-\frac{640023425\,\alpha_{1}^3\,{\rm Z}_{5}}{140473213771}+\frac{446195\,\alpha_{1}^2\,{\rm Z}_{5}}{12150611}+\frac{58\,\alpha_{1}\,{\rm Z}_{5}}{1051}-\frac{5239478711250\,\alpha_{1}^4}{1624010824406531}-\frac{1888034275\,\alpha_{1}^3}{140473213771}+\frac{168235\,\alpha_{1}^2}{12150611}+\frac{188\,\alpha_{1}}{1051}-\frac{1}{5}\verb| | $$
$$\tag{*} \mathrm{\%x}_{5}=-\frac{4621555039250\,\alpha_{1}^4\,{\rm Z}_{5}^3}{1624010824406531}-\frac{1444603350\,\alpha_{1}^3\,{\rm Z}_{5}^3}{140473213771}-\frac{277960\,\alpha_{1}^2\,{\rm Z}_{5}^3}{12150611}-\frac{188\,\alpha_{1}\,{\rm Z}_{5}^3}{1051}-\frac{11584720926000\,\alpha_{1}^4\,{\rm Z}_{5}^2}{1624010824406531}-\frac{2692614200\,\alpha_{1}^3\,{\rm Z}_{5}^2}{140473213771}-\frac{446195\,\alpha_{1}^2\,{\rm Z}_{5}^2}{12150611}-\frac{191\,\alpha_{1}\,{\rm Z}_{5}^2}{1051}-\frac{9151606082125\,\alpha_{1}^4\,{\rm Z}_{5}}{1624010824406531}-\frac{804579925\,\alpha_{1}^3\,{\rm Z}_{5}}{140473213771}-\frac{851530\,\alpha_{1}^2\,{\rm Z}_{5}}{12150611}-\frac{219\,\alpha_{1}\,{\rm Z}_{5}}{1051}-\frac{3912127370875\,\alpha_{1}^4}{1624010824406531}+\frac{222037300\,\alpha_{1}^3}{140473213771}-\frac{46635\,\alpha_{1}^2}{1104601}-\frac{130\,\alpha_{1}}{1051}-\frac{1}{5}\verb| | $$
$$\tag{*} \verb|with|\verb| | $$

$$\tag{*} \left[ \left[ \alpha_{1} , -\frac{367554\,{\rm Z}_{5}^3}{625}-\frac{885742\,{\rm Z}_{5}^2}{625}+\frac{202389\,{\rm Z}_{5}}{625}+\alpha_{1}^5-\frac{4973397}{3125} \right] , \left[ {\rm Z}_{5} , {\rm Z}_{5}^4+{\rm Z}_{5}^3+{\rm Z}_{5}^2+{\rm Z}_{5}+1 \right] \right] \verb| | $$
$$\tag{*} \verb|Verification|\verb| | $$

$$\tag{*} \verb|Numeric calcuration of the above solutions|\verb| | $$

$$\tag{*} \left[ 4.996003610813204 \times 10^{-16}\,i-1.918985947228995 , -6.938893903907228 \times 10^{-17}\,i-0.2846296765465704 , 3.33066907387547 \times 10^{-16}\,i-1.30972146789057 , 0.8308300260037729-3.608224830031759 \times 10^{-16}\,i , 1.682507065662362-7.771561172376096 \times 10^{-16}\,i \right] \verb| | $$

$$\tag{*} \verb|Numeric solutions with allroots(|\verb| |x^5+x^4-4\,x^3-3\,x^2+3\,x+1\verb| |\verb|)|\verb| | $$

$$\tag{*} \left[ x=-0.2846296765465703 , x=-1.30972146789057 , x=0.8308300260037736 , x=1.682507065662362 , x=-1.918985947228995 \right] \verb| | $$
(%i33) time(%);

$$ \tag{%o33} \left[ 6.38 \right] $$

This is a test.
天気