Indefinite integral of $\frac{\sec^2x}{(\sec x+\tan x)^\frac{9}{2}}$ $$\frac{\sec^2x}{(\sec x+\tan x)^\frac{9}{2}}$$
My approach:
Since it is easy to evaluate $\int{\sec^2x}$ , integration by parts seems like a viable option.
Let $$I_n=\int{\frac{\sec^2x}{(\sec x+\tan x)^\frac{9}{2}}}$$
$$I_n=\frac{\tan x}{(\sec x+\tan x)^\frac{9}{2}} + \frac{9}{2}\int{\frac{\sec x \tan x}{(\sec x+\tan x)^\frac{9}{2}}dx}$$
Evaluating the new integral again using by parts yields
$$\frac{\sec x}{(\sec x+\tan x)^\frac{9}{2}}+\frac{9}{2}\int{\frac{\sec^2x}{(\sec x+\tan x)^\frac{9}{2}}\,dx}$$
$$=\frac{\sec x}{(\sec x+\tan x)^\frac{9}{2}} + \frac{9}{2} I_n$$
Plugging it back, we obtain
$$I_n=\frac{\tan x}{(\sec x+\tan x)^\frac{9}{2}} + \frac{9}{2}\frac{\sec x}{(\sec x+\tan x)^\frac{9}{2}} + \frac{81}{4}I_n $$
$$\frac{-77}{4}I_n=\frac{\tan x}{(\sec x+\tan x)^\frac{9}{2}} + \frac{9}{2}\frac{\sec x}{(\sec x+\tan x)^\frac{9}{2}}$$
This obviously doesn't match with bprp's answer. Help!
Edit:
How do I convert my answer to the answer obtained by him, if mine is correct
 A: $-77I_n=4 \times \frac{\tan x}{(\sec x+\tan x)^\frac{9}{2}} + 18 \times \frac{\sec x}{(\sec x+\tan x)^\frac{9}{2}}$
$-77I_n= 11 \times \frac{\tan x}{(\sec x+\tan x)^\frac{9}{2}} - 7 \times \frac{\tan x}{(\sec x+\tan x)^\frac{9}{2}} + 11 \times \frac{\sec x}{(\sec x+\tan x)^\frac{9}{2}} + 7 \times \frac{\sec x}{(\sec x+\tan x)^\frac{9}{2}}$
$-77I_n= 11 \times \frac{\sec x+\tan x}{(\sec x+\tan x)^\frac{9}{2}} + 7 \times \frac{\sec x - \tan x}{(\sec x+\tan x)^\frac{9}{2}}$
First part is straightforward. The second part can be simplified multiplying both numerator and denominator by $(\sec x+\tan x)$. We know, $(\sec x+\tan x) (\sec x-\tan x) = 1$.
You can take it from here.
A: You missed a simplification after second step:
$$I=\frac{\tan x}{(\sec x+\tan x)}\frac{9}{2}+\frac{9}{2}\int \frac{\sec x \tan x}{(\sec x+\tan x)^{\frac92}}dx$$
Now, take the original expression for $I$
$$ I = \int \frac{\sec^2 x}{(\sec x + \tan x)^{\frac92}}$$
Add this $ \frac{9}{2} $ times this  to previous expression
$$ \frac{11}{2} I = \frac{\tan x}{(\sec x+\tan x)}\frac{9}{2}+\frac{9}{2}\int \frac{\sec x \tan x + \sec^2 x}{(\sec x+\tan x)^{\frac92}}dx$$
Consider the second integral:
$$ J = \int \frac{\sec x \tan x + \sec^2 x}{(\sec x+\tan x)^{\frac92}}dx$$
Substitute $ \sec x + \tan x = t$
$$ J = \int t^{-\frac92} dt$$
Done!
