時間序列︰生成函數‧漸近展開︰歐拉的天空《遁甲》

奇門遁甲傳說

據煙波釣叟歌中記載,奇門遁甲起源於傳說時代,黃帝炎帝聯軍和蚩尤在涿鹿展開的一場大戰,蚩尤身高七尺,鐵頭銅身,刀槍不入 ,能呼風喚雨並在戰場上製造迷霧,使得炎黃聯軍陷入不利境地。黃帝於是向天祈禱,終於獲得九天玄女給的河圖洛書和彩鳳銜來的太乙、六壬、遁甲之書,黃帝以此發明了指南車,逆轉了戰局,取得了勝利。黃帝令風后演繹天書,並最終演繹成三式之法:大六壬 、太乙神數、奇門遁甲一千零八十局(陽遁、陰遁各五百四十局) 。後來該術數為姜子牙所習得,由姜子牙刪減為七十二局(陽遁、陰遁各三十六局),再經過姜子牙傳給黃石公,再由黃石公傳給張良,最終由張良將其精簡為現今的一十八局(陽遁、陰遁各九局) 。

天干首起『甲』,易曰︰用九,見群龍無首,吉。故『遁甲』也。在天有三光,日光乙乙萬物生,月光炳炳照大地,星光指向引路灯 ,乙丙丁三奇出矣。紫白飛星九宮八門,太上曰︰禍福無門,惟人自召。雖然,河圖洛書陰陽五行所以言生剋制化沖和之象,所以極其數,蓋揭露天地人三才生殺有時乎??

黃帝陰符經》又稱《陰符經》,全書一卷三篇,傳聞是黃帝所撰,學者大多認為是後人偽托,現有三說:戰國時的蘇秦北魏寇謙之,或唐朝李荃。這部經即使在中國古代的哲學和兵法中都有一定的地位。《陰符經》更是道教的一部重要道經,歷代對它的註解僅次於《道德經》和《南華真經》。《陰符經》有多種版本,在此僅舉一本,略探其自然人生之旨。

黃帝陰符經

天之道,天之行,矣。天有五賊之者五賊在心施行於天,宇宙在乎,萬物生乎天性,人也人性,機也天之道以人也。機,斗轉星移;機,龍蛇起陸;機,天地反覆;天人合德,萬變定基性有巧拙,可以伏藏九竅,在乎三要。可以動靜火生於木,禍發必克,奸生於國 ,時動必潰修練,謂之聖人

也。天地萬物之萬物人之萬物之也 。三盜三才。故曰:食其時,百骸治;動其機,萬化安 。人神而神不知不神所以神。日月有數,大小有定,聖功焉,神明焉。其盜機也,天下莫能見莫能知也。君子得之固躬,小人得之輕命

善聽善視絕利一源,用師倍;三反晝夜,用師倍 。心生於物,死於物,機在於目。天之無恩大恩生,迅雷烈風,莫不蠢然。至樂性餘,至靜性廉。天之至私,用之至公。生者死之根,死者生之根。恩生於害,害生於恩。愚人以天地文理聖,我以時物文理哲。人以,我以不愚。人以,我以不奇。沈水入火,自取滅亡。自然之道靜,故天地萬物生天地之道浸,故陰陽勝陰陽相推,而變化順矣。是故聖人知自然之道不可違,因而制之至靜之道律曆不能契。爰有奇器 ,是生萬象,八卦甲子,神陰陽相勝之術,昭昭乎盡乎象矣。

─── 摘自《天地文理聖,時物文理哲?!

 

古代早有面積術,是微積分發展史上重要之『求積』問題︰

Quadrature (mathematics)

In mathematics, quadrature is a historical term which means determining area. Quadrature problems served as one of the main sources of problems in the development of calculus, and introduce important topics in mathematical analysis.

 
The area of a segment of a parabola is 4/3 that of the area of a certain inscribed triangle.

 

直至今日,數值分析裡仍然常用『拉格朗日插值法』

Lagrange polynomial

In numerical analysis, Lagrange polynomials are used for polynomial interpolation. For a given set of distinct points  x_{j} and numbers  y_{j}, the Lagrange polynomial is the polynomial of lowest degree that assumes at each point  x_{j} the corresponding value  y_{j} (i.e. the functions coincide at each point). The interpolating polynomial of the least degree is unique, however, and since it can be arrived at through multiple methods, referring to “the Lagrange polynomial” is perhaps not as correct as referring to “the Lagrange form” of that unique polynomial.

