# Calculate exact solution to maximize cosine

For a constant, N, what value of x will maximize the cosine (or any trig) function?

$$1 = \cos{(Nx)}$$

I am looking for the exact form, not the approximation because, $$\frac{\arccos{(1)}}{N} = x = 0$$

For example, WolframAlpha.com states that if N = 19.013, then, $$x = \frac{2000 \pi n}{19013} , n \text{ } \varepsilon \text{ } \text{set of integers}$$ How was that solution calculated?

• How do you maximize an equation? You can solve an equation. The solution comes from examining the set of angles with cosine 1, which you can figure out by looking at the unit circle. – Qiaochu Yuan Nov 30 '10 at 16:22
• I am solving for when cosine is maximized which is one – Elpezmuerto Nov 30 '10 at 16:26
• Try first the case N=1, then N=2, then see if you can decide the general process. (Polya: if you cannot answer a question, there is a simpler question you also cannot answer. Answer that one first) – Matthew Leingang Nov 30 '10 at 16:36
• It is true the maximum value of cosine is 1, do you know for what x cosine attains its maximum? – WWright Nov 30 '10 at 16:38
• I have just a quick note on your equation stating, $$x = \frac{2000 \pi n}{19013} , n \text{ } \varepsilon \text{ } \text{set of integers}$$ You should typically $\in$ (\in) rather than $\varepsilon$. Also, to make the $\mathbb{Z}$ symbol, you type \mathbb{Z}. The reason I mention this is because I used to typeset the symbols as you have above and then realized the proper $\LaTeX$ code to get what I want. – Tyler Clark Nov 30 '10 at 18:56

Cosine takes it's maximum when the argument is $2k\pi$, where $k$ is any integer. Therefore

\begin{aligned}2k\pi = Nx \\\\ x=\frac{2k\pi}{N}\end{aligned}

Thus for $N=19.013$ $$x= \frac{2k\pi}{19.013} = \frac{2000k\pi}{19013}$$.

We know that

$$1 = \cos{(2\pi)}$$

Therefore, for a given N to "maximize" cosine:
\begin{aligned} 2\pi = Nx \ \end{aligned} \begin{aligned} x = \frac{2\pi}{N} \end{aligned}

Using the above equation: \begin{aligned} x &= \frac{2\pi}{19.013} \ \end{aligned} \begin{aligned} x &\approx 0.33046 \ \end{aligned}

• The WolframAlpha answer is more general, but only because it accounts for the fact that cos(t) = 1 for t every even multiple of pi (including zero). – hardmath Nov 30 '10 at 18:43

$x=0$ is always a solution, since $\cos(N\times0)=\cos0=1$ .

If you want the set of all solutions, use the fact that

$$\cos\theta=1 \Leftrightarrow \theta=2k\pi \text{ with } k\in\mathbb{Z}$$

Replacing $\theta$ by $Nx$ above gives you the set of solutions :

$$1=\cos{Nx}\Leftrightarrow x\in \left\{\frac{2k\pi}N\right\}_{k\in\mathbb{Z}}$$

This is the solution given by Wolfram Alpha for $N=19.013=\frac{19013}{1000}$.