Publications

Back to Peer-reviewed journal papers

Fundamental Theorem of Matrix Representations of Hyper-Dual Numbers for Computing Higher-Order Derivatives

Authors
Y. Imoto†, N. Yamanaka, T. Uramoto, M. Tanaka, M. Fujikawa, N. Mitsume
Published in
JSIAM Letters
Volume, pages
Vol.12, pp.29–32
Year
2020
Type
Peer-reviewed journal papers
Link
https://doi.org/10.14495/jsiaml.12.29
Topics
Structural and solid mechanics
Keywords
Hyper-dual numbers Matrix representation Higher-order derivatives Fundamental theorem HDN-M differentiation Automatic differentiation Inductive definition Operator extending the domain of functions Matrix operation rules Operation rules of hyper-dual numbers
グラフィカルアブストラクト
グラフィカルアブストラクト

概要

数値解析では、与えられた関数の高階微分を厳密に計算する必要がしばしばあります。例えば、増分ポテンシャル法(incremental variational formulation)に基づく非線形材料の数値シミュレーションでは、自由エネルギーと散逸関数という 2 つのポテンシャルの高階微分が必要になります。超双対数(hyper-dual numbers、HDN)は、双対数(dual numbers、DN)を拡張した数で、互いに異なる冪零元を使って定義されます。関数の定義域を、Taylor 展開に基づいて超双対数の空間へ拡張する演算子を導入すると、その係数から高階微分が得られます。この性質を利用する計算法は、HDN 微分(HDN differentiation)と呼ばれています。HDN 微分は、微分の規則を実装する必要がない一方で、超双対数の演算規則に基づく追加の実装を必要とします。論文は、このために性能を高めるには専用の方法を開発しなければならず、HDN 微分の高速化や精度保証付き数値計算(self-validating numerics)の見込みは低いと指摘しています。

本論文は、双対数の行列表現の拡張として、超双対数の行列表現を帰納的な定義によって構成し、関数の定義域を、この行列表現が張る空間へ拡張する演算子を導入しています。そして、この演算子が与える行列の適切な成分を参照すると高階微分が得られることを証明し(基本定理)、この定理に基づく高階微分の数値計算法を HDN-M 微分(HDN-M differentiation)と名付けて提案し、2 つの計算例を示しています。超双対数の演算規則が行列の演算規則に置き換わるので、HDN-M 微分では、超双対数の演算規則を実装せずに、行列の演算規則で高階微分を計算できます。論文は、既存の線形代数のライブラリを利用することで、HDN-M 微分を容易に高速化できるとも述べています。

重要点

1. 超双対数の係数から高階微分を得る方法と、実装上の課題

超双対数は、次の条件を満たす nn 個の元 ε=(ε1,ε2,…,εn)T\varepsilon = (\varepsilon_1, \varepsilon_2, \ldots, \varepsilon_n)^{\mathrm{T}} を使って定義されます。

εi≠0 (i=1,2,…,n);εi2=0 (i=1,2,…,n);εi≠εj (i≠j);εiεj=εjεi≠0 (i≠j)(1)\begin{aligned} &\varepsilon_i \neq 0 \ (i = 1, 2, \ldots, n); \quad \varepsilon_i^2 = 0 \ (i = 1, 2, \ldots, n); \\ &\varepsilon_i \neq \varepsilon_j \ (i \neq j); \quad \varepsilon_i \varepsilon_j = \varepsilon_j \varepsilon_i \neq 0 \ (i \neq j) \end{aligned} \tag{1}

nn 次の超双対数は、次の形の数です。

∑α∈Λnaαεα,aα∈Rm(2)\sum_{\alpha \in \Lambda_n} a_{\alpha} \varepsilon^{\alpha}, \quad a_{\alpha} \in \mathbb{R}^m \tag{2}

ここで、Λn\Lambda_n は成分が 0 か 1 の nn 次元の多重指数 α\alpha の集合、εα\varepsilon^{\alpha} は εiαi\varepsilon_i^{\alpha_i}(i=1,2,…,ni = 1, 2, \ldots, n)の積で、εi0:=1\varepsilon_i^0 := 1 とします。係数 aαa_{\alpha} は Rm\mathbb{R}^m のベクトルで、m∈Nm \in \mathbb{N} です。

Ω\Omega を Rm\mathbb{R}^m の領域とします。論文は、Taylor 展開に対応する演算子 TT を定義し、関数 f∈Cn(Ω:R)f \in C^n(\Omega : \mathbb{R}) の定義域を、係数 a0a_0 が Ω\Omega に属する nn 次の超双対数の空間へ拡張しています。a∈Ωa \in \Omega と η=(η1,η2,…,ηn)∈{1,2,…,m}n\eta = (\eta_1, \eta_2, \ldots, \eta_n) \in \{1, 2, \ldots, m\}^n に対して、この演算子は次の関係を与えます。

Tf(a+∑i=1nδηiεi)=∑α∈Λn∂ηαf(a)εαT f\left(a + \sum_{i=1}^{n} \delta_{\eta_i} \varepsilon_i\right) = \sum_{\alpha \in \Lambda_n} \partial_{\eta}^{\alpha} f(a) \varepsilon^{\alpha}

ここで、δi:=(δi1,δi2,…,δim)T∈{0,1}m\delta_i := (\delta_{i1}, \delta_{i2}, \ldots, \delta_{im})^{\mathrm{T}} \in \{0, 1\}^m(δij\delta_{ij} は Kronecker のデルタ)、∂η:=(∂η1,∂η2,…,∂ηn)T\partial_{\eta} := (\partial_{\eta_1}, \partial_{\eta_2}, \ldots, \partial_{\eta_n})^{\mathrm{T}} です。すなわち、∂ηαf(a)\partial_{\eta}^{\alpha} f(a) は、αi=1\alpha_i = 1 であるすべての ii について、ηi\eta_i 番目の変数についての偏微分 ∂ηi\partial_{\eta_i} を施した、aa における ff の偏微分です。このように、偏微分 ∂ηαf(a)\partial_{\eta}^{\alpha} f(a) が εα\varepsilon^{\alpha} の係数として得られます(原論文の式 (4))。演算子 TT は、関数の和、積、合成についての代数的な性質ももちます(原論文の式 (3))。このため、いくつかの要素の和、積、合成で表される関数では、各要素とその微分が与えられていれば、nn 階までの常微分や偏微分を得ることができます。この性質を利用する高階微分の計算法が、HDN 微分です。

論文は、高階微分の計算法を次のように比べています(原論文 Table 1)。

手法 精度 演算の実装
数値微分(有限差分法) 低い 不要
自動微分 高い 必要
HDN 微分 高い 必要
提案手法(HDN-M 微分) 高い 不要(行列の演算に置き換え)

