# How to calculate this complicated intergral

While solving this differential equation system I wanted to express a function in another way. I came up with the following integral:

$$\int \frac{dx}{\cos^2 x \cdot \left(\frac{1 + \sin x}{\cos x}\right)^\alpha}$$

How can I calculate it? We can assume $\alpha \ge 0$ if it's problematic to get a general solution.

• for integer $\alpha$ i would say yes and for half integer values i would be optimistic. – tired Nov 4 '15 at 20:36
• @tired: Actually, the integrand has a closed form antiderivative for all $\alpha$. :-$)$ – Lucian Nov 4 '15 at 20:39
• @Lucian true i figured it out just 2 minutes ago, fascinating :) – tired Nov 4 '15 at 20:46

Rewrite the integral like this: $$I=\int\frac{\sec^2x}{(\sec x+\tan x)^{\alpha}}dx$$ Apply integration by parts: $$I=\frac{\tan x}{(\sec x+\tan x)^{\alpha}}-\int\frac{-\alpha\tan x}{(\sec x+\tan x)^{\alpha+1}}(\sec^2x+\sec x\tan x)dx$$ $$\implies I=\frac{\tan x}{(\sec x+\tan x)^{\alpha}}+\alpha\int\frac{\sec x\tan x}{(\sec x+\tan x)^{\alpha}}dx$$ Now do the same thing again: $$I=\frac{\tan x}{(\sec x+\tan x)^{\alpha}}+\alpha\left[\frac{\sec x}{(\sec x+\tan x)^{\alpha}}-\int \frac{-\alpha\sec x}{(\sec x+\tan x)^{\alpha}}(\sec^2x+\sec x\tan x)dx\right]$$ $$\implies I=\frac{\tan x}{(\sec x+\tan x)^{\alpha}}+\frac{\alpha\sec x}{(\sec x+\tan x)^{\alpha}}+\alpha^2\int\frac{\sec^2x}{(\sec x+\tan x)^{\alpha}}dx$$ Does that last integral look familiar?