{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 解析学A 2018\n", "\n", "黒木玄\n", "\n", "2018年7月30日(月)\n", "\n", "次のリンク先で綺麗に閲覧できる:\n", "\n", "* http://nbviewer.jupyter.org/github/genkuroki/Calculus/blob/master/Analysis%20A%202018.ipynb\n", "\n", "$\n", "\\newcommand\\eps{\\varepsilon}\n", "\\newcommand\\ds{\\displaystyle}\n", "\\newcommand\\Z{{\\mathbb Z}}\n", "\\newcommand\\R{{\\mathbb R}}\n", "\\newcommand\\C{{\\mathbb C}}\n", "\\newcommand\\QED{\\text{□}}\n", "\\newcommand\\root{\\sqrt}\n", "\\newcommand\\bra{\\langle}\n", "\\newcommand\\ket{\\rangle}\n", "\\newcommand\\d{\\partial}\n", "\\newcommand\\sech{\\operatorname{sech}}\n", "\\newcommand\\cosec{\\operatorname{cosec}}\n", "\\newcommand\\sign{\\operatorname{sign}}\n", "\\newcommand\\sinc{\\operatorname{sinc}}\n", "\\newcommand\\real{\\operatorname{Re}}\n", "\\newcommand\\imag{\\operatorname{Im}}\n", "\\newcommand\\Li{\\operatorname{Li}}\n", "\\newcommand\\np[1]{:\\!#1\\!:}\n", "\\newcommand\\PROD{\\mathop{\\coprod\\kern-1.35em\\prod}}\n", "$" ] }, { "cell_type": "markdown", "metadata": { "toc": true }, "source": [ "

Table of Contents

\n", "
" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "using SymPy\n", "Beta(x,y) = gamma(x)*gamma(y)/gamma(x+y)\n", "# sympy[:init_printing](order=\"rev-lex\")\n", "# sympy[:init_printing](order=\"lex\") # default\n", "\n", "using Plots\n", "gr()\n", "ENV[\"PLOTS_TEST\"] = \"true\";" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## \\[1\\]\n", "\n", "### \\[1\\] (1)\n", "\n", "$\\tan x$ のMaclaurin展開を5次の項まで求めよう. $f(x) = \\tan x$ とおくと, $f'=1+f^2$ なので $f''=2f+2f^3$, \n", "\n", "$$\n", "f'''=2+8f^2+6f^4, \\quad\n", "f^{(4)}=16f+40f^3+24f^5, \\quad\n", "f^{(5)}=16+136f^2+240f^4+120f^6\n", "$$\n", "\n", "となりので, \n", "\n", "$$\n", "f(0)=f''(0)=f^{(4)}(0)=0, \\quad\n", "f'(0)=1, \\quad\n", "\\frac{f'''(0)}{3!}=\\frac{2}{3!}=\\frac{1}{3}, \\quad\n", "\\frac{f^{(5)}(0)}{5!}=\\frac{16}{5!}=\\frac{2}{15}\n", "$$\n", "\n", "ゆえに, \n", "\n", "$$\n", "\\tan x = x + \\frac{x^3}{3} + \\frac{2x^5}{15} + O(x^6).\n", "$$" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$1 + \\tan^{2}{\\left (x \\right )}$$" ], "text/plain": [ " 2 \n", "1 + tan (x)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "$$2 \\tan{\\left (x \\right )} + 2 \\tan^{3}{\\left (x \\right )}$$" ], "text/plain": [ " 3 \n", "2*tan(x) + 2*tan (x)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "$$2 + 8 \\tan^{2}{\\left (x \\right )} + 6 \\tan^{4}{\\left (x \\right )}$$" ], "text/plain": [ " 2 4 \n", "2 + 8*tan (x) + 6*tan (x)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "$$16 \\tan{\\left (x \\right )} + 40 \\tan^{3}{\\left (x \\right )} + 24 \\tan^{5}{\\left (x \\right )}$$" ], "text/plain": [ " 3 5 \n", "16*tan(x) + 40*tan (x) + 24*tan (x)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "$$16 + 136 \\tan^{2}{\\left (x \\right )} + 240 \\tan^{4}{\\left (x \\right )} + 120 \\tan^{6}{\\left (x \\right )}$$" ], "text/plain": [ " 2 4 6 \n", "16 + 136*tan (x) + 240*tan (x) + 120*tan (x)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "x = symbols(\"x\")\n", "f(x) = tan(x)\n", "sympy[:init_printing](order=\"rev-lex\")\n", "diff(f(x), x) |> display\n", "diff(f(x), x, 2) |> expand |> display\n", "diff(f(x), x, 3) |> expand |> display\n", "diff(f(x), x, 4) |> expand |> display\n", "diff(f(x), x, 5) |> expand |> display\n", "sympy[:init_printing](order=\"lex\") # default" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$x + \\frac{x^{3}}{3} + \\frac{2 x^{5}}{15} + \\frac{17 x^{7}}{315} + \\frac{62 x^{9}}{2835} + O\\left(x^{10}\\right)$$" ], "text/plain": [ " 3 5 7 9 \n", " x 2*x 17*x 62*x / 10\\\n", "x + -- + ---- + ----- + ----- + O\\x /\n", " 3 15 315 2835 " ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# [1] (1)\n", "\n", "x = symbols(\"x\")\n", "series(tan(x), x, n=10)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### \\[1\\] (2)\n", "\n", "$x=0.5$ のとき, \n", "\n", "$$\n", "x = 0.5, \\quad\n", "x + \\frac{x^3}{3} = 0.541666\\cdots, \\quad\n", "x + \\frac{x^3}{3} + \\frac{x^5}{5} = 0.548333\\cdots\n", "$$\n", "\n", "これより, $\\tan 0.5 = 0.54\\cdots$ であることがわかる." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "x = 0.5 = 0.5\n", "tan(x) = 0.5463024898437905\n", "x = 0.5\n", "x + x ^ 3 / 3 = 0.5416666666666666\n", "x + x ^ 3 / 3 + (2 * x ^ 5) / 15 = 0.5458333333333333\n", "x + x ^ 3 / 3 + (2 * x ^ 5) / 15 + (17 * x ^ 7) / 315 = 0.5462549603174602\n" ] } ], "source": [ "# [1] (2)\n", "\n", "@show x = 0.5\n", "@show tan(x)\n", "@show x\n", "@show x+x^3/3\n", "@show x+x^3/3+2x^5/15\n", "@show x+x^3/3+2x^5/15+17*x^7/315;" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## \\[2\\]\n", "\n", "\n", "$|x|<1$ のとき, \n", "\n", "$$\n", "\\log\\frac{1+x}{1-x} = \n", "\\log(1+x)-\\log(1-x) =\n", "2\\sum_{k=0}^\\infty\\frac{x^{2k+1}}{2k+1} = \n", "2x+\\frac{2x^3}{3}+\\frac{2x^5}{5}+\\cdots.\n", "$$\n", "\n", "$x=1/3$ のとき, $\\ds\\frac{1+x}{1-x}=2$ であり, \n", "\n", "$$\n", "2x + \\frac{2x^3}{3} = 0.691\\cdots, \\quad\n", "\\frac{2x^5}{5} = \\frac{2}{5\\times 243} < \\frac{2}{1000} = 0.002\\cdots.\n", "$$\n", "\n", "これより $\\log 2 = 0.69\\cdots$ であることがわかる.\n", "\n", "**解説:** $\\log 2 \\approx 0.7$ は「70\\%ルール」として役にたっている. 年利 $r\\%$ の金利の複利計算で約何年後に2倍になるかは $70/r$ でわかる. なぜならば, $\\approx(1+r/100)^x = 2$ の解は $e^{rx/100}=2$ の解で近似され, その解 $\\ds x=\\frac{100\\log 2}{r}$ は $100\\log 2\\approx 70$ より $70/r$ で近似される. $\\QED$" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$2 x + \\frac{2 x^{3}}{3} + \\frac{2 x^{5}}{5} + \\frac{2 x^{7}}{7} + \\frac{2 x^{9}}{9} + O\\left(x^{10}\\right)$$" ], "text/plain": [ " 3 5 7 9 \n", " 2*x 2*x 2*x 2*x / 10\\\n", "2*x + ---- + ---- + ---- + ---- + O\\x /\n", " 3 5 7 9 " ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# [2]\n", "\n", "x = Sym(:x)\n", "series(log(1+x)-log(1-x), x, n=10)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(1 + x) / (1 - x) = 1.9999999999999998\n", "log(2) = 0.6931471805599453\n", "2x = 0.6666666666666666\n", "2x + (2 * x ^ 3) / 3 = 0.691358024691358\n", "2x + (2 * x ^ 3) / 3 + (2 * x ^ 5) / 5 = 0.6930041152263374\n", "2x + (2 * x ^ 3) / 3 + (2 * x ^ 5) / 5 + (2 * x ^ 7) / 7 = 0.6931347573322881\n" ] } ], "source": [ "x = 1/3\n", "@show (1+x)/(1-x)\n", "@show log(2)\n", "@show 2x\n", "@show 2x + 2*x^3/3\n", "@show 2x + 2*x^3/3 + 2*x^5/5\n", "@show 2x + 2*x^3/3 + 2*x^5/5 + 2*x^7/7;" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## \\[3\\]\n", "\n", "$\\ds \\int_{-\\infty}^\\infty e^{-x^2/2}\\cos(px)\\,dx = \\sqrt{2\\pi}\\;e^{-p^2/2}$\n", "\n", "$$\n", "\\begin{aligned}\n", "&\n", "\\int_{-\\infty}^\\infty e^{-ax^2}x^{2k}\\,dx = \n", "\\left(-\\frac{\\d}{\\d a}\\right)^k\\int_{-\\infty}^\\infty e^{-ax^2}\\,dx =\n", "\\left(-\\frac{\\d}{\\d a}\\right)^k \\sqrt{\\pi}\\;a^{-1/2},\n", "\\\\ &\\qquad =\n", "\\sqrt{\\pi}\\;\\frac{1}{2}\\frac{3}{2}\\cdots\\frac{2k-1}{2}a^{-1/2-k} =\n", "\\sqrt{\\pi}\\;\\frac{(2k)!}{2^{2k}k!}a^{-1/2-k},\n", "\\\\ &\n", "\\int_{-\\infty}^\\infty e^{-x^2/2}x^{2k}\\,dx =\n", "\\sqrt{2\\pi}\\;\\frac{(2k)!}{2^k k!},\n", "\\\\ &\n", "\\int_{-\\infty}^\\infty e^{-x^2/2}\\cos(px)\\,dx =\n", "\\sum_{k=0}^\\infty (-1)^k\\frac{p^{2k}}{(2k)!}\\int_{-\\infty}^\\infty e^{-x^2/2}x^{2k}\\,dx \n", "\\\\ &\\qquad =\n", "\\sum_{k=0}^\\infty (-1)^k\\frac{p^{2k}}{(2k)!} \\sqrt{2\\pi}\\;\\frac{(2k)!}{2^k k!} =\n", "\\sqrt{2\\pi}\\sum_{k=0}^\\infty \\frac{(-p^2/2)^k}{k!} = \n", "\\sqrt{2\\pi}\\;e^{-p^2/2}.\n", "\\end{aligned}\n", "$$" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$\\sqrt{2} \\sqrt{\\pi} e^{- \\frac{p^{2}}{2}}$$" ], "text/plain": [ " 2 \n", " -p \n", " ----\n", " ___ ____ 2 \n", "\\/ 2 *\\/ pi *e " ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# [3]\n", "\n", "p = symbols(\"p\", positive=true)\n", "x = symbols(\"x\", real=true)\n", "integrate(e^(-x^2/2)*cos(p*x), (x,-oo,oo))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## \\[4\\]\n", "\n", "$$\n", "B(p,q) = \n", "\\int_0^1 x^{p-1}(1-x)^{q-1}\\,dx =\n", "\\int_0^\\infty \\frac{x^{p-1}}{(1+x)^{p+q}}\\,dx =\n", "2\\int_0^{\\pi/2}(\\cos x)^{2p-1}(\\sin x)^{2q-1}\\,dx\n", "$$\n", "\n", "および\n", "\n", "$$\n", "B(p,q) = \\frac{\\Gamma(p)\\Gamma(q}{\\Gamma(p+q)}, \\quad\n", "\\Gamma(s+1)=s\\Gamma(s),\\quad\n", "\\Gamma(1/2) = \\sqrt{\\pi}, \\quad\n", "\\Gamma(n+1) = n!\n", "$$\n", "\n", "を使う.\n", "\n", "### \\[4\\] (1)\n", "\n", "$$\n", "\\int_0^1 \\sqrt{\\frac{x^5}{1-x}}\\,dx = \n", "%\\int_0^1 x^{5/2}(1-x)^{-1/2}\\,dx =\n", "B(7/2,1/2) = \n", "\\frac{\\Gamma(7/2)\\Gamma(1/2)}{\\Gamma(4)} =\n", "\\frac{(5/2)(3/2)(1/2)\\sqrt{\\pi}\\;\\sqrt{\\pi}}{3!} =\n", "\\frac{5\\pi}{16}.\n", "$$" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$\\frac{5 \\pi}{16}$$" ], "text/plain": [ "5*pi\n", "----\n", " 16 " ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# [4] (1)\n", "\n", "x = symbols(\"x\", positive=true)\n", "integrate(x^(Sym(5)/2)/√(1-x), (x,0,1))" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$\\frac{5 \\pi}{16}$$" ], "text/plain": [ "5*pi\n", "----\n", " 16 " ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Beta(Sym(7)/2,Sym(1)/2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### \\[4\\] (2)\n", "\n", "$$\n", "\\int_0^\\infty \\frac{x^{5/2}}{(1+x)^5}\\,dx =\n", "B(7/2, 3/2) =\n", "\\frac{\\Gamma(7/2)\\Gamma(3/2)}{\\Gamma(5)} =\n", "\\frac{(5/2)(3/2)(1/2)\\sqrt{\\pi}\\;(1/2)\\sqrt{\\pi}}{4!} =\n", "\\frac{5\\pi}{128}.\n", "$$" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$\\frac{5 \\pi}{128}$$" ], "text/plain": [ "5*pi\n", "----\n", "128 " ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# [4] (2)\n", "\n", "x = symbols(\"x\", positive=true)\n", "integrate(x^(Sym(5)/2)/(1+x)^5, (x,0,oo))" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$\\frac{5 \\pi}{128}$$" ], "text/plain": [ "5*pi\n", "----\n", "128 " ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Beta(Sym(7)/2, Sym(3)/2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### \\[4\\] (3)\n", "\n", "$$\n", "2\\int_0^{\\pi/2} (\\cos x)^6 (\\sin x)^4\\,dx =\n", "B(7/2, 5/2) =\n", "\\frac{\\Gamma(7/2)\\Gamma(5/2)}{\\Gamma(6)} =\n", "\\frac{(5/2)(3/2)(1/2)\\sqrt{\\pi}\\;(3/2)(1/2)\\sqrt{\\pi}}{5!} =\n", "\\frac{3\\pi}{256.}\n", "$$" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$\\frac{3 \\pi}{256}$$" ], "text/plain": [ "3*pi\n", "----\n", "256 " ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# [4] (3)\n", "\n", "2integrate(cos(x)^6*sin(x)^4, (x,0,PI/2))" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$\\frac{3 \\pi}{256}$$" ], "text/plain": [ "3*pi\n", "----\n", "256 " ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Beta(Sym(7)/2, Sym(5)/2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## \\[5\\]\n", "\n", "### \\[5\\] (1) \n", "\n", "$x>0$, $f(x) =x\\log x$ のとき, $f'(x)=\\log x + 1$, $f''(x)=1/x>0$ なので, $f(x)$ は下に凸な函数である." ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$\\log{\\left (x \\right )} + 1$$" ], "text/plain": [ "log(x) + 1" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "$$\\frac{1}{x}$$" ], "text/plain": [ "1\n", "-\n", "x" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# [5] (1)\n", "\n", "f(x) = x * log(x)\n", "x = symbols(\"x\", positive=true)\n", "f1 = diff(f(x), x) |> display\n", "f2 = diff(f(x), x, x) |> display" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### \\[5\\] (2)\n", "\n", "$\\displaystyle E[g(x)] = \\sum_{i=1}^n p_i g(q_i/p_i)$ は期待値汎函数なので, Jensenの不等式より, 下に凸な函数 $g(x)$ に対して $E[g(x)]\\leqq g(E[x])$ なので, それを $f(x)$ に適用すると,\n", "\n", "$$\n", "\\begin{aligned}\n", "\\sum_{i=1}^n q_i\\log\\frac{q_i}{p_i} =\n", "\\sum_{i=1}^n p_i\\frac{q_i}{p_i}\\log\\frac{q_i}{p_i} =\n", "E[f(x)] \\geqq\n", "f(E[x]) = \n", "f\\left(\\sum_{i=1}^n p_i\\frac{q_i}{p_i}\\right) =\n", "f(1) = 0.\n", "\\end{aligned}\n", "$$\n", "\n", "**解説:** この結果は**Gibbsの(情報)不等式**と呼ばれている. $\\QED$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## \\[6\\]\n", "\n", "### \\[6\\] (1)\n", "\n", "$\\ds f_n(y) =e^{-\\sqrt{n}\\;y}\\left(1+\\frac{y}{\\sqrt{n}}\\right)^n$ とおくと, $|y/\\sqrt{n}|<1$ のとき,\n", "\n", "$$\n", "\\begin{aligned}\n", "\\log f_n(y) &= -\\sqrt{n}\\;y + n\\log\\left(1+\\frac{y}{\\sqrt{n}}\\right) =\n", "-\\sqrt{n};y + n\\left(\\frac{y}{\\sqrt{n}} - \\frac{y^2}{2n} + \\frac{y^3}{3n\\sqrt{n}} - \\frac{y^4}{4n^2} + \\cdots\\right)\n", "\\\\ &= -\n", "\\frac{y^2}{2} + \\frac{y^3}{3\\sqrt{n}} - \\frac{y^4}{4n} +\\cdots \\to -\\frac{y^2}{2}\n", "\\qquad(n\\to\\infty).\n", "\\end{aligned}\n", "$$\n", "\n", "ゆえに $n\\to\\infty$ のとき, $f_n(y)\\to e^{-y^2/2}$." ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$e^{- \\frac{y^{2}}{2}}$$" ], "text/plain": [ " 2 \n", " -y \n", " ----\n", " 2 \n", "e " ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# [6] (1)\n", "\n", "y = symbols(\"y\", positive=true)\n", "n = symbols(\"n\", positive=true)\n", "limit(e^(-√n*y)*(1+y/√n)^n, n=>oo)" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$\\frac{y^{5}}{5 n^{\\frac{3}{2}}} + \\frac{y^{3}}{3 \\sqrt{n}} - \\frac{y^{4}}{4 n} - \\frac{y^{2}}{2} + O\\left(y^{6}\\right)$$" ], "text/plain": [ " 5 3 4 2 \n", " y y y y / 6\\\n", "------ + ------- - --- - -- + O\\y /\n", " 3/2 ___ 4*n 2 \n", "5*n 3*\\/ n " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/latex": [ "$$- \\frac{y^{2}}{2}$$" ], "text/plain": [ " 2 \n", "-y \n", "----\n", " 2 " ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y = symbols(\"y\", real=true)\n", "n = symbols(\"n\", positive=true)\n", "series(log(e^(-√n*y)*(1+y/√n)^n), y) |> display\n", "limit(series(log(e^(-√n*y)*(1+y/√n)^n), y), n=>oo)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### \\[6\\] (2)\n", "\n", "$x = n + \\sqrt{n}\\;y = n(1+y/\\sqrt{n})$ とおくと, $n\\to\\infty$ のとき,\n", "\n", "$$\n", "\\begin{aligned}\n", "\\frac{1}{n^n e^{-n}\\sqrt{n}}\\int_0^\\infty e^{-x}x^n\\,dx &=\n", "\\frac{1}{n^n e^{-n}\\sqrt{n}}\\int_{-\\sqrt{n}}^\\infty e^{-n-\\sqrt{n}\\;y}n^n\\left(1+\\frac{y}{\\sqrt{n}}\\right)^n\\sqrt{n}\\,dy\n", "\\\\ &=\n", "\\int_{-\\sqrt{n}}^\\infty e^{-\\sqrt{n}\\;y}\\left(1+\\frac{y}{\\sqrt{n}}\\right)^n\\,dy\n", "\\to\\int_{-\\infty}^\\infty e^{-y^2/2}\\,dy = \\sqrt{2\\pi}.\n", "\\end{aligned}\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## \\[7\\]\n", "\n", "### \\[7\\] (1)\n", "\n", "$\\displaystyle \\log n^{1/n}=\\frac{1}{n}\\log n\\to 0$ ($n\\to\\infty$) なので $n^{1/n}\\to 1$ である." ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$1$$" ], "text/plain": [ "1" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# [7] (1)\n", "\n", "n = symbols(\"n\", positive=true)\n", "limit(n^(1/n), n=>oo)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### \\[7\\] (2)\n", "\n", "Stirlingの公式と(1)より, $n\\to\\infty$ のとき\n", "\n", "$$\n", "\\begin{aligned}\n", "&\n", "\\binom{n(a+b)}{na} =\n", "\\frac\n", "{(n(a+b))^{n(a+b)}e^{-n(a+b)}\\sqrt{2\\pi n(a+b)}}\n", "{(na)^{na}(nb)^{nb}e^{-na-nb}\\sqrt{2\\pi na\\;2\\pi nb}} =\n", "\\left(\n", "\\frac\n", "{(a+b)^{a+b}}\n", "{a^a b^b}\n", "\\right)^n\n", "\\sqrt{\\frac{a+b}{2\\pi nab}}\n", "\\end{aligned}\n", "$$\n", "\n", "なので,\n", "\n", "$$\n", "\\lim_{n\\to\\infty}\\binom{n(a+b)}{na}^{1/n} =\n", "\\frac{(a+b)^{a+b}}{a^a b^b}.\n", "$$\n", "\n", "**解説:** この結果の対数はエントロピーの話と関係がある. $\\QED$" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/latex": [ "$$a^{- a} b^{- b} \\left(a + b\\right)^{a + b}$$" ], "text/plain": [ " -a -b a + b\n", "a *b *(a + b) " ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# [7] (2)\n", "\n", "n, a, b = symbols(\"n a b\", positive=true)\n", "simplify(limit((gamma(n*(a+b)+1)/(gamma(n*a+1)*gamma(n*b+1)))^(1/n), n=>oo))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## \\[8\\]\n", "\n", "二項展開によって, $0