自動微分は、Leibniz 則や Faà di Bruno の公式などの微分の規則に基づいて厳密な微分を計算しますが、論文は、微分の規則に基づく代数的な構造がかなり複雑で、それが高速化の妨げになると述べています。HDN 微分は、超双対数の演算規則と演算子の実装だけを利用し、微分の規則の実装を必要としません。しかし、超双対数の演算規則に基づく追加の実装が必要です。そこで論文は、超双対数の演算規則の実装を必要としない、新しい微分の計算法を開発しています(重要点 2〜4)。

2. 超双対数の行列表現を帰納的に定義する

論文は、双対数の行列表現の拡張として、超双対数の行列表現を構成しています。k∈Nk \in \mathbb{N} に対して、Mk(R)M_k(\mathbb{R}) を R\mathbb{R} 上の kk 次の正方行列全体の集合とし、IkI_k と OkO_k を、それぞれ kk 次の単位行列と kk 次の零行列とします。行列 En,i∈M2n(R)\mathcal{E}_{n,i} \in M_{2^n}(\mathbb{R})(n≥2n \geq 2、i=1,2,…,ni = 1, 2, \ldots, n)を、次のように帰納的に定義します。

En,i=(En−1,iO2n−1O2n−1En−1,i),i=1,2,…,n−1(5)\mathcal{E}_{n,i} = \begin{pmatrix} \mathcal{E}_{n-1,i} & O_{2^{n-1}} \\ O_{2^{n-1}} & \mathcal{E}_{n-1,i} \end{pmatrix}, \quad i = 1, 2, \ldots, n - 1 \tag{5} En,n=(O2n−1I2n−1O2n−1O2n−1)(6)\mathcal{E}_{n,n} = \begin{pmatrix} O_{2^{n-1}} & I_{2^{n-1}} \\ O_{2^{n-1}} & O_{2^{n-1}} \end{pmatrix} \tag{6}

ここで、E1,1∈M2(R)\mathcal{E}_{1,1} \in M_2(\mathbb{R}) は次の行列です。

E1,1:=(0100)\mathcal{E}_{1,1} := \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}

これらの行列は、式 (1) に対応する次の性質を満たします。

En,i≠O2n(i=1,2,…,n);En,i2=O2n(i=1,2,…,n);En,i≠En,j(i≠j);En,iEn,j=En,jEn,i≠O2n(i≠j)\begin{aligned} &\mathcal{E}_{n,i} \neq O_{2^n} \quad (i = 1, 2, \ldots, n); \\ &\mathcal{E}_{n,i}^2 = O_{2^n} \quad (i = 1, 2, \ldots, n); \\ &\mathcal{E}_{n,i} \neq \mathcal{E}_{n,j} \quad (i \neq j); \\ &\mathcal{E}_{n,i} \mathcal{E}_{n,j} = \mathcal{E}_{n,j} \mathcal{E}_{n,i} \neq O_{2^n} \quad (i \neq j) \end{aligned}

したがって、行列

∑α∈Λnaα⊗Enα,aα∈Rm(7)\sum_{\alpha \in \Lambda_n} a_{\alpha} \otimes \mathcal{E}_n^{\alpha}, \quad a_{\alpha} \in \mathbb{R}^m \tag{7}

は、超双対数(式 (2))の行列表現になります。ここで、En:=(En,1,En,2,…,En,n)T\mathcal{E}_n := (\mathcal{E}_{n,1}, \mathcal{E}_{n,2}, \ldots, \mathcal{E}_{n,n})^{\mathrm{T}}、Enα=En,1α1En,2α2…En,nαn\mathcal{E}_n^{\alpha} = \mathcal{E}_{n,1}^{\alpha_1} \mathcal{E}_{n,2}^{\alpha_2} \ldots \mathcal{E}_{n,n}^{\alpha_n}、En,i0=I2n\mathcal{E}_{n,i}^0 = I_{2^n}(i=1,2,…,ni = 1, 2, \ldots, n)です。論文は、係数 a0a_0 が Ω\Omega に属する行列 (7) が張る空間を Mn(Ω)\mathbb{M}_n(\Omega) と書いています。

3. 関数の定義域を、行列表現の空間へ拡張する演算子

論文は、f∈Cn(Ω:R)f \in C^n(\Omega : \mathbb{R}) に対する演算子 T\mathcal{T} を、次のように定義しています。

Tf:∑α∈Λnaα⊗Enα↦∑∣β∣≤n∂βf(a0)β!(∑α∈Λn∖{0}aα⊗Enα)β∈Mn(R)(8)\mathcal{T} f : \sum_{\alpha \in \Lambda_n} a_{\alpha} \otimes \mathcal{E}_n^{\alpha} \mapsto \sum_{|\beta| \leq n} \frac{\partial^{\beta} f(a_0)}{\beta!} \left( \sum_{\alpha \in \Lambda_n \setminus \{0\}} a_{\alpha} \otimes \mathcal{E}_n^{\alpha} \right)^{\beta} \in \mathbb{M}_n(\mathbb{R}) \tag{8}

ここで、引数(↦\mapsto の左側)は Mn(Ω)\mathbb{M}_n(\Omega) の元で、β=(β1,β2,…,βm)\beta = (\beta_1, \beta_2, \ldots, \beta_m) は mm 次元の多重指数です。∣β∣|\beta|、β!\beta!、∂β\partial^{\beta} は、多重指数 β\beta についての次数、階乗、偏微分を表します。aα=(aα,1,aα,2,…,aα,m)Ta_{\alpha} = (a_{\alpha,1}, a_{\alpha,2}, \ldots, a_{\alpha,m})^{\mathrm{T}} として、多重指数 β\beta によるべきは、行列 ∑α∈Λn∖{0}aα,iEnα\sum_{\alpha \in \Lambda_n \setminus \{0\}} a_{\alpha,i} \mathcal{E}_n^{\alpha} の βi\beta_i 乗の、i=1,2,…,mi = 1, 2, \ldots, m についての積です。

演算子 T\mathcal{T} は、重要点 1 の演算子 TT の性質に対応する代数的な性質をもちます。f,g∈Cn(Ω:R)f, g \in C^n(\Omega : \mathbb{R}) に対して、次が成り立ちます。

T(f+g)=Tf+Tg;T(f⋅g)=(Tf)∗(Tg)\begin{aligned} \mathcal{T}(f + g) &= \mathcal{T} f + \mathcal{T} g; \\ \mathcal{T}(f \cdot g) &= (\mathcal{T} f) * (\mathcal{T} g) \end{aligned}

ここで、∗* は行列の積です。論文は、関数の合成についての性質も挙げています。計算例では、合成関数 f=f2∘f1f = f_2 \circ f_1 を Tf(⋅)=Tf2(Tf1(⋅))\mathcal{T} f(\cdot) = \mathcal{T} f_2(\mathcal{T} f_1(\cdot)) として計算しています。

