ta có
\(\int\frac{dx}{cosx}=\int\frac{dx}{sin\left(\frac{\Pi}{2}-x\right)}=\int\frac{dx}{2sin\left(\frac{\Pi}{4}-\frac{x}{2}\right)cos\left(\frac{\Pi}{4}-\frac{x}{2}\right)}=-\frac{1}{2}\int\frac{dsin\left(\frac{\Pi}{4}-\frac{x}{2}\right)}{2sin\left(\frac{\Pi}{4}-\frac{x}{2}\right)cos^2\left(\frac{\Pi}{4}-\frac{x}{2}\right)}=\frac{-1}{4}\int\frac{dsin\left(\frac{\Pi}{4}-\frac{x}{2}\right)}{sin\left(\frac{\Pi}{4}-\frac{x}{2}\right)\left(1-sin^2\left(\frac{\Pi}{4}-\frac{x}{2}\right)\right)}\)
đặt \(t=sin\left(\frac{\Pi}{4}-\frac{x}{2}\right)\)
ta có
\(-\frac{1}{4}\int\frac{dt}{t\left(1-t^2\right)}=-\frac{1}{4}\int\frac{dt}{t\left(1-t\right)\left(1+t\right)}=\frac{-1}{4}\int\left(\frac{1}{x}+\frac{1}{2\left(1-t\right)}-\frac{1}{2\left(1+t\right)}\right)dt=\frac{-1}{4}ln\left|x\right|+\frac{1}{8}ln\left|1+t\right|+\frac{1}{8}ln\left|1-t\right|+C\)
thay biến vào ta tìm đc tích phân cần tìm