Sử dụng đồng nhất thức:
$1=\frac{\cos \frac{\pi}{4} }{\cos \frac{\pi}{4} }=\frac{\cos [(x+\frac{\pi}{4})-x] }{\frac{\sqrt{2} }{2} } =\sqrt{2} \cos [(x+\frac{\pi}{4})-x] $
Ta được:
$f(x)dx=\sqrt{2}\int\limits \frac{\cos [(x+\frac{\pi}{4})-x] dx}{\sin x\cos(x+\frac{\pi}{4} )} $
$=\sqrt{2} \int\limits \frac{\cos (x+\frac{\pi}{4})\cos x+\sin(x+\frac{\pi}{4})\sin x }{\sin x\cos(x+\frac{\pi}{4} )}dx $
$=\sqrt{2}[\int\limits \frac{cos xdx}{\sin x} +\int\limits \frac{\sin (x+\frac{\pi}{4})dx}{\cos (x+\frac{\pi}{4})} ] $
$=\sqrt{2}[\ln|\sin x|-\ln|\cos (x+\frac{\pi}{4})|]+C=\sqrt{2}\ln |\frac{sin x}{\cos (x+\frac{\pi}{4})} |+C $