論文は、実装のために、定義 (8) が、次の行列に基づく定義と等価であることを強調しています。

Tf:M↦∑∣β∣≤n∂βf(x)β!Q(M)β∣x=P(M)∈Mn(R)(9)\mathcal{T} f : M \mapsto \left. \sum_{|\beta| \leq n} \frac{\partial^{\beta} f(x)}{\beta!} Q(M)^{\beta} \right|_{x = P(M)} \in \mathbb{M}_n(\mathbb{R}) \tag{9}

ここで、M:=(M1,M2,…,Mm)TM := (M_1, M_2, \ldots, M_m)^{\mathrm{T}} は Mn(Ω)\mathbb{M}_n(\Omega) の元、P(M):=((M1)11,(M2)11,…,(Mm)11)T∈ΩP(M) := ((M_1)_{11}, (M_2)_{11}, \ldots, (M_m)_{11})^{\mathrm{T}} \in \Omega、Q(M):=M−P(M)⊗I2nQ(M) := M - P(M) \otimes I_{2^n} です。式 (9) は、M1,M2,…,MmM_1, M_2, \ldots, M_m の (1,1)(1, 1) 成分からなる点 P(M)P(M) における ff の Taylor 展開の増分を、行列 Q(M)Q(M) に置き換えた形をしています。

4. 基本定理:行列の成分として高階微分が現れる

行列 BB の (i,j)(i, j) 成分 BijB_{ij} を取り出す関数を Mi,j[B]\mathcal{M}_{i,j}[B] とします(論文では、この関数をドイツ文字(フラクトゥール)の M で書いています)。論文は、次の定理を証明しています(定理 1)。n,m∈Nn, m \in \mathbb{N}、f∈Cn(Ω:R)f \in C^n(\Omega : \mathbb{R})、η=(η1,η2,…,ηn)∈{1,2,…,m}n\eta = (\eta_1, \eta_2, \ldots, \eta_n) \in \{1, 2, \ldots, m\}^n とします。このとき、すべての a∈Ωa \in \Omega と k=1,2,…,nk = 1, 2, \ldots, n に対して、次が成り立ちます。

M1,2k[Tf(a⊗I2n+∑i=1nδηi⊗En,i)]=∂η1∂η2…∂ηkf(a)(10)\mathcal{M}_{1,2^k}\left[ \mathcal{T} f\left( a \otimes I_{2^n} + \sum_{i=1}^{n} \delta_{\eta_i} \otimes \mathcal{E}_{n,i} \right) \right] = \partial_{\eta_1} \partial_{\eta_2} \ldots \partial_{\eta_k} f(a) \tag{10}

ここで、δηi\delta_{\eta_i} と ∂ηi\partial_{\eta_i} は重要点 1 で定義したものです。つまり、行列 a⊗I2n+∑i=1nδηi⊗En,ia \otimes I_{2^n} + \sum_{i=1}^{n} \delta_{\eta_i} \otimes \mathcal{E}_{n,i} に Tf\mathcal{T} f を施すと、得られる 2n2^n 次の行列の (1,2k)(1, 2^k) 成分として、kk 階の偏微分 ∂η1∂η2…∂ηkf(a)\partial_{\eta_1} \partial_{\eta_2} \ldots \partial_{\eta_k} f(a) が現れます。

証明は、nn についての数学的帰納法によります。n=1n = 1 のとき、式 (10) の左辺の角括弧の中の行列は

(f(a)∂η1f(a)0f(a))\begin{pmatrix} f(a) & \partial_{\eta_1} f(a) \\ 0 & f(a) \end{pmatrix}

となり、式 (10) が成り立ちます。次に、式 (5)、(6)、(8) から、nn を 1 つ増やしたときの行列は、対角の 2 つのブロックが元の nn のときの行列、左下のブロックが零行列、右上のブロックが、追加した方向にもう 1 回微分した係数をもつ行列であるブロック行列として書けます。論文は、このことから、ある nn で式 (10) が成り立てば、nn を 1 つ増やしても成り立つことを示しています。

定理 1 から、関数 f∈Cn(Ω:R)f \in C^n(\Omega : \mathbb{R}) の a∈Ωa \in \Omega における nn 階までの常微分や偏微分を得ることができます。論文は、式 (10) から高階微分を計算する方法を HDN-M 微分と呼び、結論で、HDN-M 微分における高階微分の計算可能性は、この基本定理によって保証されると述べています。論文は、次の 2 点を付け加えています。

  • 除算 {f(x)}−1\{f(x)\}^{-1} は、h(x)=x−1h(x) = x^{-1} を使って h∘f(x)h \circ f(x) と表されるので、Th\mathcal{T} h を実装すれば、HDN-M 微分は除算(逆行列の演算)を必要としません。
  • 提案手法の実装は、行列に基づく定義 (9) と主結果 (10) に従います。

計算例

論文は、HDN-M 微分の計算手順の例を 2 つ示しています。

1 変数関数の 2 階微分

1 つ目の例は、f(x)=esin⁡(x)f(x) = e^{\sin(x)} の、a∈Ra \in \mathbb{R} における 2 階の常微分 f(2)f^{(2)} で、n=2n = 2、m=1m = 1 です。関数を、f1(x):=sin⁡(x)f_1(x) := \sin(x) と f2(x):=exf_2(x) := e^x を使って f=f2∘f1f = f_2 \circ f_1 と表します。M0:=aI4+E2,1+E2,2M_0 := a I_4 + \mathcal{E}_{2,1} + \mathcal{E}_{2,2} とします。Tf(⋅)=Tf2(Tf1(⋅))\mathcal{T} f(\cdot) = \mathcal{T} f_2(\mathcal{T} f_1(\cdot)) から、微分を次の手順で計算します。

まず、P(M0)=aP(M_0) = a から、M1:=Tf1(M0)M_1 := \mathcal{T} f_1(M_0) を次のように計算します。

M1=∑k=02f1(k)(x)k!Q(M0)k∣x=a=sin⁡(a)I4+cos⁡(a)Q(M0)−12sin⁡(a)Q(M0)2\begin{aligned} M_1 &= \left. \sum_{k=0}^{2} \frac{f_1^{(k)}(x)}{k!} Q(M_0)^k \right|_{x = a} \\ &= \sin(a) I_4 + \cos(a) Q(M_0) - \frac{1}{2} \sin(a) Q(M_0)^2 \end{aligned}

ここで、f1(k)f_1^{(k)} は f1f_1 の kk 階の導関数です。次に、P(M1)=sin⁡(a)P(M_1) = \sin(a) から、M2:=Tf2(M1)M_2 := \mathcal{T} f_2(M_1) を次のように計算します。

