{"id":308,"date":"2016-05-18T20:27:46","date_gmt":"2016-05-18T20:27:46","guid":{"rendered":"http:\/\/florian-roemer.de\/blog\/?p=308"},"modified":"2016-05-19T20:38:29","modified_gmt":"2016-05-19T20:38:29","slug":"trigonometric-pythagorean-identity-supercharged","status":"publish","type":"post","link":"https:\/\/florian-roemer.de\/blog\/trigonometric-pythagorean-identity-supercharged\/","title":{"rendered":"Trigonometric Pythagorean Identity, supercharged"},"content":{"rendered":"<p>You know how they say good things always come back? Well, I recently stumbled over something that reminded me a lot on a <a href=\"http:\/\/florian-roemer.de\/blog\/trigonometric-pythagorean-identity-extended\/\">post I had made about generalizations of the Trigonometric Pythagorean Identity<\/a>. In short, the well-known identity $\\sin^2(x)+\\cos^2(x)=1$ can be generalized to a sum of $N\\geq 2$ terms that are uniformly shifted copies of the sine function, which yields<\/p>\n<p>$$\\sum_{n=0}^{N-1} \\sin^2\\left(x+n\\frac{\\pi}{N}\\right) = \\frac{N}{2}$$<\/p>\n<p>Well, I now came across a sum of fourth powers of shifted sine functions and much to my initial surprise, these admit very similar simplifications. In fact, it works for any integer power! Look at what I found:<\/p>\n<p>$$\\sum_{n=0}^{N-1} \\sin^{2k}\\left(x+n\\frac{\\pi}{N}\\right) =<br \/>\nN \\frac{(2k)!}{(k!)^2 2^{2k}} = \\frac{N}{\\sqrt{\\pi}} \\frac{\\Gamma(k+1\/2)}{\\Gamma(k+1)}\u00a0 \\; k \\in \\mathbb{N}<br \/>\n$$<\/p>\n<p>for $N\\geq k+1$. Isn&#8217;t this fascinating? No matter to which even power we raise the shifted sines, their sums will always give a constant in the form $c_k \\cdot N$ and this constants $c_k$ can be computed analytically.<\/p>\n<p>Here are some examples: sum of squares ($k=1$): $c_1 = 1\/2$, sum of fourth powers ($k=2$): $c_2=3\/8$, $k=3: 5\/16$, $k=4: 35\/128$ and so on. Moreover, I think I know how to prove even the &#8220;supercharged&#8221; version of the TPI for any $k$. I&#8217;ll write about it in another blog post.<\/p>\n<p><strong>*Update*<\/strong>: <a href=\"http:\/\/florian-roemer.de\/blog\/extended-trigonometric-pythagorean-identities-the-proof\/\">And here is the proof<\/a>!<\/p>\n<p><strong>*Update2*<\/strong>: Just another small addition: The coefficients $c_k$ satisfy an interesting recurrence relation since you can compute $c_k$ as<\/p>\n<p>$$c_k = \\frac{2k+1}{2k+2} c_{k-1}$$<\/p>\n<p>with $c_0 = 1$. This makes clear what structure they actually have: $c_1 = \\frac{1}{2}$, $c_2 = \\frac{1 \\cdot 3}{2 \\cdot 4}$, $c_3 = \\frac{1 \\cdot 3 \\cdot 5}{2\\cdot 4\\cdot 6}$, and so on. Each $c_k$ is equal to the product of the first $k$ odd numbers divided by the product of the first $k$ even numbers. If you like, you can write them with <a href=\"https:\/\/en.wikipedia.org\/wiki\/Double_factorial\">double factorials<\/a> via<\/p>\n<p>$$c_k = \\frac{(2k-1)!!}{(2k)!!}.$$<\/p>\n<p>They are highly related to <a href=\"https:\/\/en.wikipedia.org\/wiki\/Wallis'_integrals\">Wallis&#8217; integrals<\/a> $W_n$. Maybe this is not too surprising since they are defined as<\/p>\n<p>$$W_n = \\int_{0}^{\\frac{\\pi}{2}} \\cos^n(x) {\\rm d}x$$<\/p>\n<p>and satisfy<\/p>\n<p>$$W_{2n} = \\frac{(2n-1)!!}{(2n)!!} \\frac{\\pi}{2}.$$<\/p>\n<p>So what the generalized TPI above shows is that the equispaced $N$-term sum delivers somehow the same value as the integral, no matter where we start the sum. Kind of cool I think.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You know how they say good things always come back? Well, I recently stumbled over something that reminded me a lot on a post I had made about generalizations of the Trigonometric Pythagorean Identity. In short, the well-known identity $\\sin^2(x)+\\cos^2(x)=1$ can be generalized to a sum of $N\\geq 2$ terms that are uniformly shifted copies [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/florian-roemer.de\/blog\/wp-json\/wp\/v2\/posts\/308"}],"collection":[{"href":"https:\/\/florian-roemer.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/florian-roemer.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/florian-roemer.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/florian-roemer.de\/blog\/wp-json\/wp\/v2\/comments?post=308"}],"version-history":[{"count":11,"href":"https:\/\/florian-roemer.de\/blog\/wp-json\/wp\/v2\/posts\/308\/revisions"}],"predecessor-version":[{"id":354,"href":"https:\/\/florian-roemer.de\/blog\/wp-json\/wp\/v2\/posts\/308\/revisions\/354"}],"wp:attachment":[{"href":"https:\/\/florian-roemer.de\/blog\/wp-json\/wp\/v2\/media?parent=308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/florian-roemer.de\/blog\/wp-json\/wp\/v2\/categories?post=308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/florian-roemer.de\/blog\/wp-json\/wp\/v2\/tags?post=308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}