<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] Since the question asked for $\sin 2x$, after failures using other methods, I found this one:
$$\sin x + \cos x + \tan x + \cot x + \csc x+ \sec x = 7$$
$$(\sin x + \cos x) + \frac{\sin x}{\cos x}+\frac{\cos x}{\sin x} + \frac{1}{\sin x}+\frac{1}{\cos x}=7$$
$$(\sin x + \cos x) + \frac{\sin^2x+\cos^2x}{\sin x\cos x} + \frac{\sin x + \cos x}{\sin x\cos x}=7$$
$$(\sin x + \cos x)+\frac{2(\sin x + \cos x)}{\sin 2x} = 7 - \frac{2}{\sin 2x}$$
We've converted the equation into the terms of $\sin(2x)$ (well, almost) using $\sin 2x = 2\sin x \cos x$. Notice that squaring will allow us to use this identity again, but now it's entirely in terms of $\sin(2x)$, so we can make a substitution.
$$(\sin x + \cos x)\left(1+\frac{2}{\sin 2x}\right) = 7 - \frac{2}{\sin 2x}$$
$$(\sin^2x+\cos^2x+2\sin x\cos x)\left(1+4\left(\frac{1}{\sin^22x}+\frac{1}{\sin2x}\right)\right) = 49+\frac{4}{\sin^22x}-\frac{28}{\sin 2x}$$
$$(1+\sin2x)\left(1+4\left(\frac{1}{\sin^22x}+\frac{1}{\sin2x}\right)\right) = 49+\frac{4}{\sin^22x}-\frac{28}{\sin 2x}$$
Now, you're ready to perform the substitution. Set $\sin 2x = a$
$$(1+a)\left(1+4\left({1\over a}+{1\over a^2}\right)\right) = 49 + \frac{4}{a^2}-\frac{28}{a}$$Multiply by $a^2$ to get an easier equation.
$$(1+a)(a^2+4a+4) = 49a^2+4-28a$$
$$a(a^2+4a+4) = 49a^2 - a^2-28a-4a+4-4$$
$$a(a^2+4a+4) = a(48a - 32)$$
$$a(a^2 - 44a + 36) = 0$$
One quickly discards $a=0$ as that yields the RHS of the original equation undefined for any solution of $\sin 2x = 0$.
We have
$$a^2 - 44a + 36 = 0$$
Plug this into the quadratic formula to get:
$$a = 22 \pm 8\sqrt7$$One easily sees that $22+8\sqrt7$ is out of the range of $\sin \theta$, so we have:
$$\color{blue}{\sin 2x = 22 - 8\sqrt7}$$
(At this point, I realized $a$ was already a variable in your question, I'm so sorry. The $a$ used above as a substitution is not the same $a$ which you asked for in the question.)
So, your final answer should be:
$$\color{green}{\frac{22+8}{10} = 3}$$
</s>