M2=∑k=02f2(k)(x)k!Q(M1)k∣x=sin⁡(a)=esin⁡(a)I4+esin⁡(a)Q(M1)+12esin⁡(a)Q(M1)2=(sttu0s0t00st000s)\begin{aligned} M_2 &= \left. \sum_{k=0}^{2} \frac{f_2^{(k)}(x)}{k!} Q(M_1)^k \right|_{x = \sin(a)} \\ &= e^{\sin(a)} I_4 + e^{\sin(a)} Q(M_1) + \frac{1}{2} e^{\sin(a)} Q(M_1)^2 \\ &= \begin{pmatrix} s & t & t & u \\ 0 & s & 0 & t \\ 0 & 0 & s & t \\ 0 & 0 & 0 & s \end{pmatrix} \end{aligned}

ここで、s:=esin⁡(a)s := e^{\sin(a)}、t:=cos⁡(a)esin⁡(a)t := \cos(a) e^{\sin(a)}、u:=(cos⁡2(a)−sin⁡(a))esin⁡(a)u := (\cos^2(a) - \sin(a)) e^{\sin(a)} です。最後に、定理 1 から、2 階の微分が M2M_2 の (1,22)(1, 2^2) 成分として得られます。

f(2)(a)=M1,22[M2]=u=(cos⁡2(a)−sin⁡(a))esin⁡(a)f^{(2)}(a) = \mathcal{M}_{1,2^2}[M_2] = u = (\cos^2(a) - \sin(a)) e^{\sin(a)}

2 変数関数の 3 階の偏微分

2 つ目の例は、g(x)=esin⁡(x1+2x2)g(x) = e^{\sin(x_1 + 2x_2)}(x=(x1,x2)Tx = (x_1, x_2)^{\mathrm{T}})の、a=(a1,a2)T∈R2a = (a_1, a_2)^{\mathrm{T}} \in \mathbb{R}^2 における 3 階の偏微分 ∂12∂2g\partial_1^2 \partial_2 g で、n=3n = 3、m=2m = 2 です。関数を、g1(x1,x2):=x1g_1(x_1, x_2) := x_1、g2(x1,x2):=2x2g_2(x_1, x_2) := 2x_2、g3(x):=sin⁡(x)g_3(x) := \sin(x)、g4(x):=exg_4(x) := e^x を使って g=g4∘g3∘(g1+g2)g = g_4 \circ g_3 \circ (g_1 + g_2) と表します。次の行列を考えます。

M^0:=a⊗I8+δ1⊗E3,1+δ1⊗E3,2+δ2⊗E3,3\widehat{M}_0 := a \otimes I_8 + \delta_1 \otimes \mathcal{E}_{3,1} + \delta_1 \otimes \mathcal{E}_{3,2} + \delta_2 \otimes \mathcal{E}_{3,3}

Tg(⋅)=Tg4(Tg3(Tg1(⋅)+Tg2(⋅)))\mathcal{T} g(\cdot) = \mathcal{T} g_4(\mathcal{T} g_3(\mathcal{T} g_1(\cdot) + \mathcal{T} g_2(\cdot))) から、微分を次の手順で計算します。

まず、行列に基づく定義 (9) により、M^1:=Tg1(M^0)\widehat{M}_1 := \mathcal{T} g_1(\widehat{M}_0) と M^2:=Tg2(M^0)\widehat{M}_2 := \mathcal{T} g_2(\widehat{M}_0) が、それぞれ M^1=a1I8+E3,1+E3,2\widehat{M}_1 = a_1 I_8 + \mathcal{E}_{3,1} + \mathcal{E}_{3,2}、M^2=2a2I8+2E3,3\widehat{M}_2 = 2a_2 I_8 + 2\mathcal{E}_{3,3} と得られます。次に、P(M^1+M^2)=a1+2a2P(\widehat{M}_1 + \widehat{M}_2) = a_1 + 2a_2 から、M^3=Tg3(M^1+M^2)\widehat{M}_3 = \mathcal{T} g_3(\widehat{M}_1 + \widehat{M}_2) を次のように計算します。

M^3=∑k=03g3(k)(x)k!Q(M^1+M^2)k∣x=a1+2a2=sin⁡(a1+2a2)I8+cos⁡(a1+2a2)Q(M^1+M^2)−12sin⁡(a1+2a2)Q(M^1+M^2)2−16cos⁡(a1+2a2)Q(M^1+M^2)3\begin{aligned} \widehat{M}_3 &= \left. \sum_{k=0}^{3} \frac{g_3^{(k)}(x)}{k!} Q(\widehat{M}_1 + \widehat{M}_2)^k \right|_{x = a_1 + 2a_2} \\ &= \sin(a_1 + 2a_2) I_8 + \cos(a_1 + 2a_2) Q(\widehat{M}_1 + \widehat{M}_2) \\ &\quad - \frac{1}{2} \sin(a_1 + 2a_2) Q(\widehat{M}_1 + \widehat{M}_2)^2 \\ &\quad - \frac{1}{6} \cos(a_1 + 2a_2) Q(\widehat{M}_1 + \widehat{M}_2)^3 \end{aligned}

続いて、P(M^3)=sin⁡(a1+2a2)P(\widehat{M}_3) = \sin(a_1 + 2a_2) から、M^4=Tg4(M^3)\widehat{M}_4 = \mathcal{T} g_4(\widehat{M}_3) を次のように計算します。

M^4=∑k=03g4(k)(x)k!Q(M^3)k∣x=sin⁡(a1+2a2)=esin⁡(a1+2a2)I8+esin⁡(a1+2a2)Q(M^3)+12esin⁡(a1+2a2)Q(M^3)2+16esin⁡(a1+2a2)Q(M^3)3\begin{aligned} \widehat{M}_4 &= \left. \sum_{k=0}^{3} \frac{g_4^{(k)}(x)}{k!} Q(\widehat{M}_3)^k \right|_{x = \sin(a_1 + 2a_2)} \\ &= e^{\sin(a_1 + 2a_2)} I_8 + e^{\sin(a_1 + 2a_2)} Q(\widehat{M}_3) \\ &\quad + \frac{1}{2} e^{\sin(a_1 + 2a_2)} Q(\widehat{M}_3)^2 + \frac{1}{6} e^{\sin(a_1 + 2a_2)} Q(\widehat{M}_3)^3 \end{aligned}

行列 M^4\widehat{M}_4 は 8 次の行列です。最後に、定理 1 から、3 階の偏微分 ∂12∂2g(a1,a2)\partial_1^2 \partial_2 g(a_1, a_2) が、その (1,23)(1, 2^3) 成分 M1,23[M^4]\mathcal{M}_{1,2^3}[\widehat{M}_4] として得られます。

