ルンゲクッタ法の精度確認

November 20, 2019      

ルンゲクッタ法の更新式

一般に,(1)の時間発展を計算したい場合,手軽に使用できるのが古典的なルンゲクッタ法だ.

dxdt=f(x,t)\begin{equation} % \label{eq:differential} \frac{d\bm{x}}{dt} = f(\bm{x}, t) \end{equation}

これを用いると,hhを時間ステップ幅として次のように計算を進めることができる.

k1=f(x,t)k2=f(x+h2k1,t+h2) k3=f(x+h2k2,t+h2)k4=f(x+hk3,t+h)\begin{align*} % \label{eq:runge_kutta} &\bm{k}_1 = f(\bm{x}, t) \\ &\bm{k}_2 = f(\bm{x} + \frac{h}{2} \bm{k}_1, t + \frac{h}{2})  \\ &\bm{k}_3 = f(\bm{x} + \frac{h}{2} \bm{k}_2, t + \frac{h}{2}) \\ &\bm{k}_4 = f(\bm{x} + h \bm{k}_3, t + h) \\ \end{align*}
Δx=h6(k1+2k2+2k3+k4)\begin{equation} \Delta \bm{x} = \frac{h}{6} (\bm{k}_1 + 2\bm{k}_2 + 2\bm{k}_3 + \bm{k}_4) \end{equation}

ルンゲクッタ法の利点は,4次精度の近似を行いつつも更新式が非常にシンプルに表されている点だ.4次精度を得たいだけであれば,それを実現するようなスキームはいくらでも作り出すことが出来るので,ルンゲクッタ法の重要なポイントは手順のシンプルさにあると言ってもいいだろう.今回は,(2)の表記は与えられているものとして,これが4次精度を実現出来ているということを確認してみたい.

4次精度の意味

まず4次精度ということの意味はなんだろうか.ある点(x0,t0)(x_0, t_0)の周りで(3)と近似したとき,そのままの形で,点(x0,t0)(x_0, t_0)でのテイラー展開(4)と4次の項まで一致すれば文句なしだが,そんなことはない.(3)のhhについての微係数が4次まで一致するのである.(あるいは(3)をhhについてテイラー展開し直したものが(4)と4次の項まで一致するといってもいい.)

x~=x0+h6(k1+2k2+2k3+k4)\begin{equation} % \label{eq:x0} \tilde{x} = x_0 + \frac{h}{6} (k_1 + 2k_2 + 2k_3 + k_4) \end{equation}
x=x0+dxdth+12d2xdt2h2+16d3xdt3h3+124d4xdt4h4+O(h5)\begin{equation} % \label{eq:taylor} x = x_0 + \frac{dx}{dt} h + \frac{1}{2} \frac{d^2x}{dt^2} h^2 + \frac{1}{6} \frac{d^3x}{dt^3} h^3 + \frac{1}{24} \frac{d^4x}{dt^4} h^4 + O(h^5) \end{equation}

x~\tilde{x}hhに関する微分を見てみよう.

