<s>[INST] Simplify $\tan^{-1}[(\cos x - \sin x)/(\cos x + \sin x)]$ 
Write the following functions in simplest form:
    $$\tan^{-1}\left(\frac{\cos(x)-\sin(x)}{\cos(x)+\sin(x)}\right), \quad 0<x<\pi$$

Please help me to solve this problem. I have been trying to solve this from last 3 hours. I can solve simple inverse trigonometric functions
 [/INST] It is  $\tan  ^{-1}\dfrac{\cos  \left(x\right)-\sin  \left(x\right)}{\cos  \left(x\right)+\sin  \left(x\right)}$
We will divide in bracket with cosx to get it in tan form which will be easy for us to simplify
$\implies \tan  ^{-1}\dfrac{\dfrac{\cos  \left(x\right)-\sin  \left(x\right)}{\cos  \left(x\right)}}{\dfrac{\cos  \left(x\right)-\sin  \left(x\right)}{\cos  \left(x\right)}}$
$\implies \tan  ^{-1}\dfrac{1-\tan  \left(x\right)}{1+\cos  \left(x\right)}$
Now we know that $\tan  ^{-1}x + \tan  ^{-1}y= \dfrac{x-y}{1-xy}$ when $xy<1$
and we have the bracket in the same form as $\dfrac{\tan  \left(1\right)-\tan  \left(x\right)}{1-\tan  \left(1\right)\tan  \left(x\right)}$
So we get $\tan  ^{-1} \left(\tan   \left(\dfrac{π}{4}\right) + \tan   \left(X\right)\right)$
i.e $\dfrac{π}{4-x}$.
</s>