Although named after Joseph Louis Lagrange, who published it in 1795, the method was first discovered in 1779 by Edward Waring. It is also an easy consequence of a formula published in 1783 by Leonhard Euler.[1]

Uses of Lagrange polynomials include the Newton–Cotes method of numerical integration and Shamir’s secret sharing scheme in cryptography.

Lagrange interpolation is susceptible to Runge’s phenomenon of large oscillation. And changing the points  x_{j} requires recalculating the entire interpolant, so it is often easier to use Newton polynomials instead.

This image shows, for four points ((−9, 5), (−4, 2), (−1, −2), (7, 9)), the (cubic) interpolation polynomial L(x) (dashed, black), which is the sum of the scaled basis polynomials y00(x), y11(x), y22(x) and y33(x). The interpolation polynomial passes through all four control points, and each scaled basis polynomial passes through its respective control point and is 0 where x corresponds to the other three control points.

 

求取『定積分』之值哩!!

Simpson’s rule

In numerical analysis, Simpson’s rule is a method for numerical integration, the numerical approximation of definite integrals. Specifically, it is the following approximation:

{\displaystyle \int _{a}^{b}f(x)\,dx\approx {\tfrac {b-a}{6}}\left[f(a)+4f\left({\tfrac {a+b}{2}}\right)+f(b)\right],}

for points that are equally spaced. For unequally spaced points, see Cartwright.[1]

Simpson’s rule also corresponds to the three-point Newton-Cotes quadrature rule.

The method is credited to the mathematician Thomas Simpson (1710–1761) of Leicestershire, England. Kepler used similar formulas over 100 years prior. For this reason the method is sometimes called Kepler’s rule, or Keplersche Fassregel in German.

Simpson’s rule can be derived by approximating the integrand f (x) (in blue) by the quadratic interpolant P(x) (in red).

Quadratic interpolation

One derivation replaces the integrand  f(x) by the quadratic polynomial (i.e. parabola)  P(x) which takes the same values as  f(x) at the end points a and b and the midpoint m = (a + b) / 2. One can use Lagrange polynomial interpolation to find an expression for this polynomial,

  P(x)=f(a){\tfrac {(x-m)(x-b)}{(a-m)(a-b)}}+f(m){\tfrac {(x-a)(x-b)}{(m-a)(m-b)}}+f(b){\tfrac {(x-a)(x-m)}{(b-a)(b-m)}}.

An easy (albeit tedious) integration by substitution shows that

\int _{a}^{b}P(x)\,dx={\tfrac {b-a}{6}}\left[f(a)+4f\left({\tfrac {a+b}{2}}\right)+f(b)\right].[2]

This calculation can be carried out more easily if one first observes that (by scaling) there is no loss of generality in assuming that  a=-1 and  b=1.

 

若能深知『梯形規則』之來歷,或得見歐拉的天空耶??!!

Trapezoidal rule

In mathematics, and more specifically in numerical analysis, the trapezoidal rule (also known as the trapezoid rule or trapezium rule) is a technique for approximating the definite integral

  \int _{a}^{b}f(x)\,dx.

The trapezoidal rule works by approximating the region under the graph of the function  f(x) as a trapezoid and calculating its area. It follows that

  \int _{a}^{b}f(x)\,dx\approx (b-a)\left[{\frac {f(a)+f(b)}{2}}\right].

The function f(x) (in blue) is approximated by a linear function (in red).

 

An animation showing how the trapezoidal rule approximation improves with more strips.

 

試問什麼條件下 \int_{a}^{b} f(x) dx = (b-a) \left[ \frac{f(a)+f(b)}{2} \right] 呢?

由『微積分基本定理』及『分部積分法』可知

\int_{a}^{b} f(x) dx = \int_{a}^{b} \frac{d (x+c)}{dx} f(x) dx

= (x+c) f(x) |_{a}^{b} - \int_{a}^{b} (x+c) f^{'} (x) dx

假使 f^{'} (x) = k 是常數,如果定『積分常數』為 c = - \frac{a+b}{2} ,那麼原式等於

= (b-a) \left[ \frac{f(a)+f(b)}{2} \right] - k \int_{a}^{b} (x - \frac{a+b}{2}) dx

= (b-a) \left[ \frac{f(a)+f(b)}{2} \right] - k \left[ \frac{x^2}{2} - \frac{a+b}{2} x \right]  |_{a}^{b}

= (b-a) \left[ \frac{f(a)+f(b)}{2} \right] 呦!

將能通以和為貴之道吧☆