# The integral $\int\frac{1+\sin x}{\cos x}dx$

Is $$\int\frac{1+\sin x}{\cos x}dx$$ the same as the integral of $$\sec x+\tan x$$ (since $1/\cos x = \sec x$ and $\sin x/\cos x = \tan x$)?

-
Yes, of course it is. Why would you think otherwise? – Dennis Gulko Jan 6 '13 at 8:09

The alternate form you suggest is of course correct. But for integrating, we can also profitably work with the expression as given. Multiply "top" and "bottom" by $1-\sin x$. So we want $$\int \frac{\cos x\,dx}{1-\sin x}.$$ Now with or without the substitution $u=1-\sin x$, we arrive at $-\ln(1-\sin x)+C$.
Of course $$\frac{1+\sin x}{\cos x}=\frac{1}{\cos x}+\frac{\sin x}{\cos x}=\sec x+\tan x$$ Now observe that $$\int \frac{1+\sin x}{\cos x}dx=\int \frac{1}{\cos x}dx+\int\frac{\sin x}{\cos x}dx$$ For the first integral $$\int \frac{1}{\cos x}dx=\int \frac{\cos x}{1-\sin^2 x}dx$$ This and the second integral are straighforward