Hello, naz786!
Want to see an off-the-wall method?
\(\displaystyle \L\int \frac{1\,-\,\sin x}{\cos x}\,dx\)
Multiply top and bottom by \(\displaystyle (1\,+\,\sin x):\)
. . \(\displaystyle \L\frac{1\,+\,\sin x}{1\,+\,\sin x}\cdot\frac{1\,-\,sin x}{\cos x}\;=\;\frac{1\,-\,\sin^2x}{\cos x(1\,+\,\sin x)} \;=\;\frac{\cos^2x}{\cos x(1\,+\,\sin x)} \;=\; \frac{\cos x}{1\,+\,\sin x}\)
We have: \(\displaystyle \L\,\int\frac{\cos x}{1\,+\,\sin x}\,dx\)
. . Let \(\displaystyle u\:=\:1\,+\,\sin x\;\;\Rightarrow\;\;du\:=\:\cos x\,dx\;\;\Rightarrow\;\;dx\:=\:\frac{du}{\cos x}\)
Substitute: \(\displaystyle \L\;\int\frac{\cos x}{u}\left(\frac{du}{\cos x}\right)\;=\;\int\frac{du}{u} \;= \;\ln|u| \,+\,C\)
Back-substitute: \(\displaystyle \L\;\ln|1\,+\,\sin x|\,+\,C\)