# Selected Problems (Pair Type Integration)

$\def\D{\displaystyle}\def\frac{\dfrac}$ (I) Let $C=\D\int \frac{\cos x}{\cos x+\sin x} d x, \quad S=\D\int \frac{\sin x}{\sin x+\cos x} d x$ \begin{eqnarray*} C+S&=&\D\int \frac{\cos x+\sin x}{\cos x+\sin x} d x=\D\int 1 d x=x\\ C-S&=&\D\int \frac{\cos x-\sin x}{\sin x+\cos x} d x=\ln (\sin x+\cos x)\\ \therefore C&=&\frac{1}{2}(x+\ln (\sin x+\cos x))\\ S&=&\frac{1}{2}(x-\ln (\sin x+\cos x)) \end{eqnarray*} (II) Let $C=\D\int \frac{\cos x}{\cos x-\sin x} d x, \quad S=\D\int \frac{\sin x}{\sin x-\cos x} d x$ \begin{eqnarray*} C+S &=& \D\int \frac{\cos x-\sin x}{\cos x-\sin x} d x=\D\int 1 d x=x\\ C-S &=& \D\int \frac{\cos x+\sin x}{-\sin x+\cos x} d x=-\ln (\sin x-\cos x)\\ \therefore C &=& \frac{1}{2}(x-\ln (\sin x-\cos x))\\ S &=& \frac{1}{2}(x+\ln (\sin x-\cos x))\end{eqnarray*} (III) Let $C=\D\int \cos x e^{x} d x ;\quad S=\D\int \sin x e^{x} d x$ \begin{eqnarray*} \frac{d}{d x}\left(\sin x \cdot e^{x}\right)&=&(\cos x) e^{x}+\sin x\left(e^{x}\right)\\ \text { Thus } C+S&=&(\sin x) e^{x}\\ \frac{d}{d x}\left(\cos x \cdot e^{x}\right)&=&(-\sin x) e^{x}+\cos x\left(e^{x}\right)\\ \text { Thus }-S+C&=&(\cos x) e^{x}\\ \therefore \quad C&=&\frac{1}{2} e^{x}(\sin x+\cos x)\\ S&=&\frac{1}{2} e^{x}(\sin x-\cos x) \end{eqnarray*} (IV) Let $I=\D\int \frac{x^{2}}{x^{4}+1} d x,\quad J=\D\int \frac{1}{x^{4}+1} d x$ \begin{eqnarray*} I+J &=& \D\int \frac{x^{2}+1}{x^{4}+1} d x=\D\int \frac{1+1 / x^{2}}{x^{2}+1 / x^{2}} d x=\D\int \frac{1+1 / x^{2}}{\left(x-\frac{1}{x}\right)^{2}+2} d x \\ &=& \D\int \frac{d u}{u^{2}+2}, \text { where } u=x-\frac{1}{x}, x \neq 0 \\ &=& \frac{1}{\sqrt{2}} \tan ^{-1}\left(\frac{u}{\sqrt 2}\right)=\frac{1}{\sqrt{2}} \tan ^{-1}\left(\frac{1}{\sqrt 2}\left(x-\frac{1}{x}\right)\right) \\ I-J &=& \D\int \frac{x^{2}-1}{x^{4}+1} d x=\D\int \frac{1-1 / x^{2}}{x^{2}+\frac{1}{x^{2}}} d x \\ &=& \D\int \frac{\left(1-1 / x^{2}\right) d x}{\left(x+\frac{1}{x}\right)^{2}-2}=\D\int \frac{d u}{u^{2}-2}, u=x+\frac{1}{x}, x \neq 0 \\ &=& \frac{1}{2 \sqrt{2}} \ln \cdot \frac{u-\sqrt{2}}{u+\sqrt{2}}=\frac{1}{2 \sqrt{2}} \ln \frac{x+\frac{1}{x}-\sqrt{2}}{x+\frac{1}{x}+\sqrt{2}} \\ \therefore \quad I &=& \frac{1}{4\sqrt{2}}\left[2 \tan ^{-1}\left(\frac{1}{\sqrt 2}\left(x-\frac{1}{x}\right)\right)+\ln \left(\frac{x+\frac{1}{x}-\sqrt{2}}{x+\frac{1}{x}+\sqrt{2}}\right)\right] \\ J &=& \frac{1}{4\sqrt{2}}\left[2 \tan ^{-1}\left(\frac{1}{\sqrt 2}\left(x-\frac{1}{x}\right)\right)-\ln \left(\frac{x+\frac{1}{x}-\sqrt{2}}{x+\frac{1}{x}+\sqrt{2}}\right)\right] \end{eqnarray*}