<s>[INST] Find the value of $\frac{a+b}{10}$ 
If $\sin x+\cos x+\tan x+\cot x+\sec x +\csc x=7$, then assume that $\sin(2x)=a-b\sqrt7$, where $a$ and $b$ are rational numbers. Then find the value of $\frac{a+b}{10}$.

How to solve these kind of problems. I can make substitutions and convert all of them to $\sin$ and then solve for it but  it'll be very lengthy. Is there any other short and nicer method.
 [/INST] Let $\displaystyle \sin(x)+\cos(x)=z$
Then $[\sin(x)+\cos(x)]^2=z^2\Longrightarrow \sin(2x)=z^2-1$
So $\displaystyle \sin(x)+\cos(x)+\frac{2(\sin^2x+\cos^2x)}{\sin(2x)}+\frac{2(\sin x+\cos(x))}{\sin(2x)}=7$
$\displaystyle z+\frac{2}{z^2-1}+\frac{2z}{z^2-1}=7$
$\displaystyle  z+\frac{2}{z-1}=7\Longrightarrow z^2-8z+9=0$
$\displaystyle z=4-\sqrt{7}\ $ because $-\sqrt{2}\leq z\leq \sqrt{2}$
So $\sin(2x)=z^2-1=(4-\sqrt{7})^2-1$
So $\displaystyle \sin(2x)=22-8\sqrt{7}=a-b\sqrt{7}$
$\displaystyle \Longrightarrow \frac{a+b}{10}=\frac{22+8}{10}=3$
</s>