{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "B.C.Berndt: Number Theory in the Spirit of Ramanujanより\n", "\n", "Chapter 5 Corollary 5.1.10\n", "\n", "$x \\rightarrow\\,0^{+}$の時、\n", "$$ \\pi\\,F(\\frac{1}{2},\\frac{1}{2};1;1-x)\\sim -\\log(x)+C$$\n", "ただし$C$は定数である。\n", "\n", "\n", "まず$1-x$を$x$と置き直すとこの主張は、\n", "$x \\rightarrow\\,1^{-}$の時、\n", "$$ \\pi\\,F(\\frac{1}{2},\\frac{1}{2};1;x)\\sim -\\log(1-x)+C$$\n", "となります。\n", "\n", "また$K(x)=\\frac{\\pi}{2}\\,F(\\frac{1}{2},\\frac{1}{2};1;x^2)$だったので$K(\\sqrt{x})=\\frac{\\pi}{2}\\,F(\\frac{1}{2},\\frac{1}{2};1;x)$であることがわかります。まとめると、\n", "$$2\\,K(\\sqrt{x})\\sim -\\log(1-x)+C$$\n", "を示せば良いことになります。\n", "\n", "$x \\rightarrow\\,1^{-}$の時、$2\\,K(\\sqrt{x})+\\log(1-x) \\rightarrow\\,\\log 2$を示すことにします。\n", "\n", "楕円積分による$K(x)$の定義は以下の式でした。ここから証明を始めます。\n", "$$K(k)=\\int_{0}^{\\frac{\\pi}{2}}\\frac{d\\phi}{\\sqrt{1-k^2\\,\\sin^2\\phi}}$$" ] }, { "cell_type": "code", "execution_count": 221, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\\[\\tag{${\\it \\%o}_{255}$}K\\left(k\\right)=\\int_{0}^{\\frac{\\pi}{2}}{\\frac{1}{\\sqrt{1-k^2\\,\\sin ^2\\varphi}}\\;d\\varphi}\\]" ], "text/plain": [ " %pi\n", " ---\n", " 2\n", " /\n", " [ 1\n", "(%o255) K(k) = I ---------------------- dphi\n", " ] 2 2\n", " / sqrt(1 - k sin (phi))\n", " 0" ], "text/x-maxima": [ "K(k) = 'integrate(1/sqrt(1-k^2*sin(phi)^2),phi,0,%pi/2)" ] }, "execution_count": 221, "metadata": {}, "output_type": "execute_result" } ], "source": [ "DEFK:K(k)=integrate(1/sqrt(1-k^2*sin(phi)^2),phi,0,%pi/2);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "両辺を2倍し、$k=\\sqrt{x}$を代入します。" ] }, { "cell_type": "code", "execution_count": 224, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\\[\\tag{${\\it \\%o}_{264}$}2\\,K\\left(\\sqrt{x}\\right)=2\\,\\int_{0}^{\\frac{\\pi}{2}}{\\frac{1}{\\sqrt{1-\\sin ^2\\varphi\\,x}}\\;d\\varphi}\\]" ], "text/plain": [ " %pi\n", " ---\n", " 2\n", " /\n", " [ 1\n", "(%o264) 2 K(sqrt(x)) = 2 I --------------------- dphi\n", " ] 2\n", " / sqrt(1 - sin (phi) x)\n", " 0" ], "text/x-maxima": [ "2*K(sqrt(x)) = 2*'integrate(1/sqrt(1-sin(phi)^2*x),phi,0,%pi/2)" ] }, "execution_count": 224, "metadata": {}, "output_type": "execute_result" } ], "source": [ "assume(0\n", "\n", "\n", "Gnuplot\n", "Produced by GNUPLOT 5.4 patchlevel 2 \n", "\n", "\n", "\n", "\n", "\n", "\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t\n", "\t \n", "\t \n", "\t\n", "\t\n", "\t \n", "\t \n", "\t\n", "\n", "\n", "\n", "\n", "\t\n", "\n", "\t\n", "\n", "\t\n", "\n", "\t\n", "\t\tx\n", "\t\n", "\n", "\n", "\n", "\t%pi*hypergeometric([1/2,1/2],[1],x)\n", "\n", "\t\n", "\t\t%pi*hypergeometric([1/2,1/2],[1],x)\n", "\t\n", "\n", "\n", "\t\n", "\t\n", "\t-log(1-x)\n", "\n", "\t\n", "\t\t-log(1-x)\n", "\t\n", "\n", "\n", "\t\n", "\t\n", "\t2*'elliptic_kc(x)\n", "\n", "\t\n", "\t\t2*'elliptic_kc(x)\n", "\t\n", "\n", "\n", "\t\n", "\t\n", "\t2*'elliptic_kc(x)+log(1-x)\n", "\n", "\t\n", "\t\t2*'elliptic_kc(x)+log(1-x)\n", "\t\n", "\n", "\n", "\t\n", "\t\n", "\n", "\t\t\n", "\t\t 0\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 1\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 2\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 3\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 4\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 5\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 6\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 7\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 0\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 0.1\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 0.2\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 0.3\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 0.4\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 0.5\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 0.6\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 0.7\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 0.8\n", "\t\n", "\n", "\n", "\t\t\n", "\t\t 0.9\n", "\t\n", "\n", "\n", "\n", "\n", "\t\n", "\n", "\t\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\t\n", "\n", "\n", "\n", "\n", "\n" ], "text/plain": [ "/var/folders/3n/jp9c5wkw8xjgmy006s6t_pt80000gn/T/maxplot.svg" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "\\[\\tag{${\\it \\%o}_{394}$}\\left[ \\mbox{ /var/folders/3n/jp9c5wkw8xjgmy006s6t\\_pt80000gn/T/maxout65155.gnuplot } , \\mbox{ /var/folders/3n/jp9c5wkw8xjgmy006s6t\\_pt80000gn/T/maxplot.svg } \\right] \\]" ], "text/plain": [ "(%o394) [/var/folders/3n/jp9c5wkw8xjgmy006s6t_pt80000gn/T/maxout65155.gnuplot, \n", " /var/folders/3n/jp9c5wkw8xjgmy006s6t_pt80000gn/T/maxplot.svg]" ], "text/x-maxima": [ "[\"/var/folders/3n/jp9c5wkw8xjgmy006s6t_pt80000gn/T/maxout65155.gnuplot\",\n", " \"/var/folders/3n/jp9c5wkw8xjgmy006s6t_pt80000gn/T/maxplot.svg\"]" ] }, "execution_count": 358, "metadata": {}, "output_type": "execute_result" } ], "source": [ "plot2d([F1(x),F2(x),F3(x),F3(x)-F2(x)],[x,0.0,1.0-epsilon]);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "超幾何関数と楕円積分は完全に重なっており、計算はうまく行っているようです。$x\\rightarrow 1$で楕円積分と対数関数はどちらも無限大に向かって発散していますが、その差分は少しづつ減少しながら$2.7$位の値に収束しているようにみます。まさに定理の通りです、、、???\n", "\n", "証明の結果としてその差は$\\log{2}=0.6931\\dots$にいくのではなかったでしょうか。何か変ですね。" ] }, { "cell_type": "code", "execution_count": 105, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\\[\\tag{${\\it \\%o}_{126}$}0.6931471805599453\\]" ], "text/plain": [ "(%o126) 0.6931471805599453" ], "text/x-maxima": [ "0.6931471805599453" ] }, "execution_count": 105, "metadata": {}, "output_type": "execute_result" } ], "source": [ "log(2.0);" ] }, { "cell_type": "code", "execution_count": 334, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\\[\\tag{${\\it \\%o}_{377}$}2.789328410773694\\]" ], "text/plain": [ "(%o377) 2.789328410773694" ], "text/x-maxima": [ "2.789328410773694" ] }, "execution_count": 334, "metadata": {}, "output_type": "execute_result" } ], "source": [ "F3(1.0-epsilon)-F2(1.0-epsilon);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "この2つの数の差を埋めることが出来ずに1週間くらい悩みました。上記式変形がうまく行ったのですぐにもブログ記事を書きたかったのですが、この差について何が起こっているのか説明できないと気持ち悪いですし、記事も中途半端です。\n", "\n", "hypergeometric( )やelliptic\\_kc( )とlog( )を独立に計算してはダメでその差を直接計算する必要があると考えました。そのための道具はその差を1つの積分に表した次の式です。\n", "$$\\int_{0}^{1}{\\frac{2}{\\sqrt{1-t}\\,\\sqrt{t+1}\\,\\sqrt{1-t^2\\,x}}-\\frac{x}{1-t\\,x}\\;dt}$$\n", "この積分を$x$の値を変えながら数値計算してみることにしました。数値積分にはromberg()という組み込み関数を使えます。" ] }, { "cell_type": "code", "execution_count": 128, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\\[\\tag{${\\it \\%o}_{155}$}\\mbox{ /usr/local/Cellar/maxima/5.45.1\\_1/share/maxima/5.45.1/share/numeric/romberg.lisp }\\]" ], "text/plain": [ "(%o155) /usr/local/Cellar/maxima/5.45.1_1/share/maxima/5.45.1/share/numeric/ro\\\n", "mberg.lisp" ], "text/x-maxima": [ "\"/usr/local/Cellar/maxima/5.45.1_1/share/maxima/5.45.1/share/numeric/romberg.lisp\"" ] }, "execution_count": 128, "metadata": {}, "output_type": "execute_result" }, { "name": "stdout", "output_type": "stream", "text": [ "SB-KERNEL:REDEFINITION-WITH-DEFUN: redefining MAXIMA::ROMBERG-SUBR in DEFUN\n", "SB-KERNEL:REDEFINITION-WITH-DEFUN: redefining MAXIMA::$ROMBERG in DEFUN\n" ] } ], "source": [ "load(romberg);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "積分範囲の上の値を$1.0$にすると数値積分がうまく計算できないため、ここでは$0.99$までとしました。\n", "そのため計算結果は小さめに出るはずです。\n", "それ以外は式そのままです。" ] }, { "cell_type": "code", "execution_count": 323, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\\[\\tag{${\\it \\%o}_{366}$}g\\left(k\\right):={\\it romberg}\\left({\\it ev}\\left(\\frac{2}{\\sqrt{1-t^2}\\,\\sqrt{1-x\\,t^2}}-\\frac{x}{1-x\\,t} , x:k\\right) , t , 0 , 0.99\\right)\\]" ], "text/plain": [ " 2 x\n", "(%o366) g(k) := romberg(ev(--------------------------- - -------, x : k), t, \n", " 2 2 1 - x t\n", " sqrt(1 - t ) sqrt(1 - x t )\n", " 0, 0.99)" ], "text/x-maxima": [ "g(k):=romberg(ev(2/(sqrt(1-t^2)*sqrt(1-x*t^2))-x/(1-x*t),x:k),t,0,0.99)" ] }, "execution_count": 323, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g(k):=romberg(ev(2/(sqrt(1-t^2)*sqrt(1-x*t^2))-x/(1-x*t),x:k),t,0,0.99);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "g()の引数を$0.8$から$0.99999999$まで下記のように変化させて計算してみました。" ] }, { "cell_type": "code", "execution_count": 348, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "\\(2.319341662583405\\)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "\\(2.069439436893744\\)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "\\(1.176056896939411\\)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "\\(0.7594185658227455\\)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "\\(0.6956354529343399\\)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "\\(0.688889226547345\\)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "\\(0.6882161811091833\\)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "\\(0.6881508251625317\\)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "for a in [0.8,0.9,0.99,0.999,0.9999,0.99999,0.999999,0.9999999] do print(g(a))$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "$0.9$から$0.99999$の間で急激に小さくなることがわかります。このような動きを最初のグラフでは表現できていませんでした。この積分が$x=1$の直前でこのような急激な値の変動を起こして$\\log{2}$に行くことがあのグラフの原因であったわけです。" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Maxima", "language": "maxima", "name": "maxima" }, "language_info": { "codemirror_mode": "maxima", "file_extension": ".mac", "mimetype": "text/x-maxima", "name": "maxima", "pygments_lexer": "maxima", "version": "5.44.0" } }, "nbformat": 4, "nbformat_minor": 4 }