# Sine and Cosine equation ( diophantine )

$\cos(\frac{1}{ab} \pi) = \sin(\frac{a}{b} \pi)$

Let $a$ and $b$ be positive integers. What is the full set of solutions?

An example is $a = 2$ and $b = 5$.

I assume the best method is to take $\arccos$ on both sides and solve the resulting diophantine equation?

-
Use $\cos(x) = \sin(\pi/2 + x)$ – Cocopuffs Sep 10 '12 at 14:44
Thanks. You meant $sin(\pi/2 - x)$ i assume. – mick Sep 10 '12 at 15:13
They are the same – Cocopuffs Sep 10 '12 at 15:41
@mick $\sin(\pi/2 + x) = \cos(-x) = \cos(x)$. – Erick Wong Sep 10 '12 at 15:42

Thanks to the hint given i can solve the question easily now.

$a = 1$ is trivial.

So Lets take $a <> 1$. Using $cos(x) = sin(1/2 \pi - x)$ we get

$\frac{1}{2} + \frac{-1}{ab} = \frac{a}{b} + 2k$

$\frac{ab}{2ab} + \frac{-2}{2ab} = \frac{(2aa+4kab)}{2ab}$

$ab - 2 = 2aa + 4kab$

$2aa + (4k-1)ab = -2$

$a(2a + (4k-1)b) = -2$

$a=2$

$4+(4k-1)b = -1$

$(4k-1)b = -5$

$b=5$

Thanks for the help. I cant believe i missed the evident.

-

A start: Note that $\cos x=\sin\left(x+\frac{\pi}{2}\right)$. And in general, we have $\sin s=\sin t$ iff $t$ has the shape $t=s+2k\pi$ or $t=\pi-s+2k\pi$ for some integer $k$.

-

we can conclude that $\sin (\frac{\pi}{2}－\frac{1}{ab} \pi) = \sin (\frac{a}{b} \pi)$ ,then$$\frac{\pi}{2}－\frac{1}{ab} \pi=(-1)^k\frac{a}{b} \pi+k\pi\quad k\in Z$$ since if $\sin A=\sin B$,then we have $A=k\pi +(-1)^kB$,it is easy to prove.

-