\n", "`Partial sum 1 is 0.3333333333333333`

\n", "`Partial sum 2 is 0.41666666666666663`

\n", "`...`

\n", "\n", "Conjecture the limit $L$ and store the value in the variable `limit_prob_4`. Recall that the *$N$-th remainder* is the difference $L-S_N$ where $S_N$ is the $N$-th partial sum $S_N$. Print out the first 10 values of the conjectured remainder in the following format:

\n", "`Remainder 1 is ?.??????????????????`

\n", "`...`

\n", "\n", "Conjecture a formula for the remainder. (*Hint:* You may also want to print the reciprocals of the remainders.) Give a rigorous inductive proof of this formula in a Markdown cell in the notebook. (Including a picture of your hand-written proof is okay.)\n", "\n", "Explain why the proof of your remainder formula implies that your conjecture for the limit is correct." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 7. Zeta(3)\n", "\n", "For $s > 1$, the Reimann zeta function is given by the convergent series\n", "$$\\zeta(s)=\\sum_{n=1}^\\infty \\frac{1}{n^s}=\\frac{1}{1^s}+\\frac{1}{2^s}+\\frac{1}{3^s}\\ldots.$$\n", "In the `Series` notebook, we calculated that $\\zeta(2)=\\frac{\\pi^2}{6}$. Now we will approximate $\\zeta(3)$.\n", "\n", "Let $b_n=\\frac{1}{n^3}$. Then $\\zeta(3)=\\sum_{n=1}^\\infty b_n$. \n", "Define the partial sum and remainder\n", "$$S'_N=\\sum_{n=1}^N b_n \\quad \\text{and} \\quad R'_N=\\sum_{n=N+1}^\\infty b_n.$$\n", "\n", "For $n$ large enough, find indices $l(n)$ and $u(n)$ such that\n", "$$a_{l(n)} \\leq 2 b_n \\leq a_{u(n)},$$\n", "where $a_k = \\frac{2}{k(k+1)(k+2)}$ as in the problems above. Use these inequalities to find lower and upper bounds for $R'_N$ in terms of the sequence of remainders $R_N$ from the series $\\sum a_k$. Include a Markdown cell explaining what you have found.\n", "\n", "Use your results to write a function `zeta_3(epsilon)` which takes as input a positive real number $\\epsilon>0$ and returns a pair consisting of a lower bound $L$ and an upper bound $U$ for $\\zeta(3)$ such that $U-L \\leq \\epsilon$. You may use floats and ignore the effects of round off error.\n", "\n", "(*Remark.* To return a pair $(L,U)$ you can use the statement `return (L,U)` at the end of your function.)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Some simple tests\n", "L,U = zeta_3(0.001)\n", "assert type(L)==float, \"The lower bound should be a float.\"\n", "assert type(U)==float, \"The upper bound should be a float.\"\n", "assert L<=U, \"The lower bound should be smaller than the upper bound.\"\n", "assert U-L<=0.001, \"The gap should be smaller than 0.001.\"" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.9" } }, "nbformat": 4, "nbformat_minor": 2 }