論文は、これらの例から、HDN-M 微分に必要なのは、基本的な関数について、1 次元の空間(m=1m = 1)での行列に基づく定義 (9) を実装することだけであると述べています。

今後の展開

論文は、結論で次の展望を述べています。

  • 論文によれば、HDN-M 微分は多変数関数に対しても簡単に実装でき、この性質は、既存の線形代数のライブラリの適用による高速化や、上三角行列の演算に特化した高速化手法の開発といった、HDN-M 微分の今後の課題と可能性をもたらします。
  • 同様に、論文は、高い信頼性、高い精度、高い汎用性、高い速度を備えた高階微分の数値計算法を開発するために、精度保証付き数値計算をさらに探究すべきであると述べています。
Graphical abstract
Graphical abstract

Overview

In numerical analysis, it is often necessary to calculate higher-order derivatives of given functions strictly. For example, numerical simulations of nonlinear materials based on the incremental variational formulation require higher-order derivatives of two potentials, a free energy and a dissipation function. Hyper-dual numbers (HDN) are an extension of dual numbers (DN) and are defined using nilpotent elements that differ from each other. By introducing an operator that extends the domain of functions to the space of HDN based on Taylor expansion, higher-order derivatives can be obtained from the coefficients. The computational method that utilizes this property is referred to as HDN differentiation. HDN differentiation does not require the implementation of derivative rules, but it does require additional implementations based on the operation rules of HDN. The paper points out that dedicated methods therefore have to be developed to enhance its performance, and that the prospects of high-speed or self-validating numerics for HDN differentiation are low.

This paper constructs matrix representations of HDN by an inductive definition, as an extension of the matrix representation of DN, and introduces an operator that extends the domain of functions to the space spanned by these matrix representations. It proves that higher-order derivatives are obtained by referring to appropriate elements of the matrix given by this operator (the fundamental theorem), proposes a numerical method for higher-order derivatives based on the theorem, called HDN-M differentiation, and gives two examples. Because the operation rules of HDN are replaced with those of matrices, HDN-M differentiation computes higher-order derivatives with matrix operation rules, without implementing the operation rules of HDN. The paper also states that HDN-M differentiation can easily be accelerated by utilizing existing libraries for linear algebra.

Key points

1. Higher-order derivatives from the coefficients of hyper-dual numbers, and the issue of implementation

Hyper-dual numbers are defined with nn elements ε=(ε1,ε2,…,εn)T\varepsilon = (\varepsilon_1, \varepsilon_2, \ldots, \varepsilon_n)^{\mathrm{T}} that satisfy

εi≠0 (i=1,2,…,n);εi2=0 (i=1,2,…,n);εi≠εj (i≠j);εiεj=εjεi≠0 (i≠j)(1)\begin{aligned} &\varepsilon_i \neq 0 \ (i = 1, 2, \ldots, n); \quad \varepsilon_i^2 = 0 \ (i = 1, 2, \ldots, n); \\ &\varepsilon_i \neq \varepsilon_j \ (i \neq j); \quad \varepsilon_i \varepsilon_j = \varepsilon_j \varepsilon_i \neq 0 \ (i \neq j) \end{aligned} \tag{1}

The nnth-order hyper-dual numbers are the numbers of the form

∑α∈Λnaαεα,aα∈Rm(2)\sum_{\alpha \in \Lambda_n} a_{\alpha} \varepsilon^{\alpha}, \quad a_{\alpha} \in \mathbb{R}^m \tag{2}

Here, Λn\Lambda_n is the set of nn-dimensional multi-indices α\alpha whose components are 0 or 1, and εα\varepsilon^{\alpha} is the product of εiαi\varepsilon_i^{\alpha_i} (i=1,2,…,ni = 1, 2, \ldots, n), where εi0:=1\varepsilon_i^0 := 1. The coefficients aαa_{\alpha} are vectors in Rm\mathbb{R}^m, where m∈Nm \in \mathbb{N}.

Let Ω\Omega be a domain in Rm\mathbb{R}^m. The paper defines an operator TT that corresponds to the Taylor expansion and extends the domain of a function f∈Cn(Ω:R)f \in C^n(\Omega : \mathbb{R}) to the space of the nnth-order hyper-dual numbers whose coefficient a0a_0 belongs to Ω\Omega. For a∈Ωa \in \Omega and η=(η1,η2,…,ηn)∈{1,2,…,m}n\eta = (\eta_1, \eta_2, \ldots, \eta_n) \in \{1, 2, \ldots, m\}^n, this operator gives

Tf(a+∑i=1nδηiεi)=∑α∈Λn∂ηαf(a)εαT f\left(a + \sum_{i=1}^{n} \delta_{\eta_i} \varepsilon_i\right) = \sum_{\alpha \in \Lambda_n} \partial_{\eta}^{\alpha} f(a) \varepsilon^{\alpha}

Here, δi:=(δi1,δi2,…,δim)T∈{0,1}m\delta_i := (\delta_{i1}, \delta_{i2}, \ldots, \delta_{im})^{\mathrm{T}} \in \{0, 1\}^m, where δij\delta_{ij} is the Kronecker delta, and ∂η:=(∂η1,∂η2,…,∂ηn)T\partial_{\eta} := (\partial_{\eta_1}, \partial_{\eta_2}, \ldots, \partial_{\eta_n})^{\mathrm{T}}. That is, ∂ηαf(a)\partial_{\eta}^{\alpha} f(a) is the partial derivative of ff at aa obtained by applying ∂ηi\partial_{\eta_i}, the partial derivative with respect to the ηi\eta_i-th variable, for every ii with αi=1\alpha_i = 1. The partial derivative ∂ηαf(a)\partial_{\eta}^{\alpha} f(a) is thus obtained as the coefficient of εα\varepsilon^{\alpha} (Eq. (4) of the paper). The operator TT also has algebraic properties for the sum, product, and composition of functions (Eq. (3) of the paper). Therefore, for a function represented by the sum, product, and composition of some components, up to nnth-order ordinary or partial derivatives can be obtained if the components and their derivatives are given. The computational method of higher-order derivatives that utilizes this property is HDN differentiation.

The paper compares methods for computing higher-order derivatives as follows (Table 1 of the original paper).

Method Accuracy Implementation of operations
Numerical differentiation (finite difference method) low unnecessary
Automatic differentiation high necessary
HDN differentiation high necessary
Proposed method (HDN-M differentiation) high unnecessary (replaced with matrix operations)

