Solving trigonometric equations 
If we have $$\sin (A) +\cos (A) + \csc (A) + \sec (A) +\tan (A) +\cot (A)= 7$$ and
  $$\sin(2A) =a-b\sqrt{7}= 2\sin(A)\cos(A).$$
  What values can $a$ and $b$ take?


Let $A=x$ and  $\sin{x}+\cos{x}=t$.
Hence, $|t|\leq\sqrt2$, $\sin{x}\cos{x}=\frac{t^2-1}{2}$ and we need to solve
$$t+\frac{t}{\frac{t^2-1}{2}}+\frac{1}{\frac{t^2-1}{2}}=7$$ or
$$t+\frac{2}{t-1}=7$$ or
$$t^2-8t+9=0$$ or
$$(t-4)^2=7,$$ which gives
$t=4+\sqrt7$, which is impossible, or $t=4-\sqrt7$,
which gives $\sin2x=t^2-1=(4-\sqrt7)^2-1=22-8\sqrt7$.
Id est, $a=22$ and $b=8$ if you mean that $a$ and $b$ are naturals.
Done!
