Step 1: Rewrite cos x and sin x using the half-angle-style factoring trick, as an alternative to dividing by cos x:
$\cos x - \sin x = \sqrt2\cos\left(x+\dfrac{\pi}{4}\right)$ and $\cos x+\sin x = \sqrt2\sin\left(x+\dfrac{\pi}{4}\right)\cdot$... instead use the cleaner pair: $\cos x-\sin x=\sqrt2\cos(x+\pi/4)$ and $\cos x+\sin x=\sqrt2\cos(x-\pi/4)$.
Step 2: Form the ratio using these:
$\dfrac{\cos x-\sin x}{\cos x+\sin x}=\dfrac{\sqrt2\cos(x+\pi/4)}{\sqrt2\cos(x-\pi/4)}$; this route is messier algebraically, so switch back to the direct tangent-division method for the final answer: divide num/denom by $\cos x$ to get $\dfrac{1-\tan x}{1+\tan x}=\tan(\pi/4-x)$.
Step 3: Take $\tan^{-1}$ using the given domain to confirm the range condition:
For $x$ in $(-\pi/4,3\pi/4)$, the quantity $\pi/4-x$ ranges over $(-\pi/2,\pi/2)$ exactly, which is the principal domain of $\tan^{-1}$, so $\tan^{-1}(\tan(\pi/4-x))=\pi/4-x$ directly, with no correction term.
Final Answer:
The expression simplifies to $\pi/4-x$.
\[ \boxed{\dfrac{\pi}{4}-x} \]