Suppose that
\[
S=\int\frac{\cos x}{\cos x+\sin x}\,\mathrm{d}x\quad\mbox{ and }\quad T=\int\frac{\sin x}{\cos x+\sin x}\,\mathrm{d}x.
\]
By considering \(S+T\) and \(S-T\) determine \(S\) and \(T\).
Evaluate \({\displaystyle \int_{\frac{1}{4}}^{\frac{1}{2}}(1-4x)\sqrt{\frac{1}{x}-1}\,\mathrm{d}x}\)
by using the substitution \(x=\sin^{2}t.\)
Solution:
\begin{align*}
&& S + T &= \int \frac{\cos x + \sin x }{\cos x + \sin x} \d x \\
&&&= \int \d x \\
&&&= x + C \\
&& S - T &= \int \frac{\cos x - \sin x}{\cos x + \sin x} \d x \\
&&&= \ln( \cos x + \sin x) + C \\
\Rightarrow && 2S &= x + \ln(\cos x + \sin x) + C \\
\Rightarrow && S &= \frac12 \left ( x + \ln(\cos x + \sin x) \right) + C \\
\Rightarrow && 2T &= x - \ln(\cos x + \sin x) + C \\
\Rightarrow && T &= \frac12 \left ( x - \ln(\cos x + \sin x) \right) + C
\end{align*}
\begin{align*}
&& I &= \int_{1/4}^{1/2} (1-4x)\sqrt{\frac1x-1} \d x \\
x = \sin^2 t, \d x = 2 \sin t \cos t \d t: &&&= \int_{\pi/6}^{\pi/4} (1-4\sin^2 t) \sqrt{\frac{1-\sin^2 t}{\sin^2 t}} 2 \sin t \cos t \d t\\
&&&=\int_{\pi/6}^{\pi/4} (1-4\sin^2 t)\frac{\cos t}{\sin t} 2 \sin t \cos t \d t \\
&&&= \int_{\pi/6}^{\pi/4} (1-4\sin^2 t) 2 \cos^2 t \d t \\
&&&= \int_{\pi/6}^{\pi/4} \left ( 2\cos^2t - 8 \sin^2t \cos^2 t \right) \d t \\
&&&= \int_{\pi/6}^{\pi/4} \left ( 1+\cos2t - 2 \sin^2 2t \right) \d t \\
&&&= \int_{\pi/6}^{\pi/4} \left ( 1+\cos2t +(\cos 4t-1)\right) \d t \\
&&&= \left[\frac12 \sin 2t + \frac14 \sin 4t \right]_{\pi/6}^{\pi/4} \\
&&&= \left ( \frac12 \right) - \left (\frac12 \frac{\sqrt{3}}{2} + \frac14 \frac{\sqrt{3}}{2} \right) \\
&&&= \frac{4-3\sqrt{3}}{8}
\end{align*}