Automatic differentiation computes strict derivatives based on derivative rules such as the Leibniz rule and Faà di Bruno's formula, but the paper notes that the algebraic structures based on derivative rules are quite complex, which disturbs its acceleration. HDN differentiation utilizes only the implementations of the HDN operation rules and the operator, without any implementation of the derivative rules. However, it requires additional implementations based on the HDN operation rules. The paper therefore develops a new derivative method that does not require the implementation of the HDN operation rules (key points 2 to 4).

2. Matrix representations of hyper-dual numbers, defined inductively

The paper constructs matrix representations of HDN as an extension of the matrix representation of DN. For k∈Nk \in \mathbb{N}, let Mk(R)M_k(\mathbb{R}) be the set of all kk-by-kk square matrices over R\mathbb{R}, and let IkI_k and OkO_k be the kk-by-kk identity matrix and the kk-by-kk zero matrix, respectively. The matrices En,i∈M2n(R)\mathcal{E}_{n,i} \in M_{2^n}(\mathbb{R}) (n≥2n \geq 2, i=1,2,…,ni = 1, 2, \ldots, n) are inductively defined as

En,i=(En−1,iO2n−1O2n−1En−1,i),i=1,2,…,n−1(5)\mathcal{E}_{n,i} = \begin{pmatrix} \mathcal{E}_{n-1,i} & O_{2^{n-1}} \\ O_{2^{n-1}} & \mathcal{E}_{n-1,i} \end{pmatrix}, \quad i = 1, 2, \ldots, n - 1 \tag{5} En,n=(O2n−1I2n−1O2n−1O2n−1)(6)\mathcal{E}_{n,n} = \begin{pmatrix} O_{2^{n-1}} & I_{2^{n-1}} \\ O_{2^{n-1}} & O_{2^{n-1}} \end{pmatrix} \tag{6}

Here, E1,1∈M2(R)\mathcal{E}_{1,1} \in M_2(\mathbb{R}) is

E1,1:=(0100)\mathcal{E}_{1,1} := \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}

These matrices satisfy the following properties, which correspond to (1).

En,i≠O2n(i=1,2,…,n);En,i2=O2n(i=1,2,…,n);En,i≠En,j(i≠j);En,iEn,j=En,jEn,i≠O2n(i≠j)\begin{aligned} &\mathcal{E}_{n,i} \neq O_{2^n} \quad (i = 1, 2, \ldots, n); \\ &\mathcal{E}_{n,i}^2 = O_{2^n} \quad (i = 1, 2, \ldots, n); \\ &\mathcal{E}_{n,i} \neq \mathcal{E}_{n,j} \quad (i \neq j); \\ &\mathcal{E}_{n,i} \mathcal{E}_{n,j} = \mathcal{E}_{n,j} \mathcal{E}_{n,i} \neq O_{2^n} \quad (i \neq j) \end{aligned}

Therefore, the matrix

∑α∈Λnaα⊗Enα,aα∈Rm(7)\sum_{\alpha \in \Lambda_n} a_{\alpha} \otimes \mathcal{E}_n^{\alpha}, \quad a_{\alpha} \in \mathbb{R}^m \tag{7}

is a matrix representation of the hyper-dual numbers (2). Here, En:=(En,1,En,2,…,En,n)T\mathcal{E}_n := (\mathcal{E}_{n,1}, \mathcal{E}_{n,2}, \ldots, \mathcal{E}_{n,n})^{\mathrm{T}}, Enα=En,1α1En,2α2…En,nαn\mathcal{E}_n^{\alpha} = \mathcal{E}_{n,1}^{\alpha_1} \mathcal{E}_{n,2}^{\alpha_2} \ldots \mathcal{E}_{n,n}^{\alpha_n}, and En,i0=I2n\mathcal{E}_{n,i}^0 = I_{2^n} (i=1,2,…,ni = 1, 2, \ldots, n). The paper denotes by Mn(Ω)\mathbb{M}_n(\Omega) the space spanned by the matrices (7) whose coefficient a0a_0 belongs to Ω\Omega.

3. An operator that extends the domain of functions to the space of the matrix representations

The paper defines the operator T\mathcal{T} with respect to f∈Cn(Ω:R)f \in C^n(\Omega : \mathbb{R}) as

Tf:∑α∈Λnaα⊗Enα↦∑∣β∣≤n∂βf(a0)β!(∑α∈Λn∖{0}aα⊗Enα)β∈Mn(R)(8)\mathcal{T} f : \sum_{\alpha \in \Lambda_n} a_{\alpha} \otimes \mathcal{E}_n^{\alpha} \mapsto \sum_{|\beta| \leq n} \frac{\partial^{\beta} f(a_0)}{\beta!} \left( \sum_{\alpha \in \Lambda_n \setminus \{0\}} a_{\alpha} \otimes \mathcal{E}_n^{\alpha} \right)^{\beta} \in \mathbb{M}_n(\mathbb{R}) \tag{8}

Here, the argument (the left side of ↦\mapsto) is an element of Mn(Ω)\mathbb{M}_n(\Omega), and β=(β1,β2,…,βm)\beta = (\beta_1, \beta_2, \ldots, \beta_m) is an mm-dimensional multi-index; ∣β∣|\beta|, β!\beta!, and ∂β\partial^{\beta} denote the order, the factorial, and the partial derivative for the multi-index β\beta. With aα=(aα,1,aα,2,…,aα,m)Ta_{\alpha} = (a_{\alpha,1}, a_{\alpha,2}, \ldots, a_{\alpha,m})^{\mathrm{T}}, the power with the multi-index β\beta is the product, over i=1,2,…,mi = 1, 2, \ldots, m, of the βi\beta_i-th powers of the matrices ∑α∈Λn∖{0}aα,iEnα\sum_{\alpha \in \Lambda_n \setminus \{0\}} a_{\alpha,i} \mathcal{E}_n^{\alpha}.

The operator T\mathcal{T} has algebraic properties that correspond to those of the operator TT in key point 1. For f,g∈Cn(Ω:R)f, g \in C^n(\Omega : \mathbb{R}),

T(f+g)=Tf+Tg;T(f⋅g)=(Tf)∗(Tg)\begin{aligned} \mathcal{T}(f + g) &= \mathcal{T} f + \mathcal{T} g; \\ \mathcal{T}(f \cdot g) &= (\mathcal{T} f) * (\mathcal{T} g) \end{aligned}

Here, ∗* is the matrix product. The paper also gives a property for the composition of functions; in the examples, a composite function f=f2∘f1f = f_2 \circ f_1 is computed as Tf(⋅)=Tf2(Tf1(⋅))\mathcal{T} f(\cdot) = \mathcal{T} f_2(\mathcal{T} f_1(\cdot)).

For implementations, the paper emphasizes that the definition (8) is equivalent to the following matrix-based definition:

