つれづれなる備忘録

日々の発見をあるがままに綴る

Texによる数式表現27~テーラー展開式

 今回は様々な多項式展開のうち代表的なテーラー展開に関してTeXによる数式表現について紹介していきたい。テーラー展開は、複雑な数式の近似、誤差、または関数の性質に関して考察する上でよく用いられている。

1. テーラー展開・マクローリン展開

基本的なテーラー展開(x=a)まわりは

[tex: \displaystyle f(x)=\sum\_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!} (x-a)^{n} ]

 \displaystyle f(x)=\sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!} (x-a)^{n}

さらにa=0としたものが、マクローリン展開と呼ばれる。上記でa=0, Sum部分を展開すると

[tex:  f(x)=f(0)+f'(0)x+\dfrac{f''(0)}{2}x^{2}+\dfrac{f^{(3)}(0)}{6}x^{3}+\mathcal{O}(x^{4}) ]

  f(x)=f(0)+f'(0)x+\dfrac{f''(0)}{2}x^{2}+\dfrac{f^{(3)}(0)}{6}x^{3}+\mathcal{O}(x^{4})

最後のランダウ記号は\mathcal{O}を用いて表現した。ランダウ記号のかわりにドットで表現する場合は

[tex:  f(x)=f(0)+f'(0)x+\dfrac{f''(0)}{2}x^{2}+\dfrac{f^{(3)}(0)}{6}x^{3}+\cdots ]

  f(x)=f(0)+f'(0)x+\dfrac{f''(0)}{2}x^{2}+\dfrac{f^{(3)}(0)}{6}x^{3}+\cdots

いくつか代表的なマクローリン展開の例を以下に示す。

2. 指数・対数関数の展開

指数関数の展開は

[tex: e^{x}=1+x+\dfrac{x^{2}}{2}+\dfrac{x^{3}}{6}+\mathcal{O}(x^{4})]

 e^{x}=1+x+\dfrac{x^{2}}{2}+\dfrac{x^{3}}{6}+\mathcal{O}(x^{4})

対数関数は

[tex: \log (1+x)=x-\dfrac{x^{2}}{2}+\dfrac{x^{3}}{3}-\dfrac{x^{4}}{4}+\mathcal{O}(x^{5})]

 \log (1+x)=x-\dfrac{x^{2}}{2}+\dfrac{x^{3}}{3}-\dfrac{x^{4}}{4}+\mathcal{O}(x^{5})

[tex: \log (1-x)=-x-\dfrac{x^{2}}{2}-\dfrac{x^{3}}{3}-\dfrac{x^{4}}{4}-\mathcal{O}(x^{5})]

 \log (1-x)=-x-\dfrac{x^{2}}{2}-\dfrac{x^{3}}{3}-\dfrac{x^{4}}{4}-\mathcal{O}(x^{5})

上の展開式はlog(1+x)にx=-1とした場合と同一であることがわかる。

3. 幾何級数

幾何級数

[tex: \dfrac{1}{(1-x)}=1+x+x^{2}+x^{3}+x^{4}+\mathcal{O}(x^{5})]

 \dfrac{1}{(1-x)}=1+x+x^{2}+x^{3}+x^{4}+\mathcal{O}(x^{5})

[tex: \dfrac{1}{(1-x)^{2}}=1+2x+3x^{2}+4x^{3}+5x^{4}+\mathcal{O}(x^{5})]

 \dfrac{1}{(1-x)^{2}}=1+2x+3x^{2}+4x^{3}+5x^{4}+\mathcal{O}(x^{5})

最初の幾何級数1(1-x)を微分した関係にあることがわかる。

[tex: \dfrac{x}{(1-x)^{2}}=x+2x^{2}+3x^{3}+4x^{4}+\mathcal{O}(x^{5})]

 \dfrac{x}{(1-x)^{2}}=x+2x^{2}+3x^{3}+4x^{4}+\mathcal{O}(x^{5})

4. 三角関数双曲線関数

sin関数の展開は

[tex: \sin x=x-\dfrac{x^{3}}{6}+\dfrac{x^{5}}{120}+\mathcal{O}(x^{6})]

 \sin x=x-\dfrac{x^{3}}{6}+\dfrac{x^{5}}{120}+\mathcal{O}(x^{6})

cos関数の展開は

[tex: \cos x=1-\dfrac{x^{2}}{2}+\dfrac{x^{4}}{24}+\mathcal{O}(x^{5)]

 \cos x=1-\dfrac{x^{2}}{2}+\dfrac{x^{4}}{24}+\mathcal{O}(x^{5})

sin関数は奇関数、cos関数は偶関数であることがわかる。また次数が上がると急激に係数が小さくなるので、2項または3項までで打ち切って使用する場合も多い。

sinh関数の展開は

[tex: \sinh x= x+\dfrac{x^{3}}{6}+\dfrac{x^{5}}{120}+\mathcal{O}(x^{6})]

 \sinh x= x+\dfrac{x^{3}}{6}+\dfrac{x^{5}}{120}+\mathcal{O}(x^{6})

cosh関数の展開は

[tex: \cosh x=1+\dfrac{x^{2}}{2}+\dfrac{x^{4}}{24}+\mathcal{O}(x^{5})]

 \cosh x=1+\dfrac{x^{2}}{2}+\dfrac{x^{4}}{24}+\mathcal{O}(x^{5})

5. その他

 平方根の展開も比較的よく使われることが多い。

[tex: \displaystyle \sqrt{1+x^{2}} = 1+\dfrac{x^{2}}{2}-\dfrac{x^{4}}{8}+\dfrac{x^{6}}{16}+\mathcal{O}(x^{7})]

 \displaystyle \sqrt{1+x^{2}} = 1+\dfrac{x^{2}}{2}-\dfrac{x^{4}}{8}+\dfrac{x^{6}}{16}+\mathcal{O}(x^{7})

[tex: \displaystyle \sqrt{1-x^{2}} = 1-\dfrac{x^{2}}{2}-\dfrac{x^{4}}{8}-\dfrac{x^{6}}{16}+\mathcal{O}(x^{7})]

 \displaystyle \sqrt{1-x^{2}} = 1-\dfrac{x^{2}}{2}-\dfrac{x^{4}}{8}-\dfrac{x^{6}}{16}+\mathcal{O}(x^{7})

任意の関数のテーラー展開・マクローリン展開を知るには、一番上に示したテーラー展開の公式を用いて導出するか、WolframAlpha

Wolfram|Alpha: Computational Intelligence の検索窓で、例えばsqrt(1+x^2), taylorなどど入れると表示される。

6. まとめ

 今回は多項式展開のうち代表的なテーラー展開式の代表的な関数の展開例に関してTeXコードによる数式表現を紹介した。