dx~dh=16(k1+2k2+2k3+k4)+h6[dk1dh+2dk2dh+2dk3dh+dk4dh]d2x~dh2= 13[dk1dh+2dk2dh+2dk3dh+dk4dh]+ h6[d2k1dh2+2d2k2dh2+2d2k3dh2+d2k4dh2]d3x~dh3= 12[d2k1dh2+2d2k2dh2+2d2k3dh2+d2k4dh2]+ h6[d3k1dh3+2d3k2dh3+2d3k3dh3+d3k4dh3]d4x~dh4=23[d3k1dh3+2d3k2dh3+2d3k3dh3+d3k4dh3]+ h6[d4k1dh4+2d4k2dh4+2d4k3dh4+d4k4dh4]\begin{gather*} \frac{d\tilde{x}}{dh} = \frac{1}{6} (k_1 + 2k_2 + 2k_3 + k_4) + \frac{h}{6} \left[ \frac{dk_1}{dh} + 2\frac{dk_2}{dh} + 2\frac{dk_3}{dh} + \frac{dk_4}{dh}\right] \\ \frac{d^2\tilde{x}}{dh^2} = \frac{1}{3} \left[ \frac{dk_1}{dh} + 2\frac{dk_2}{dh} + 2\frac{dk_3}{dh} + \frac{dk_4}{dh}\right] + \frac{h}{6} \left[ \frac{d^2k_1}{dh^2} + 2\frac{d^2k_2}{dh^2} + 2\frac{d^2k_3}{dh^2} + \frac{d^2k_4}{dh^2}\right] \\ \frac{d^3\tilde{x}}{dh^3} = \frac{1}{2} \left[ \frac{d^2k_1}{dh^2} + 2\frac{d^2k_2}{dh^2} + 2\frac{d^2k_3}{dh^2} + \frac{d^2k_4}{dh^2}\right] + \frac{h}{6} \left[ \frac{d^3k_1}{dh^3} + 2\frac{d^3k_2}{dh^3} + 2\frac{d^3k_3}{dh^3} + \frac{d^3k_4}{dh^3}\right] \\ \frac{d^4\tilde{x}}{dh^4} = \frac{2}{3} \left[ \frac{d^3k_1}{dh^3} + 2\frac{d^3k_2}{dh^3} + 2\frac{d^3k_3}{dh^3} + \frac{d^3k_4}{dh^3}\right] + \frac{h}{6} \left[ \frac{d^4k_1}{dh^4} + 2\frac{d^4k_2}{dh^4} + 2\frac{d^4k_3}{dh^4} + \frac{d^4k_4}{dh^4}\right] \end{gather*}

h=0h=0での微係数についてのみ考えたいので,いずれの場合もhhの1次の項になっている部分は無視してしまってよい.これらが,dxdt,d2xdt2,d3xdt3,d4xdt4\frac{dx}{dt}, \frac{d^2x}{dt^2}, \frac{d^3x}{dt^3}, \frac{d^4x}{dt^4}と一致することを示せば,4次精度(より正確には,ルンゲクッタ法1ステップの誤差がO(h5)O(h^5)オーダーであるということ)が確認できたことになる.

ルンゲクッタ法の精度確認

ここからは,地道に4次精度となっていることを確認していこう.まず,実現するべき1~4次の微係数を求めておく.