Tf:M↦∑∣β∣≤n∂βf(x)β!Q(M)β∣x=P(M)∈Mn(R)(9)\mathcal{T} f : M \mapsto \left. \sum_{|\beta| \leq n} \frac{\partial^{\beta} f(x)}{\beta!} Q(M)^{\beta} \right|_{x = P(M)} \in \mathbb{M}_n(\mathbb{R}) \tag{9}

Here, M:=(M1,M2,…,Mm)TM := (M_1, M_2, \ldots, M_m)^{\mathrm{T}} is an element of Mn(Ω)\mathbb{M}_n(\Omega), P(M):=((M1)11,(M2)11,…,(Mm)11)T∈ΩP(M) := ((M_1)_{11}, (M_2)_{11}, \ldots, (M_m)_{11})^{\mathrm{T}} \in \Omega, and Q(M):=M−P(M)⊗I2nQ(M) := M - P(M) \otimes I_{2^n}. Equation (9) has the form of the Taylor expansion of ff at the point P(M)P(M), which consists of the (1,1)(1, 1) elements of M1,M2,…,MmM_1, M_2, \ldots, M_m, with the increment replaced by the matrix Q(M)Q(M).

4. The fundamental theorem: higher-order derivatives appear as elements of the matrix

Let Mi,j[B]\mathcal{M}_{i,j}[B] be the function that picks up the (i,j)(i, j) element BijB_{ij} of a matrix BB (in the paper, this function is written with a Fraktur letter M). The paper proves the following theorem (Theorem 1). Let n,m∈Nn, m \in \mathbb{N}, f∈Cn(Ω:R)f \in C^n(\Omega : \mathbb{R}), and η=(η1,η2,…,ηn)∈{1,2,…,m}n\eta = (\eta_1, \eta_2, \ldots, \eta_n) \in \{1, 2, \ldots, m\}^n. Then, for all a∈Ωa \in \Omega and k=1,2,…,nk = 1, 2, \ldots, n,

M1,2k[Tf(a⊗I2n+∑i=1nδηi⊗En,i)]=∂η1∂η2…∂ηkf(a)(10)\mathcal{M}_{1,2^k}\left[ \mathcal{T} f\left( a \otimes I_{2^n} + \sum_{i=1}^{n} \delta_{\eta_i} \otimes \mathcal{E}_{n,i} \right) \right] = \partial_{\eta_1} \partial_{\eta_2} \ldots \partial_{\eta_k} f(a) \tag{10}

Here, δηi\delta_{\eta_i} and ∂ηi\partial_{\eta_i} are those defined in key point 1. In other words, when Tf\mathcal{T} f is applied to the matrix a⊗I2n+∑i=1nδηi⊗En,ia \otimes I_{2^n} + \sum_{i=1}^{n} \delta_{\eta_i} \otimes \mathcal{E}_{n,i}, the kkth-order partial derivative ∂η1∂η2…∂ηkf(a)\partial_{\eta_1} \partial_{\eta_2} \ldots \partial_{\eta_k} f(a) appears as the (1,2k)(1, 2^k) element of the resulting 2n2^n-by-2n2^n matrix.

The proof is by mathematical induction on nn. For n=1n = 1, the matrix in the square brackets on the left-hand side of (10) is

(f(a)∂η1f(a)0f(a))\begin{pmatrix} f(a) & \partial_{\eta_1} f(a) \\ 0 & f(a) \end{pmatrix}

and (10) holds. Next, from (5), (6), and (8), the matrix for nn increased by one is written as a block matrix in which the two diagonal blocks are the matrix for the original nn, the lower-left block is the zero matrix, and the upper-right block is the matrix whose coefficients are differentiated once more in the added direction. From this, the paper shows that if (10) holds for some nn, it also holds for nn increased by one.

From Theorem 1, up to nnth-order ordinary or partial derivatives of a function f∈Cn(Ω:R)f \in C^n(\Omega : \mathbb{R}) at a∈Ωa \in \Omega can be obtained. The paper calls the method of computing higher-order derivatives from (10) HDN-M differentiation, and states in the concluding remarks that the computability of higher-order derivatives in HDN-M differentiation is ensured by this fundamental theorem. The paper adds the following two notes.

  • Because the division {f(x)}−1\{f(x)\}^{-1} is represented as h∘f(x)h \circ f(x) with h(x)=x−1h(x) = x^{-1}, HDN-M differentiation does not require the division (the inverse matrix operation) when Th\mathcal{T} h is implemented.
  • The implementation of the proposed method follows the matrix-based definition (9) and the main result (10).

Examples

The paper shows two examples of the computational procedure of HDN-M differentiation.

Second-order derivative of a function of one variable

The first example is the second-order ordinary derivative f(2)f^{(2)} at a∈Ra \in \mathbb{R} of f(x)=esin⁡(x)f(x) = e^{\sin(x)}, with n=2n = 2 and m=1m = 1. The function is represented as f=f2∘f1f = f_2 \circ f_1, where f1(x):=sin⁡(x)f_1(x) := \sin(x) and f2(x):=exf_2(x) := e^x. Let M0:=aI4+E2,1+E2,2M_0 := a I_4 + \mathcal{E}_{2,1} + \mathcal{E}_{2,2}. From Tf(⋅)=Tf2(Tf1(⋅))\mathcal{T} f(\cdot) = \mathcal{T} f_2(\mathcal{T} f_1(\cdot)), the derivative is computed by the following steps.

First, from P(M0)=aP(M_0) = a, M1:=Tf1(M0)M_1 := \mathcal{T} f_1(M_0) is computed as

M1=∑k=02f1(k)(x)k!Q(M0)k∣x=a=sin⁡(a)I4+cos⁡(a)Q(M0)−12sin⁡(a)Q(M0)2\begin{aligned} M_1 &= \left. \sum_{k=0}^{2} \frac{f_1^{(k)}(x)}{k!} Q(M_0)^k \right|_{x = a} \\ &= \sin(a) I_4 + \cos(a) Q(M_0) - \frac{1}{2} \sin(a) Q(M_0)^2 \end{aligned}

Here, f1(k)f_1^{(k)} is the kkth-order derivative of f1f_1. Next, from P(M1)=sin⁡(a)P(M_1) = \sin(a), M2:=Tf2(M1)M_2 := \mathcal{T} f_2(M_1) is computed as

M2=∑k=02f2(k)(x)k!Q(M1)k∣x=sin⁡(a)=esin⁡(a)I4+esin⁡(a)Q(M1)+12esin⁡(a)Q(M1)2=(sttu0s0t00st000s)\begin{aligned} M_2 &= \left. \sum_{k=0}^{2} \frac{f_2^{(k)}(x)}{k!} Q(M_1)^k \right|_{x = \sin(a)} \\ &= e^{\sin(a)} I_4 + e^{\sin(a)} Q(M_1) + \frac{1}{2} e^{\sin(a)} Q(M_1)^2 \\ &= \begin{pmatrix} s & t & t & u \\ 0 & s & 0 & t \\ 0 & 0 & s & t \\ 0 & 0 & 0 & s \end{pmatrix} \end{aligned}

