Prove the identity: $\dfrac{\sin x + \cos x}{\sin x - \cos x} - \dfrac{\sec^2 x + 2}{\tan^2 x - 1} = \dfrac{2}{\tan x + 1}$
$\begin{aligned}
LHS & = \dfrac{\sin x + \cos x}{\sin x - \cos x} - \dfrac{\sec^2 x + 2}{\tan^2 x - 1} \\\\
& = \dfrac{\dfrac{\sin x}{\cos x} + 1}{\dfrac{\sin x}{\cos x} - 1} - \dfrac{\sec^2 x + 2}{\tan^2 x - 1} \\\\
& = \dfrac{\tan x + 1}{\tan x - 1} - \dfrac{\sec^2 x + 2}{\tan^2 x - 1} \\\\
& = \dfrac{\left(\tan x + 1\right)^2}{\left(\tan x - 1\right) \left(\tan x + 1\right)} - \dfrac{\sec^2 x + 2}{\tan^2 x - 1} \\\\
& = \dfrac{\tan^2 x + 1 + 2 \tan x}{\tan^2 x - 1} - \dfrac{\sec^2 x + 2}{\tan^2 x - 1} \\\\
& = \dfrac{\sec^2 x + 2 \tan x - sec^2 x - 2}{\tan^2 x - 1} \\\\
& = \dfrac{2 \left(\tan x - 1\right)}{\left(\tan x + 1\right) \left(\tan x - 1\right)} \\\\
& = \dfrac{2}{\tan x + 1} = RHS
\end{aligned}$
Hence proved.