GTX0 AnnouncementsFeedbackHelp | SandboxNewest Posts | Replies | Hottest
NIFE UpdatesRoadmapRequests | HelpDiscuss Game Worlds


This year's cosine function!
Posted: Posted January 19th
Edited January 19th by The Fly

And here's one that I don't know how to solve! (Granted haven't spent much time on it.)

Find the product

\( \cos(x) \cos(2x) \cos(3x) \cdots \cos(2017x) \)

where \( x = \displaystyle\frac{2\pi}{2018} \).

(That's from the same Math Wrangle exam.) ... Weird Problems!

Have fun!
The Fly

===================================

settingsOptions
There are 11 Replies

For this one I thought I could use Euler's formula which says

\( e^{i\theta} = \cos\theta + i \sin\theta \)

but when you multiply these for \(\theta = x, 2x, 3x, ... \) etc, you do get a product of cosines but also sines as well. Dangit!

Posted January 20th by The Fly

Yeah I had some false positives here as well. If you can get any number inside the cosines to be (X*pi)/2, where X is odd, then the result of everything would be 0. But that's impossible because 2018 isn't divisible by 4...

I had this beautiful general function and then realized I'd done my algebra wrong p: might give this another go though.

Posted January 20th by Xhin
Xhin
Fractal icious

Don't hesitate to put wrong arguments here. Makes for good conversation and it's educational too. What I wanted to, but which ended up not working apparently, is to just use the complex exponential in Euler's formula ANYWAY! So here we go. Since \(\cos\theta\) is the real part of \(e^{i\theta}\), let's just plug x in it and multiply them all -- like this

\(\LARGE e^{i x} e^{i 2x} e^{i 3x} \cdots e^{i (N-1)x} = e^{i(1+2+3+ \cdots + (N-1))x} = e^{i \frac{N(N-1)}{2} x}\)

where I wrote \(N = 2018\) and used the geometric sum formula. Now plug in \(x = \frac{2\pi}{N}\) (which is the same x as in the problem) in the last exponential and you get

\(\LARGE e^{i \frac{N(N-1)}{2} x} = e^{i 2017 \pi } = - 1\)

since 2017 is odd. But that can't be the answer since all these cosines are less than 1 so the product of so many of them will have to be fair bit less than one. In any case the answer is going to be small negative number. We agree the answer is negative?

You're right about 2018 not being divisible by 4, or else the whole product will be 0 since one of them will be 0.


Edited January 20th by The Fly

No proof yet, but here's what I found.

Let n be the number of terms of the product, and let d be the denominator the fraction x. So in the actual problem, n is 2017 and d is 2018. Here are the outcomes for some smaller values of n and d. Let's look for a pattern. Since 2018 is 2 modulo 4, and 2017 is one smaller than 2018, I will continue to let d be 2 modulo 4 and n be d-1.

n=1, d=2 gives -1

n=5, d=6 gives -1/16

n=9, d=10 gives -1/256

The pattern looks like the denominator is exponential with base 16. So potentially the product for a given d and n=d-1 is -16^-floor(n/4).

With n=2018, floor(n/4) is 504, so my guess at the answer is -16^-504, which is a very small number.

Posted January 20th by EN
EN

I think I now know. Pair the first and last cosines, the second and second last one, etc and use a trig identity for those. There will be a middle cosine that's a -1.

It looks a bit like Gauss' trick (or legend) when he was 12 he was asked to find the sum of the numbers

\( 1 + 2 + 3 + \cdots + (N-1) + N \)

and he gave the answer right away: he added the first and last, second to the second to last, ... all of which gave the same answer N+1, etc. From that he got his answer N(N+1)/2.

Posted January 20th by The Fly

You're on the right track EN! It is indeed a very very small negative number -- maybe even a power of 2?! Though small, I believe the point of the problem to write this small number in a succinct way (in familiar terms).

Edited January 20th by The Fly

Yeah, I just made a sketch on the unit circle and saw the pairing and the -1 from cos(pi).

For example, in the n=5, d=6 case, we have the product of cosine of the first five multiples of pi/3. The first is quadrant 1 and equals .5. The second is in quadrant 2 and is -.5. Then -1, then -.5 again in quadrant 3, then .5 again in quadrant 4. The negatives and positive .5 show up the same number of times, to give 1/16. But the -1 from cos(pi) makes it -1/16, which is what I gave before.

So if you know the product of all of the cosine values in quadrant 1, then raise that to the 4th power and multiply by negative one, you'll get your answer. That's probably the cosine identity we're looking for.

Posted January 20th by EN
EN

Something like product i=1 to (k-1)/2 of cos(pi*i/k), where k is odd. In our case, k would be 2018/2 = 1009.

Posted January 20th by EN
EN

Written as a power of 2, the answer would be -(2^(-2016)) = -1/(2^2016).

Posted January 20th by EN
EN

Here's one way to get the answer, which implies the identity that we were looking for. Read the chosen answer to this question, and the first comment on it in particular.

https://math.stackexchange.com/questions/1351337/product-of-cosines-prod-r-17-cos-left-fracr-pi15-right

Posted January 20th by EN
EN

You're quite right EN, good posting! Sorry for my delayed response. I knew that I could do it more formally but I got lazy!

Posted January 27th by The Fly
Reply to: This year's cosine function!
Enter your message here

Site Rules | Complaints Process | Register Complaint Facebook Page
GTX0 © 2009-2017 Xhin GameTalk © 1999-2008 lives on