Here, s:=esin⁡(a)s := e^{\sin(a)}, t:=cos⁡(a)esin⁡(a)t := \cos(a) e^{\sin(a)}, and u:=(cos⁡2(a)−sin⁡(a))esin⁡(a)u := (\cos^2(a) - \sin(a)) e^{\sin(a)}. Finally, from Theorem 1, the second-order derivative is obtained as the (1,22)(1, 2^2) element of M2M_2:

f(2)(a)=M1,22[M2]=u=(cos⁡2(a)−sin⁡(a))esin⁡(a)f^{(2)}(a) = \mathcal{M}_{1,2^2}[M_2] = u = (\cos^2(a) - \sin(a)) e^{\sin(a)}

Third-order partial derivative of a function of two variables

The second example is the third-order partial derivative ∂12∂2g\partial_1^2 \partial_2 g at a=(a1,a2)T∈R2a = (a_1, a_2)^{\mathrm{T}} \in \mathbb{R}^2 of g(x)=esin⁡(x1+2x2)g(x) = e^{\sin(x_1 + 2x_2)} (x=(x1,x2)Tx = (x_1, x_2)^{\mathrm{T}}), with n=3n = 3 and m=2m = 2. The function is represented as g=g4∘g3∘(g1+g2)g = g_4 \circ g_3 \circ (g_1 + g_2), where g1(x1,x2):=x1g_1(x_1, x_2) := x_1, g2(x1,x2):=2x2g_2(x_1, x_2) := 2x_2, g3(x):=sin⁡(x)g_3(x) := \sin(x), and g4(x):=exg_4(x) := e^x. Let

M^0:=a⊗I8+δ1⊗E3,1+δ1⊗E3,2+δ2⊗E3,3\widehat{M}_0 := a \otimes I_8 + \delta_1 \otimes \mathcal{E}_{3,1} + \delta_1 \otimes \mathcal{E}_{3,2} + \delta_2 \otimes \mathcal{E}_{3,3}

From Tg(⋅)=Tg4(Tg3(Tg1(⋅)+Tg2(⋅)))\mathcal{T} g(\cdot) = \mathcal{T} g_4(\mathcal{T} g_3(\mathcal{T} g_1(\cdot) + \mathcal{T} g_2(\cdot))), the derivative is computed by the following steps.

First, based on the matrix-based definition (9), M^1:=Tg1(M^0)\widehat{M}_1 := \mathcal{T} g_1(\widehat{M}_0) and M^2:=Tg2(M^0)\widehat{M}_2 := \mathcal{T} g_2(\widehat{M}_0) are obtained as M^1=a1I8+E3,1+E3,2\widehat{M}_1 = a_1 I_8 + \mathcal{E}_{3,1} + \mathcal{E}_{3,2} and M^2=2a2I8+2E3,3\widehat{M}_2 = 2a_2 I_8 + 2\mathcal{E}_{3,3}, respectively. Next, from P(M^1+M^2)=a1+2a2P(\widehat{M}_1 + \widehat{M}_2) = a_1 + 2a_2, M^3=Tg3(M^1+M^2)\widehat{M}_3 = \mathcal{T} g_3(\widehat{M}_1 + \widehat{M}_2) is computed as

M^3=∑k=03g3(k)(x)k!Q(M^1+M^2)k∣x=a1+2a2=sin⁡(a1+2a2)I8+cos⁡(a1+2a2)Q(M^1+M^2)−12sin⁡(a1+2a2)Q(M^1+M^2)2−16cos⁡(a1+2a2)Q(M^1+M^2)3\begin{aligned} \widehat{M}_3 &= \left. \sum_{k=0}^{3} \frac{g_3^{(k)}(x)}{k!} Q(\widehat{M}_1 + \widehat{M}_2)^k \right|_{x = a_1 + 2a_2} \\ &= \sin(a_1 + 2a_2) I_8 + \cos(a_1 + 2a_2) Q(\widehat{M}_1 + \widehat{M}_2) \\ &\quad - \frac{1}{2} \sin(a_1 + 2a_2) Q(\widehat{M}_1 + \widehat{M}_2)^2 \\ &\quad - \frac{1}{6} \cos(a_1 + 2a_2) Q(\widehat{M}_1 + \widehat{M}_2)^3 \end{aligned}

Then, from P(M^3)=sin⁡(a1+2a2)P(\widehat{M}_3) = \sin(a_1 + 2a_2), M^4=Tg4(M^3)\widehat{M}_4 = \mathcal{T} g_4(\widehat{M}_3) is computed as

M^4=∑k=03g4(k)(x)k!Q(M^3)k∣x=sin⁡(a1+2a2)=esin⁡(a1+2a2)I8+esin⁡(a1+2a2)Q(M^3)+12esin⁡(a1+2a2)Q(M^3)2+16esin⁡(a1+2a2)Q(M^3)3\begin{aligned} \widehat{M}_4 &= \left. \sum_{k=0}^{3} \frac{g_4^{(k)}(x)}{k!} Q(\widehat{M}_3)^k \right|_{x = \sin(a_1 + 2a_2)} \\ &= e^{\sin(a_1 + 2a_2)} I_8 + e^{\sin(a_1 + 2a_2)} Q(\widehat{M}_3) \\ &\quad + \frac{1}{2} e^{\sin(a_1 + 2a_2)} Q(\widehat{M}_3)^2 + \frac{1}{6} e^{\sin(a_1 + 2a_2)} Q(\widehat{M}_3)^3 \end{aligned}

The matrix M^4\widehat{M}_4 is an 8-by-8 matrix. Finally, from Theorem 1, the third-order partial derivative ∂12∂2g(a1,a2)\partial_1^2 \partial_2 g(a_1, a_2) is obtained as its (1,23)(1, 2^3) element, M1,23[M^4]\mathcal{M}_{1,2^3}[\widehat{M}_4].

From these examples, the paper notes that HDN-M differentiation only requires the implementation of the matrix-based definition (9) with one-dimensional space (m=1m = 1) for fundamental functions.

Outlook

In the concluding remarks, the paper states the following prospects.

  • According to the paper, HDN-M differentiation is simple to implement even for multi-variable functions, and this property poses future issues and opportunities for HDN-M differentiation, such as acceleration by applying existing libraries of linear algebra and the development of acceleration methods specialized for operations for upper triangular matrices.
  • Likewise, the paper states that self-validating numerics should be explored further, in order to develop a numerical method for higher-order derivatives with high reliability, high accuracy, high versatility, and high speed.