dxdt=f\begin{equation*} \frac{dx}{dt} = f \end{equation*}
d2xdt2=ft+fxdxdt=ft+fxf\begin{equation*} \frac{d^2x}{dt^2} = \frac{\partial f}{\partial t} + \frac{\partial f}{\partial x} \frac{dx}{dt} = \frac{\partial f}{\partial t} + \frac{\partial f}{\partial x} f \end{equation*}
d3xdt3=t(ft+fxf)+x(ft+fxf)f=2ft2+2ftxf+fxft+2fxtf+2fx2f2+(fx)2f=2ft2+22ftxf+fxft+2fx2f2+(fx)2f\begin{align*} \frac{d^3x}{dt^3} &= \frac{\partial}{\partial t} \left( \frac{\partial f}{\partial t} + \frac{\partial f}{\partial x} f \right)+ \frac{\partial}{\partial x} \left( \frac{\partial f}{\partial t} + \frac{\partial f}{\partial x} f \right) f \\ &= \frac{\partial^2 f}{\partial t^2} + \frac{\partial^2 f}{\partial t \partial x} f + \frac{\partial f}{\partial x} \frac{\partial f}{\partial t} + \frac{\partial^2 f}{\partial x \partial t} f + \frac{\partial^2 f}{\partial x^2} f^2 + \left( \frac{\partial f}{\partial x} \right)^2 f \\ &= \frac{\partial^2 f}{\partial t^2} + 2\frac{\partial^2 f}{\partial t \partial x} f + \frac{\partial f}{\partial x} \frac{\partial f}{\partial t} + \frac{\partial^2 f}{\partial x^2} f^2 + \left( \frac{\partial f}{\partial x} \right)^2 f \end{align*}
d4xdt4=t(d3xdt3)+x(d3xdt3)f=3ft3+23ft2xf+22ftxft+2ftxft+fx2ft2   +3ftx2f2+22fx2ftf+22ftxfxf+(fx)2ft   +3fxt2f+23ftx2f2+22ftxfxf+2fx2ftf+fx2fxtf   +3fx3f3+22fx2fxf2+22fx2fxf2+(fx)3f=3ft3+33ft2xf +33ftx2f2+3fx3f3   +32ftxft+52ftxfxf+32fx2ftf+fx2ft2+42fx2fxf2   +(fx)2ft+(fx)3f\begin{align*} \frac{d^4x}{dt^4} &= \frac{\partial}{\partial t} \left( \frac{d^3x}{dt^3} \right)+ \frac{\partial}{\partial x} \left( \frac{d^3x}{dt^3} \right) f \\ &= \frac{\partial^3 f}{\partial t^3} + 2 \frac{\partial^3 f}{\partial t^2 \partial x} f + 2 \frac{\partial^2 f}{\partial t \partial x} \frac{\partial f}{\partial t} + \frac{\partial^2 f}{\partial t \partial x} \frac{\partial f}{\partial t} + \frac{\partial f}{\partial x} \frac{\partial^2 f}{\partial t^2} \\ &~~~+ \frac{\partial^3 f}{\partial t \partial x^2} f^2 + 2 \frac{\partial^2 f}{\partial x^2} \frac{\partial f}{\partial t} f + 2 \frac{\partial^2 f}{\partial t \partial x} \frac{\partial f}{\partial x} f + \left( \frac{\partial f}{\partial x} \right)^2 \frac{\partial f}{\partial t} \\ &~~~+ \frac{\partial^3 f}{\partial x \partial t^2} f + 2 \frac{\partial^3 f}{\partial t \partial x^2} f^2 + 2 \frac{\partial^2 f}{\partial t \partial x} \frac{\partial f}{\partial x} f + \frac{\partial^2 f}{\partial x^2} \frac{\partial f}{\partial t} f + \frac{\partial f}{\partial x} \frac{\partial^2 f}{\partial x \partial t} f \\ &~~~+ \frac{\partial^3 f}{\partial x^3} f^3 + 2 \frac{\partial^2 f}{\partial x^2} \frac{\partial f}{\partial x} f^2 + 2 \frac{\partial^2 f}{\partial x^2} \frac{\partial f}{\partial x} f^2 + \left( \frac{\partial f}{\partial x} \right)^3 f \\ &= \frac{\partial^3 f}{\partial t^3} + 3 \frac{\partial^3 f}{\partial t^2 \partial x} f  + 3 \frac{\partial^3 f}{\partial t \partial x^2} f^2 + \frac{\partial^3 f}{\partial x^3} f^3 \\ &~~~+ 3\frac{\partial^2 f}{\partial t \partial x} \frac{\partial f}{\partial t} + 5 \frac{\partial^2 f}{\partial t \partial x} \frac{\partial f}{\partial x}f + 3 \frac{\partial^2 f}{\partial x^2} \frac{\partial f}{\partial t} f + \frac{\partial f}{\partial x} \frac{\partial^2 f}{\partial t^2} + 4 \frac{\partial^2 f}{\partial x^2} \frac{\partial f}{\partial x} f^2 \\ &~~~+ \left( \frac{\partial f}{\partial x} \right)^2 \frac{\partial f}{\partial t} + \left( \frac{\partial f}{\partial x} \right)^3 f \end{align*}

