If $y$ simplifies to $a\pi + $b then find ($a – b$), for the following condition. Let $y=\sin^{-1}(\sin 8)–\tan^{-1}(\tan 10)+\cos^{-1}(\cos 12)–\sec^{-1}(\sec 9) +\cot^{-1}(\cot 6)– \mathrm{cosec}^{-1}(\mathrm{cosec} 7)$. 
If  $y$ simplifies to  $a\pi + $b  then find ($a – b$)
My attempt is as follows:-
$$\sin^{-1}(\sin 8)=3\pi-8$$
$$\tan^{-1}(\tan 10)=-3\pi+10$$
$$\cos^{-1}(\cos 12)=4\pi-12$$
$$\sec^{-1}(\sec 9)=3\pi-9$$
$$\cot^{-1}(\cot 6)=2\pi-6$$
$$\mathrm{cosec}^{-1}(\mathrm{cosec} 7)=7-2\pi$$
$$y=(3\pi-8)+(3\pi-10)+(4\pi-12)-(3\pi-9)+(2\pi-6)-(7-2\pi)$$
$$y=11\pi-34$$
so $a=11, b=-34$, hence $a-b=11+34=45$
But actual answer is $53$, I don't know where I am going wrong. I checked the solution lot of times but didn't get any breakthrough.
 A: I got my mistake
$$\sec^{-1}(\sec 9)=-2\pi+9$$
$$\cot^{-1}(\cot 6)=-\pi+6$$
others are fine
$$y=(3\pi-8)+(3\pi-10)+(4\pi-12)+(2\pi-9)+(6-\pi)+(2\pi-7)$$
$$y=13\pi-40$$
So $a=13$,$b=-40$, hence $a-b=53$
I also wanted to discuss a short trick for solving such questions where we have to calculate $\sin^{-1}(\sin x),\cos^{-1}(\cos x),\tan^{-1}(\tan x)\cdots\cdots$ in a very short time.
But before reading this trick, please see and draw the graphs of these functions, otherwise you will have to cram this.
Mainly for people who are preparing for competitive exams:-
Step-$1$ 
$1)$ Make all the values positive as follows:-
$$\sin^{-1}(\sin (-x))=-\sin^{-1}(\sin x)$$
$$\tan^{-1}(\tan (-x))=-\tan^{-1}(\sin x)$$
$$\mathrm{cosec}^{-1}(\mathrm{cosec} (-x))=-\mathrm{cosec}^{-1}(\mathrm{cosec} x)$$
$$\cos^{-1}(\cos (-x))=\pi-\cos^{-1}(\cos x)$$
$$\cot^{-1}(\cot (-x))=\pi-\cot^{-1}(\cot x)$$
$$\sec^{-1}(\sec (-x))=\pi-\sec^{-1}(\sec x)$$
This is pretty standard stuff, so nothing new.
Step-$2$- For $\sin^{-1}(\sin x),\tan^{-1}(\tan x),\mathrm{cosec}^{-1}\mathrm{cosec}(x)$
i) Get the nearest integer multiples of $\pi$ for $x$
Like for $\sin^{-1}(\sin 8)$
$$2\pi<=8<=3\pi$$
ii) Now check if $x$ is closer to lower or upper bound, like in the above case $8$ is closer to $3\pi$.
iii) Now the idea is that $\sin^{-1}(\sin x)$ should be positive, as $x$ is positive, so if $x$ is closer to lower bound then answer is $x-$ lower-bound otherwise upper-bound $-x$
$$8 \text { is closer to } 3\pi$$ 
Hence answer is 
$$\sin^{-1}(\sin 8)=3\pi-8$$
Step-$2$- For $\cos^{-1}(\cos x),\sec^{-1}(\sec x)$
i) Get the nearest odd multiples of $\pi$ for $x$ $(2n-1)\pi<=x<=(2n+1)\pi$
Like for $\sec^{-1}(\sec 9)$
$$\pi<=9<=3\pi$$
ii) Just see if $x$ lies between $(2n-1)\pi<=x<=2n\pi\quad$ or $\quad2n\pi<=x<=(2n+1)\pi$
$$2\pi<=9<=3\pi$$
iii) Now again the idea is that $\cos^{-1}(\cos x)$ should be positive as range of $\cos^{-1}(\cos x)$ is $\left[0,\pi\right]$. So if $(2n-1)\pi<=x<=2n\pi$, then answer is $2n\pi-x$, otherwise $x-2n\pi$
Hence $$\sec^{-1}(\sec 9)=9-2\pi$$
Step-$2$- For $\cot^{-1}(\cot x)$
i) Get the nearest integer multiples of $\pi$ for $x$
Like for $\cot^{-1}(\cot 6)$
$$\pi<=6<=2\pi$$
ii) Answer will be $x-$ lower-bound as again the idea is $\cot^{-1}(\cot x)$ should be positive as range of $\cot^{-1}(\cot x)$ is $\left[0,\pi\right]$.
So $$\cot^{-1}(\cot 6)=6-\pi$$
I hope this will be helpful.
