{"id":3046,"date":"2021-05-17T09:17:15","date_gmt":"2021-05-17T14:17:15","guid":{"rendered":"https:\/\/laurentlessard.com\/bookproofs\/?p=3046"},"modified":"2021-05-17T11:27:31","modified_gmt":"2021-05-17T16:27:31","slug":"infinite-cake","status":"publish","type":"post","link":"https:\/\/laurentlessard.com\/bookproofs\/infinite-cake\/","title":{"rendered":"Infinite cake"},"content":{"rendered":"<p>This week&#8217;s <a href=\"https:\/\/fivethirtyeight.com\/features\/are-you-smarter-than-a-fourth-grader\/\">Riddler Express<\/a> is a short problem about infinite series. Let&#8217;s dig in! (I paraphrased the question)<\/p>\n<blockquote><p>\nYou and your infinitely many friends are sharing a cake, and you come up with several different methods of splitting it.<\/p>\n<ol>\n<li> Friend 1 takes half of the cake, Friend 2 takes a third of what remains, Friend 3 takes a quarter of what remains after Friend 2, Friend 4 takes a fifth of what remains after Friend 3, and so on.\n<li> Friend 1 takes $1\/2^2$ (or one-quarter) of the cake, Friend 2 takes $1\/3^2$ (or one-ninth) of what remains, Friend 3 takes $1\/4^2$ of what remains after Friend 3, and so on.\n<li> Same as previous, with even denominators only: Friend 1 takes $1\/2^2$ of the cake, Friend 2 takes $1\/4^2$ of what remains, Friend 3 takes $1\/6^2$ of what remains after Friend 2, and so on.\n<\/ol>\n<p>For each of these methods, after your infinitely many friends take their respective pieces, how much cake is left?\n<\/p><\/blockquote>\n<p>Here is my solution<br \/>\n<a href=\"javascript:Solution('soln_infcake','toggle_infcake')\" id=\"toggle_infcake\">[Show Solution]<\/a><\/p>\n<div id=\"soln_infcake\" style=\"display: none\">\n<p>For each different method, let&#8217;s call $x_n$ the amount of cake remaining after the first $n$ friends have taken their share. Since we start with a full cake, $x_0=1$. The amount of cake remaining after all friends have taken their share is therefore $\\lim_{n\\to\\infty} x_n$.<\/p>\n<h3>Method 1<\/h3>\n<p>In this method, Friend number $n$ takes $\\frac{1}{n+1}$ of what remains, which is $\\frac{1}{n+1}x_{n-1}$. After this happens, the amount of cake remaining is:<br \/>\n\\[<br \/>\nx_n = x_{n-1}-\\frac{1}{n+1}x_{n-1} = \\left(1-\\frac{1}{n+1}\\right)x_{n-1}.<br \/>\n\\]The net result is therefore:<br \/>\n\\begin{align}<br \/>\nx_n &#038;= \\left(1-\\frac{1}{2}\\right)\\left(1-\\frac{1}{3}\\right)\\left(1-\\frac{1}{4}\\right)\\cdots\\left(1-\\frac{1}{n+1}\\right) \\\\<br \/>\n&#038;= \\left(\\frac{1}{2}\\right)\\left(\\frac{2}{3}\\right)\\left(\\frac{3}{4}\\right)\\cdots\\left(\\frac{n}{n+1}\\right) \\\\<br \/>\n&#038;= \\left(\\frac{1}{\\bcancel{2}}\\right)\\left(\\frac{\\bcancel{2}}{\\bcancel{3}}\\right)\\left(\\frac{\\bcancel{3}}{\\bcancel{4}}\\right)\\cdots\\left(\\frac{\\bcancel{n}}{n+1}\\right) \\\\<br \/>\n&#038;= \\frac{1}{n+1}<br \/>\n\\end{align}This is an example of a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Telescoping_series\">telescoping series<\/a>; all the terms in the middle cancel out and we are left with $\\frac{1}{n+1}$ of the cake after all friends have gone. Unfortunately, this tends to zero as $n\\to\\infty$, so with this method, there will be no cake left after all friends have gone!<\/p>\n<h3>Method 2<\/h3>\n<p>In this method, Friend number $n$ takes $\\frac{1}{(n+1)^2}$ of what remains. Using an approach similar to the previous method, we are left with:<br \/>\n\\begin{align}<br \/>\nx_n &#038;= \\left(1-\\frac{1}{2^2}\\right)\\left(1-\\frac{1}{3^2}\\right)\\left(1-\\frac{1}{4^2}\\right)\\cdots\\left(1-\\frac{1}{(n+1)^2}\\right) \\\\<br \/>\n&#038;= \\left(\\frac{2^2-1}{2^2}\\right)\\left(\\frac{3^2-1}{3^2}\\right)\\left(\\frac{4^2-1}{4^2}\\right)\\cdots \\left(\\frac{(n+1)^2-1}{(n+1)^2}\\right) \\\\<br \/>\n&#038;= \\left(\\frac{1\\cdot 3}{2 \\cdot 2}\\right)\\left(\\frac{2\\cdot 4}{3 \\cdot 3}\\right)\\left(\\frac{3\\cdot 5}{4\\cdot 4}\\right)\\cdots \\left(\\frac{n\\cdot(n+2)}{(n+1)(n+1)}\\right) \\\\<br \/>\n&#038;= \\left(\\frac{1\\cdot \\bcancel{3}}{2 \\cdot \\bcancel{2}}\\right)\\left(\\frac{\\bcancel{2}\\cdot \\bcancel{4}}{\\bcancel{3} \\cdot \\bcancel{3}}\\right)\\left(\\frac{\\bcancel{3}\\cdot \\bcancel{5}}{\\bcancel{4}\\cdot \\bcancel{4}}\\right)\\cdots \\Biggl(\\frac{\\bcancel{n}\\cdot(n+2)}{\\bcancel{(n+1)}(n+1)}\\Biggr) \\\\<br \/>\n&#038;= \\frac{n+2}{2(n+1)}.<br \/>\n\\end{align}In the third step, we used the difference of squares formula $n^2-1 = (n-1)(n+1)$ to again obtain a telescoping series. This time, however, the sum is $\\frac{n+2}{2(n+1)}$, for which the limit $n\\to\\infty$ is $\\frac{1}{2}$. So half of the cake is left after all friends have gone.<\/p>\n<h3>Method 3<\/h3>\n<p>In this method, Friend number $n$ takes $\\frac{1}{(2n)^2}$ of what remains. Again using an approach similar to the previous methods, we obtain.<br \/>\n\\begin{align}<br \/>\nx_n &#038;= \\left(1-\\frac{1}{2^2}\\right)\\left(1-\\frac{1}{4^2}\\right)\\left(1-\\frac{1}{6^2}\\right)\\cdots\\left(1-\\frac{1}{(2n)^2}\\right).<br \/>\n\\end{align}While it looks deceptively similar to the two previous examples solved above, this infinite product is substantially more complicated since there is no telescoping. There is a way to approach this using calculus, but I will instead show a proof using complex analysis that I think is a bit more intuitive.<\/p>\n<p>Every polynomial $p(z)$ of degree $n$ can be factored as $p(z)=a(z-c_1)\\cdots(z-c_n)$ where the $c_k$ are zeros of the polynomial (they may be complex numbers). This result can be extended to the case where $p(z)$ is an infinite polynomial with infinitely many zeros. This is known as the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Weierstrass_factorization_theorem\">Weierstrass factorization theorem<\/a>. Roughly speaking, if $f(z)$ is an <a href=\"https:\/\/en.wikipedia.org\/wiki\/Entire_function\">entire<\/a> function (it must have a power series expansion that is valid everywhere), then we can write it as an infinite product $f(z)=a(z-c_1)(z-c_2)\\cdots$ where the $c_k$ are zeros of the infinite polynomial.<\/p>\n<p>Consider the function $f(z) = \\frac{\\sin(\\pi z)}{\\pi z}$. This is an entire function because $\\sin(\\pi z)$ has a power series that is valid everywhere and it has no constant term (recall $\\sin(x) = x-\\frac{1}{3!}x^3+\\frac{1}{5!}x^5-\\cdots$) so we can divide through by $\\pi z$ and we get another valid power series. The places where $f(z)=0$ correspond to $z \\in \\{\\pm1,\\pm2,\\pm3,\\dots\\}$. Note also that $f(0) = \\lim_{z\\to 0} \\frac{\\sin(\\pi z)}{\\pi z} = 1$. By the Weierstrass factorization theorem (I&#8217;m skipping some technical details here), we can write:<br \/>\n\\begin{align}<br \/>\nf(z) &#038;= a(1-z)(1+z)\\left(1-\\frac{z}{2}\\right)\\left(1+\\frac{z}{2}\\right)\\left(1-\\frac{z}{3}\\right)\\left(1+\\frac{z}{3}\\right)\\cdots \\\\<br \/>\n&#038;= a\\left(1-z^2\\right)\\left(1-\\frac{z^2}{2^2}\\right)\\left(1-\\frac{z^2}{3^2}\\right)\\cdots<br \/>\n\\end{align}Since $f(0) = 1$, it must be the case that $a=1$. So we have the series:<br \/>\n\\[<br \/>\n\\frac{\\sin(\\pi z)}{\\pi z} = \\left(1-z^2\\right)\\left(1-\\frac{z^2}{2^2}\\right)\\left(1-\\frac{z^2}{3^2}\\right)\\cdots.<br \/>\n\\]This is known as the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Infinite_product#Product_representations_of_functions\">Euler infinite product<\/a> representation for the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Sinc_function\">sinc<\/a> function. Substituting $z=\\frac{1}{2}$, the infinite product becomes exactly the one we wanted to evaluate for how much cake is left:<br \/>\n\\[<br \/>\n\\left(1-\\frac{1}{2^2}\\right)\\left(1-\\frac{1}{4^2}\\right)\\left(1-\\frac{1}{6^2}\\right)\\cdots = \\frac{2}{\\pi} \\approx 0.6366.<br \/>\n\\]This infinite product (or its inverse, rather) also has a name; it&#8217;s called the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Wallis_product\">Wallis product<\/a>.<\/p>\n<h3>Bonus: Odd-numbered terms<\/h3>\n<p>As a side note, if we only keep the odd-numbered terms of the product, we obtain:<br \/>\n\\[<br \/>\n\\left(1-\\frac{1}{3^2}\\right)\\left(1-\\frac{1}{5^2}\\right)\\left(1-\\frac{1}{7^2}\\right)\\cdots = \\frac{\\pi}{4} \\approx 0.7854.<br \/>\n\\]This can be proved using a similar approach, this time with the function:<br \/>\n\\[<br \/>\n\\cos\\left(\\frac{\\pi z}{2}\\right) = (1-z^2)\\left(1-\\frac{z^2}{3^2}\\right)\\left(1-\\frac{z^2}{5^2}\\right)\\left(1-\\frac{z^2}{7^2}\\right)\\cdots<br \/>\n\\]It then follows that:<br \/>\n\\[<br \/>\n\\left(1-\\frac{1}{3^2}\\right)\\left(1-\\frac{1}{5^2}\\right)\\left(1-\\frac{1}{7^2}\\right)\\cdots<br \/>\n= \\lim_{z\\to 1} \\frac{\\cos\\left(\\frac{\\pi z}{2}\\right)}{1-z^2} = \\frac{\\pi}{4}<br \/>\n\\]As a sanity check, we found that using the even terms gives $\\frac{2}{\\pi}$ and using the odd terms gives $\\frac{\\pi}{4}$. So using all the terms gives $\\frac{2}{\\pi}\\cdot \\frac{\\pi}{4} = \\frac{1}{2}$, which is what we found using &#8220;Method 2&#8221;!\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This week&#8217;s Riddler Express is a short problem about infinite series. Let&#8217;s dig in! (I paraphrased the question) You and your infinitely many friends are sharing a cake, and you come up with several different methods of splitting it. Friend 1 takes half of the cake, Friend 2 takes a third of what remains, Friend &hellip; <a href=\"https:\/\/laurentlessard.com\/bookproofs\/infinite-cake\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Infinite cake&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[7],"tags":[28,38,2],"class_list":["post-3046","post","type-post","status-publish","format-standard","hentry","category-riddler","tag-calculus","tag-complex-analysis","tag-riddler"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/3046","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/comments?post=3046"}],"version-history":[{"count":9,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/3046\/revisions"}],"predecessor-version":[{"id":3057,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/posts\/3046\/revisions\/3057"}],"wp:attachment":[{"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/media?parent=3046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/categories?post=3046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laurentlessard.com\/bookproofs\/wp-json\/wp\/v2\/tags?post=3046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}