次に,k1,k2,k3,k4k_1, k_2, k_3, k_4hhに関する微分を求めていきたいのだが,まず準備としてf(X(h),T(h))f(X(h), T(h))の微分を求めておく.

dfdh=(dXdhX+dTdhT+h)f=fXdXdh+fTdTdh\begin{equation*} % \label{eq:f'} \frac{df}{dh} = \left( \frac{dX}{dh} \frac{\partial}{\partial X} + \frac{dT}{dh} \frac{\partial}{\partial T} + \frac{\partial}{\partial h} \right) f = \frac{\partial f}{\partial X} \frac{dX}{dh} + \frac{\partial f}{\partial T} \frac{dT}{dh} \end{equation*}
d2fdh2=(dXdhX+dTdhT+h)2f=[(dXdh)22X2+2dXdhdTdh2XT+(dTdh)22T2+h(dXdhX)+h(dTdhT)]f=[(dXdh)22X2+2dXdhdTdh2XT+(dTdh)22T2+d2Xdh2X+d2Tdh2T]f\begin{align*} % \label{eq:f''} \frac{d^2f}{dh^2} &= \left( \frac{dX}{dh} \frac{\partial}{\partial X} + \frac{dT}{dh} \frac{\partial}{\partial T} + \frac{\partial}{\partial h} \right)^2 f \\ &= \left[ \left( \frac{dX}{dh} \right)^2 \frac{\partial^2}{\partial X^2} + 2 \frac{dX}{dh} \frac{dT}{dh} \frac{\partial^2}{\partial X \partial T} + \left( \frac{dT}{dh} \right)^2 \frac{\partial^2}{\partial T^2} + \frac{\partial}{\partial h} \left( \frac{dX}{dh} \frac{\partial}{\partial X} \right) +\frac{\partial}{\partial h} \left( \frac{dT}{dh} \frac{\partial}{\partial T} \right) \right] f \\ &= \left[ \left( \frac{dX}{dh} \right)^2 \frac{\partial^2}{\partial X^2} + 2 \frac{dX}{dh} \frac{dT}{dh} \frac{\partial^2}{\partial X \partial T} + \left( \frac{dT}{dh} \right)^2 \frac{\partial^2}{\partial T^2} + \frac{d^2X}{dh^2} \frac{\partial}{\partial X} + \frac{d^2T}{dh^2} \frac{\partial}{\partial T} \right] f \\ \end{align*}
d3fdh3=(dXdhX+dTdhT+h)3f=[(dXdh)33X3+3(dXdh)2dTdh3X2T.+3dXdh(dTdh)23XT2+(dTdh)33T3+3dXdhd2Xdh22X2+3(dXdhd2Tdh2+dTdhd2Xdh2)2XT+3dTdhd2Tdh22T2+d3Xdh3X+d3Tdh3T]f\begin{align*} % \label{eq:f'''} \frac{d^3f}{dh^3} &= \left( \frac{dX}{dh} \frac{\partial}{\partial X} + \frac{dT}{dh} \frac{\partial}{\partial T} + \frac{\partial}{\partial h} \right)^3 f \\ &= \left[ \left( \frac{dX}{dh} \right)^3 \frac{\partial^3}{\partial X^3} + 3 \left( \frac{dX}{dh} \right)^2 \frac{dT}{dh} \frac{\partial^3}{\partial X^2 \partial T}.+ 3 \frac{dX}{dh} \left( \frac{dT}{dh} \right)^2 \frac{\partial^3}{\partial X \partial T^2} + \left( \frac{dT}{dh} \right)^3 \frac{\partial^3}{\partial T^3} \right. \\ &\hspace{12pt}+ 3 \frac{dX}{dh} \frac{d^2X}{dh^2} \frac{\partial^2}{\partial X^2} + 3\left( \frac{dX}{dh} \frac{d^2T}{dh^2} + \frac{dT}{dh} \frac{d^2X}{dh^2} \right) \frac{\partial^2}{\partial X \partial T} + 3 \frac{dT}{dh} \frac{d^2T}{dh^2} \frac{\partial^2}{\partial T^2} \\ &\hspace{12pt} \left.+ \frac{d^3X}{dh^3} \frac{\partial}{\partial X} + \frac{d^3T}{dh^3} \frac{\partial}{\partial T} \right] f \end{align*}

k1k_1hhに依らないので,次の関係が成り立つ.

dk1dh=0\begin{equation*} \frac{dk_1}{dh} = 0 \end{equation*}

k2k_2に関しては,X=x+h2k1, T=t+h2X=x+\frac{h}{2} k_1,~ T=t+\frac{h}{2}より,dXdh,dTdh\frac{dX}{dh}, \frac{dT}{dh}は次のように表される.

dXdh=k12+h2dk1dh=f2,   dTdh=12\begin{equation*} \frac{dX}{dh} = \frac{k_1}{2} + \frac{h}{2}\frac{dk_1}{dh} = \frac{f}{2}, ~~~ \frac{dT}{dh} = \frac{1}{2} \end{equation*}

これをdfdh\frac{df}{dh}, d2fdh2\frac{d^2f}{dh^2}, d3fdh3\frac{d^3f}{dh^3}に代入すれば,k2k_2の微分が得られる.

dk2dh=f2 fx+12ft\begin{equation*} \frac{dk_2}{dh} = \frac{f}{2} \frac{\partial f}{\partial x} + \frac{1}{2} \frac{\partial f}{\partial t} \end{equation*}
d2k2dh2=f242fx2+f22fxt+142ft2\begin{equation*} \frac{d^2 k_2}{dh^2} = \frac{f^2}{4} \frac{\partial^2 f}{\partial x^2} + \frac{f}{2} \frac{\partial^2 f}{\partial x \partial t} + \frac{1}{4} \frac{\partial^2 f}{\partial t^2} \end{equation*}
d3k2dh3=f383fx3+3f283fx2t+3f83fxt2+183ft3\begin{equation*} \frac{d^3 k_2}{dh^3} = \frac{f^3}{8} \frac{\partial^3 f}{\partial x^3} + \frac{3f^2}{8} \frac{\partial^3 f}{\partial x^2 \partial t} + \frac{3f}{8} \frac{\partial^3 f}{\partial x \partial t^2} + \frac{1}{8} \frac{\partial^3 f}{\partial t^3} \end{equation*}

次にk3k_3に関しては,X=x+h2k2, T=t+h2X=x+\frac{h}{2} k_2,~ T=t+\frac{h}{2}より,それぞれの微分は次のように表される.

dXdh=k22+h2dk2dh,   dTdh=12\begin{equation*} \frac{dX}{dh} = \frac{k_2}{2} + \frac{h}{2}\frac{dk_2}{dh}, ~~~ \frac{dT}{dh} = \frac{1}{2} \end{equation*}
d2Xdh2=dk2dh+h2d2k2dh2,   d2Tdh2=0\begin{equation*} \frac{d^2X}{dh^2} = \frac{dk_2}{dh} + \frac{h}{2}\frac{d^2k_2}{dh^2}, ~~~ \frac{d^2T}{dh^2} = 0 \end{equation*}
d3Xdh3=32d2k2dh2+h2d3k2dh3\begin{equation*} \frac{d^3X}{dh^3} = \frac{3}{2} \frac{d^2k_2}{dh^2} + \frac{h}{2}\frac{d^3k_2}{dh^3} \end{equation*}

最終的に必要なのはh=0h=0の時の値なので,その場合に限ってのみk3k_3の微分を求める.

dk3dhh=0=k22fx+12ft\begin{equation*} \left. \frac{dk_3}{dh} \right|_{h=0} = \frac{k_2}{2} \frac{\partial f}{\partial x} + \frac{1}{2} \frac{\partial f}{\partial t} \end{equation*}
d2k3dh2h=0=k2242fx2+k222fxt+142ft2+dk2dhfx\begin{align*} \left. \frac{d^2k_3}{dh^2} \right|_{h=0} = \frac{k_2^2}{4} \frac{\partial^2 f}{\partial x^2} + \frac{k_2}{2} \frac{\partial^2 f}{\partial x \partial t}+ \frac{1}{4} \frac{\partial^2 f}{\partial t^2} + \frac{dk_2}{dh} \frac{\partial f}{\partial x} \end{align*}
d3k3dh3h=0= k2383fx3+3k2283fx2t+3k283fxt2+183t3+3k22dk2dh2fx2+32dk2dh2fxt+32d2k2dh2fx\begin{align*} \left. \frac{d^3k_3}{dh^3} \right|_{h=0} =  \frac{k_2^3}{8} \frac{\partial^3 f}{\partial x^3} &+ \frac{3k_2^2}{8} \frac{\partial^3 f}{\partial x^2 \partial t} + \frac{3 k_2}{8} \frac{\partial^3 f}{\partial x \partial t^2} + \frac{1}{8} \frac{\partial^3}{\partial t^3} + \frac{3 k_2}{2} \frac{dk_2}{dh} \frac{\partial^2 f}{\partial x^2} + \frac{3}{2} \frac{dk_2}{dh} \frac{\partial^2 f}{\partial x \partial t} + \frac{3}{2} \frac{d^2 k_2}{dh^2} \frac{\partial f}{\partial x} \end{align*}

同様にk4k_4に関しては,次のように求めることが出来る.

dXdh=k3+hdk3dh,   dTdh=1\begin{equation*} \frac{dX}{dh} = k_3 + h \frac{dk_3}{dh}, ~~~ \frac{dT}{dh} = 1 \end{equation*}
d2Xdh2=2dk3dh+hd2k3dh2,   d2Tdh2=0\begin{equation*} \frac{d^2X}{dh^2} = 2 \frac{dk_3}{dh} +h \frac{d^2k_3}{dh^2}, ~~~ \frac{d^2T}{dh^2} = 0 \end{equation*}
d3Xdh3=3d2k3dh2+hd3k3dh3\begin{equation*} \frac{d^3X}{dh^3} = 3 \frac{d^2k_3}{dh^2} +h \frac{d^3k_3}{dh^3} \end{equation*}
dk4dhh=0=k3fx+ft\begin{equation*} \left. \frac{dk_4}{dh} \right|_{h=0} = k_3 \frac{\partial f}{\partial x} + \frac{\partial f}{\partial t} \end{equation*}
d2k4dh2h=0=k322fx2+2k32fxt+2ft2+2dk3dhfx\begin{align*} \left.\frac{d^2k_4}{dh^2} \right|_{h=0} = k_3^2 \frac{\partial^2 f}{\partial x^2} + 2 k_3 \frac{\partial^2 f}{\partial x \partial t} + \frac{\partial^2 f}{\partial t^2} + 2\frac{dk_3}{dh} \frac{\partial f}{\partial x} \end{align*}
d3k4dh3h=0=3k333fx+3k323fx2t+3k33fxt2+3ft3+6k3dk3dh2fx2+6dk3dh2xt+3d2k3dh2fx\begin{align*} \left.\frac{d^3k_4}{dh^3} \right|_{h=0} = 3k_3^3 \frac{\partial^3 f}{\partial x} &+ 3k_3^2 \frac{\partial^3 f}{\partial x^2 \partial t} + 3k_3 \frac{\partial^3 f}{\partial x \partial t^2} + \frac{\partial^3 f}{\partial t^3} + 6 k_3 \frac{dk_3}{dh} \frac{\partial^2 f}{\partial x^2} + 6 \frac{dk_3}{dh} \frac{\partial^2}{\partial x \partial t} + 3 \frac{d^2 k_3}{dh^2} \frac{\partial f}{\partial x} \end{align*}

これで(やっと)準備が整ったので,係数比較を行っていこう.

1次:

16(k1+2k2+2k3+k4)h=0=f\begin{equation*} \left. \frac{1}{6} (\bm{k}_1 + 2\bm{k}_2 + 2\bm{k}_3 + \bm{k}_4) \right|_{h=0} = f \end{equation*}

2次:

13[dk1dh+2dk2dh+2dk3dh+dk4dh]h=0=13[2(f2fx+12ft)+2(f2fx+12ft)+ffx+ft]=ffx+ft\begin{align*} &\frac{1}{3} \left[ \frac{dk_1}{dh} + 2\frac{dk_2}{dh} + 2\frac{dk_3}{dh} + \frac{dk_4}{dh} \right]_{h=0} \\ &= \frac{1}{3} \left[ 2\left( \frac{f}{2} \frac{\partial f}{\partial x} + \frac{1}{2} \frac{\partial f}{\partial t} \right) + 2\left( \frac{f}{2} \frac{\partial f}{\partial x} + \frac{1}{2} \frac{\partial f}{\partial t} \right) + f \frac{\partial f}{\partial x} + \frac{\partial f}{\partial t} \right] \\ &= f \frac{\partial f}{\partial x} +\frac{\partial f}{\partial t} \end{align*}

3次:

12[d2k1dh2+2d2k2dh2+2d2k3dh2+d2k4dh2]h=0=12[2(f242fx2+f22fxt+142ft2)+2(f242fx2+f22fxt+142ft2+(f2fx+12ft)fx)+(f22fx2+2f2fxt+ 2ft2+2(f2fx+12ft)fx)]=2fx2+2f2fxt+2ft2+f(fx)2+ftfx\begin{align*} &\frac{1}{2} \left[ \frac{d^2k_1}{dh^2} + 2\frac{d^2k_2}{dh^2} + 2\frac{d^2k_3}{dh^2} + \frac{d^2k_4}{dh^2}\right] _{h=0} \\ &= \frac{1}{2} \left[ 2\left( \frac{f^2}{4} \frac{\partial^2 f}{\partial x^2} + \frac{f}{2} \frac{\partial^2 f}{\partial x \partial t} + \frac{1}{4} \frac{\partial^2 f}{\partial t^2} \right) \right. \\ &\hspace{20pt}\left. + 2 \left( \frac{f^2}{4} \frac{\partial^2 f}{\partial x^2} + \frac{f}{2} \frac{\partial^2 f}{\partial x \partial t} + \frac{1}{4} \frac{\partial^2 f}{\partial t^2} + \left( \frac{f}{2} \frac{\partial f}{\partial x} + \frac{1}{2} \frac{\partial f}{\partial t} \right) \frac{\partial f}{\partial x} \right) \right. \\ &\hspace{20pt}\left. + \left( f^2 \frac{\partial^2 f}{\partial x^2} + 2f \frac{\partial^2 f}{\partial x \partial t} +  \frac{\partial^2 f}{\partial t^2} + 2 \left( \frac{f}{2} \frac{\partial f}{\partial x} + \frac{1}{2} \frac{\partial f}{\partial t} \right) \frac{\partial f}{\partial x} \right) \right] \\ &= \frac{\partial^2 f}{\partial x^2} + 2f \frac{\partial^2 f}{\partial x \partial t} + \frac{\partial^2 f}{\partial t^2} + f \left( \frac{\partial f}{\partial x} \right)^2 + \frac{\partial f}{\partial t} \frac{\partial f}{\partial x} \end{align*}

4次:

23[d3k1dh3+2d3k2dh3+2d3k3dh3+d3k4dh3]h=0=23[2(f383fx3+3f283fx2t+3f83fxt2+183ft3)      +2(k2383fx3+3k2283fx2t+3k283fxt2+183t3+3k22dk2dh2fx2+32dk2dh2fdxdt+32d2k2dh2fx)      +(k333fx+3k323fx2t+3k33fxt2+3ft3+6k3dk3dh2fx2+6dk3dh2xt+3d2k3dh2fx)]=3ft3+33ft2xf +33ftx2f2+3fx3f3   +32ftxft+52ftxfxf+32fx2ftf+fx2ft2+42fx2fxf2   +(fx)2ft+(fx)3f\begin{align*} &\frac{2}{3} \left[ \frac{d^3k_1}{dh^3} + 2\frac{d^3k_2}{dh^3} + 2\frac{d^3k_3}{dh^3} + \frac{d^3k_4}{dh^3}\right]_{h=0} \\ &= \frac{2}{3} \left[ 2\left( \frac{f^3}{8} \frac{\partial^3 f}{\partial x^3} + \frac{3f^2}{8} \frac{\partial^3 f}{\partial x^2 \partial t} + \frac{3f}{8} \frac{\partial^3 f}{\partial x \partial t^2} + \frac{1}{8} \frac{\partial^3 f}{\partial t^3} \right) \right. \\ &~~~~~~+ 2 \left( \frac{k_2^3}{8} \frac{\partial^3 f}{\partial x^3} + \frac{3k_2^2}{8} \frac{\partial^3 f}{\partial x^2 \partial t} + \frac{3 k_2}{8} \frac{\partial^3 f}{\partial x \partial t^2} + \frac{1}{8} \frac{\partial^3}{\partial t^3} + \frac{3 k_2}{2} \frac{dk_2}{dh} \frac{\partial^2 f}{\partial x^2} + \frac{3}{2} \frac{dk_2}{dh} \frac{\partial^2 f}{dx dt} + \frac{3}{2} \frac{d^2 k_2}{dh^2} \frac{\partial f}{\partial x} \right) \\ &~~~~~~+ \left( k_3^3 \frac{\partial^3 f}{\partial x} + 3k_3^2 \frac{\partial^3 f}{\partial x^2 \partial t} + 3k_3 \frac{\partial^3 f}{\partial x \partial t^2} + \frac{\partial^3 f}{\partial t^3} \left.+ 6 k_3 \frac{dk_3}{dh} \frac{\partial^2 f}{\partial x^2} + 6 \frac{dk_3}{dh} \frac{\partial^2}{\partial x \partial t} + 3 \frac{d^2 k_3}{dh^2} \frac{\partial f}{\partial x} \right) \right] \\ &= \frac{\partial^3 f}{\partial t^3} + 3 \frac{\partial^3 f}{\partial t^2 \partial x} f  + 3 \frac{\partial^3 f}{\partial t \partial x^2} f^2 + \frac{\partial^3 f}{\partial x^3} f^3 \\ &~~~+ 3\frac{\partial^2 f}{\partial t \partial x} \frac{\partial f}{\partial t} + 5 \frac{\partial^2 f}{\partial t \partial x} \frac{\partial f}{\partial x}f + 3 \frac{\partial^2 f}{\partial x^2} \frac{\partial f}{\partial t} f + \frac{\partial f}{\partial x} \frac{\partial^2 f}{\partial t^2} + 4 \frac{\partial^2 f}{\partial x^2} \frac{\partial f}{\partial x} f^2 \\ &~~~+ \left( \frac{\partial f}{\partial x} \right)^2 \frac{\partial f}{\partial t} + \left( \frac{\partial f}{\partial x} \right)^3 f \end{align*}

まとめと参考文献

以上で各微係数が一致することが確認できた.途中の式変形をほぼ省略せずに書いているので,何かの参考になれば幸いだ.特にこれと言って式変形の参考にしたものはない.ただ,数値計算一般の参考文献という意味で1を挙げておく.手元に置いておくと安心,という書籍のひとつだと思う.


  1. 伊藤正夫, 藤野和建, “数値計算の常識”, 共立出版, 1985