如果我們藉著維基百科『三次函數』詞條,來個拉格朗日求解之旅 ,自會發現用『SymPy』作符號運算的好處︰
Cubic function
In algebra, a cubic function is a function of the form
where a is nonzero.
Setting f(x) = 0 produces a cubic equation of the form:
The solutions of this equation are called roots of the polynomial f(x). If all of the coefficients a, b, c, and d of the cubic equation are real numbers then there will be at least one real root (this is true for all odd degree polynomials) and if the coefficients are complex numbers then there will be at least one complex root (this is true for all non-constant polynomials). All of the roots of the cubic equation can be found algebraically. (This is also true of a quadratic or quartic (fourth degree) equation, but no higher-degree equation, by the Abel–Ruffini theorem). The roots can also be found trigonometrically. Alternatively, numerical approximations of the roots can be found using root-finding algorithms like Newton’s method.
The coefficients do not need to be complex numbers. Much of what is covered below is valid for coefficients of any field with characteristic 0 or greater than 3. The solutions of the cubic equation do not necessarily belong to the same field as the coefficients. For example, some cubic equations with rational coefficients have roots that are non-rational (and even non-real) complex numbers.
Lagrange’s method
In his paper Réflexions sur la résolution algébrique des équations (“Thoughts on the algebraic solving of equations”),[35] Joseph Louis Lagrange introduced a new method to solve equations of low degree.
This method works well for cubic and quartic equations, but Lagrange did not succeed in applying it to a quintic equation, because it requires solving a resolvent polynomial of degree at least six.[36][37][38] This is explained by the Abel–Ruffini theorem, which proves that such polynomials cannot be solved by radicals. Nevertheless, the modern methods for solving solvable quintic equations are mainly based on Lagrange’s method.[38]
In the case of cubic equations, Lagrange’s method gives the same solution as Cardano’s. By drawing attention to a geometrical problem that involves two cubes of different size Cardano explains in his book Ars Magna how he arrived at the idea of considering the unknown of the cubic equation as a sum of two other quantities. Lagrange’s method may also be applied directly to the general cubic equation (1), ax3 + bx2 + cx + d = 0, without using the reduction to the depressed cubic equation (2), t3 + pt + q = 0. Nevertheless, the computation is much easier with this reduced equation.
Suppose that x0, x1 and x2 are the roots of equation (1) or (2), and define ξ = −1/2 + 1/2√3i (a complex cube root of 1, i.e. a primitive third root of unity) which satisfies the relation ξ2 + ξ + 1 = 0. We now set
This is the discrete Fourier transform of the roots: observe that while the coefficients of the polynomial are symmetric in the roots, in this formula an order has been chosen on the roots, so these are not symmetric in the roots. The roots may then be recovered from the three si by inverting the above linear transformation via the inverse discrete Fourier transform, giving
The polynomial s0 is equal, by Vieta’s formulas, to −b/a in case of equation (1) and to 0 in case of equation (2), so we only need to seek values for the other two.
即使已知 與 的線性關係,也知 ,將 以 來表示亦需要許多計算!因此人們往往不願從頭來過,只想知道結果就好!!不過這樣就少了許多探索的樂趣了。難道使用『SymPy』能有什麼不同的嗎?終究也只是得到『答案』而已乎??
pi@raspberrypi:~ {\xi}^2 + \xi +1 =0 python3 Python 3.4.2 (default, Oct 19 2014, 13:31:11) [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from sympy import * >>> x0, x1, x2, ζ = symbols('x0, x1, x2, ζ') >>> s0 = x0 + x1 + x2 >>> s1 = x0 + ζ*x1 + ζ**2 * x2 >>> s2 = x0 + ζ**2 * x1 + ζ*x2 >>> (s1**2).expand() x0**2 + 2*x0*x1*ζ + 2*x0*x2*ζ**2 + x1**2*ζ**2 + 2*x1*x2*ζ**3 + x2**2*ζ**4 >>> collect(x0**2 + 2*x0*x1*ζ + 2*x0*x2*ζ**2 + x1**2*ζ**2 + 2*x1*x2 + x2**2*ζ, ζ) x0**2 + 2*x1*x2 + ζ**2*(2*x0*x2 + x1**2) + ζ*(2*x0*x1 + x2**2) >>> (s1**3).expand() x0**3 + 3*x0**2*x1*ζ + 3*x0**2*x2*ζ**2 + 3*x0*x1**2*ζ**2 + 6*x0*x1*x2*ζ**3 + 3*x0*x2**2*ζ**4 + x1**3*ζ**3 + 3*x1**2*x2*ζ**4 + 3*x1*x2**2*ζ**5 + x2**3*ζ**6 >>> collect(x0**3 + 3*x0**2*x1*ζ + 3*x0**2*x2*ζ**2 + 3*x0*x1**2*ζ**2 + 6*x0*x1*x2 + 3*x0*x2**2*ζ + x1**3 + 3*x1**2*x2*ζ + 3*x1*x2**2*ζ**2 + x2**3, ζ) x0**3 + 6*x0*x1*x2 + x1**3 + x2**3 + ζ**2*(3*x0**2*x2 + 3*x0*x1**2 + 3*x1*x2**2) + ζ*(3*x0**2*x1 + 3*x0*x2**2 + 3*x1**2*x2) >>> (s1*s2).expand() x0**2 + x0*x1*ζ**2 + x0*x1*ζ + x0*x2*ζ**2 + x0*x2*ζ + x1**2*ζ**3 + x1*x2*ζ**4 + x1*x2*ζ**2 + x2**2*ζ**3 >>> collect(x0**2 + x0*x1*ζ**2 + x0*x1*ζ + x0*x2*ζ**2 + x0*x2*ζ + x1**2 + x1*x2*ζ + x1*x2*ζ**2 + x2**2, ζ) x0**2 + x1**2 + x2**2 + ζ**2*(x0*x1 + x0*x2 + x1*x2) + ζ*(x0*x1 + x0*x2 + x1*x2) >>>
如是在清楚通熟『四次函數』
Quartic function
In algebra, a quartic function is a function of the form
where a is nonzero, which is defined by a polynomial of degree four, called quartic polynomial.
Sometimes the term biquadratic is used instead of quartic, but, usually, biquadratic function refers to a quadratic function of a square (or, equivalently, to the function defined by a quartic polynomial without terms of odd degree), having the form
A quartic equation, or equation of the fourth degree, is an equation that equates a quartic polynomial to zero, of the form
where a ≠ 0.
The derivative of a quartic function is a cubic function.
Since a quartic function is defined by a polynomial of even degree, it has the same infinite limit when the argument goes to positive or negative infinity. If a is positive, then the function increases to positive infinity at both ends; and thus the function has a global minimum. Likewise, if a is negative, it decreases to negative infinity and has a global maximum. In both cases it may or may not have another local maximum and another local minimum.
The degree four (quartic case) is the highest degree such that every polynomial equation can be solved by radicals.
Solving by Lagrange resolvent
The symmetric group S4 on four elements has the Klein four-group as a normal subgroup. This suggests using a resolvent cubic whose roots may be variously described as a discrete Fourier transform or a Hadamard matrix transform of the roots; see Lagrange resolvents for the general method. Denote by xi, for i from 0 to 3, the four roots of x4 + bx3 + cx2 + dx + e. If we set
then since the transformation is an involution we may express the roots in terms of the four si in exactly the same way. Since we know the value s0 = −b/2, we only need the values for s1, s2 and s3. These are the roots of the polynomial
Substituting the si by their values in term of the xi, this polynomial may be expanded in a polynomial in s whose coefficients are symmetric polynomials in the xi. By the fundamental theorem of symmetric polynomials, these coefficients may be expressed as polynomials in the coefficients of the monic quartic. If, for simplification, we suppose that the quartic is depressed, that is b = 0, this results in the polynomial
-
(3)
This polynomial is of degree six, but only of degree three in s2, and so the corresponding equation is solvable by the method described in the article about cubic function. By substituting the roots in the expression of the xi in terms of the si, we obtain expression for the roots. In fact we obtain, apparently, several expressions, depending on the numbering of the roots of the cubic polynomial and of the signs given to their square roots. All these different expressions may be deduced from one of them by simply changing the numbering of the xi.
These expressions are unnecessarily complicated, involving the cubic roots of unity, which can be avoided as follows. If s is any non-zero root of (3), and if we set
then
We therefore can solve the quartic by solving for s and then solving for the roots of the two factors using the quadratic formula.
Note that this gives exactly the same formula for the roots as the one provided by Descartes’ method.
之後,或能欣賞阿貝爾和伽羅瓦優美的
可解群
在數學的歷史中,群論原本起源於對五次方程及更高次方程無一般的公式解之證明的找尋,最終隨著伽羅瓦理論的提出而確立。可解群的概念產生於描述其根可以只用根式(平方根、立方根等等及其和與積)表示的多項式所對應的自同構群所擁有的性質。
一個群被稱為可解的,若它擁有一個其商群皆為阿貝爾群的正規列。或者等價地說,若其降正規列
- G ▹ G ( 1 ) ▹ G ( 2 ) ▹ ⋯ ,
之中,每一個子群都會是前一個的導群,且最後一個為G的當然子群{1}。上述兩個定義是等價的,對一個群H及H的正規子群N,其商群H/N為可交換的若且唯若N包含著H(1)。
對於有限群,有一個等價的定義為:一可解群為一有著其商群皆為質數階的循環群之合成列的群。此一定義會等價是因為每一個簡單阿貝爾群都是有質數階的循環群。若爾當-赫爾德定理表示若一個合成列有此性質,則其循環群即會對應到某個體上的n個根。但此一定義的等價性並不必然於無限群中亦會成立:例如,因為每一個在加法下的整數群Z的非當然子群皆同構於Z本身,它不會有合成列,但是其有著唯一同構於Z的商群之正規列{0,Z},證明了其確實是可解的。
和喬治·波里亞的格言「若有一個你無法算出的問題,則會有的你可以算出的較簡單的問題」相一致的,可解群通常在簡化有關一複雜的群的推測至一系列有著簡單結構-阿貝爾群的群的推測有著很有用的功用。
理論吧!!!