Differentiate the following functions with respect to x: \[\left( \mathbf{i} \right)\text{ }\left( {{\mathbf{x}}^{\mathbf{x}}} \right)\text{ }\surd \mathbf{x}\] $(ii){{x}^{(\sin x-\cos x)}}+\left( \frac{{{x}^{2}}-1}{{{x}^{2}}+1} \right)$