Evaluating $\int \frac{\sec^2 x}{(\sec x + \tan x )^{{9}/{2}}}\,\mathrm dx$ How do I evaluate
$$\int \frac{\sec^2 x}{(\sec x + \tan x )^{{9}/{2}}}\,\mathrm dx$$
I've started doing this problem by taking $u=\tan x$.
 A: Hint: Take $\sec x + \tan x = t$  
$\implies\sec x \: \text{d}x=\frac {\text{d}t}{t}$  
&
$\sec x = \dfrac{t^2+1}{2t}$  
A: Let $\sec x+\tan x=t\implies \sec x-\tan x=\frac 1t$, $\sec x=\frac{t^2+1}{2t}$
$\implies (\sec x\tan x+\sec^2 x)\ dx=dt$ or $dx=\frac{2dt}{t^2+1}$,   $$\int \frac{\sec^2 x}{(\sec x+\tan x)^2}\ dx$$$$=\int \frac{\left(\frac{t^2+1}{2t}\right)^2}{t^{9/2}}\frac{2dt}{t^2+1}$$
$$=\frac{1}{2}\int\frac{t^2+1}{t^{13/2}}\ dt $$ $$=\frac 12\int (t^{-9/2}+t^{-13/2})\ dt$$ $$=\frac 12\left(-\frac 27t^{-7/2}-\frac {2}{11}x^{-11/2}\right)+C$$ 
$$=-\frac{1}{7}(\sec x+\tan x)^{-7/2}-\frac{1}{11}(\sec x+\tan x)^{-11/2}+C$$
A: You turn out correct that this integral can be tackled by using substitution $t=\tan x$. To make this more fun, let us rewrite the integral in general form as follows
\begin{equation}
I_n=\int\frac{\sec^2x}{\left(\sqrt{1+\tan^2x}+\tan x\right)^n}\,dx\qquad,\qquad n>1
\end{equation}
Our original problem is for $n=\frac{9}{2}$. Now, let $t=\tan x$, we then have
\begin{equation}
I_n=\int\frac{dt}{\left(\sqrt{1+t^2}+t\right)^n}
\end{equation}
Make a substitution using hyperbolic functions either $t=\sinh y$ or $t=\cosh y$, we have
\begin{align}
I_n=\int\frac{\cosh y}{\left(\sqrt{1+\sinh^2y}+\sinh y\right)^n}\,dy&=\int\frac{\cosh y}{\left(\cosh y+\sinh y\right)^n}\,dy\\
&=\frac{1}{2}\int\frac{e^{y}+e^{-y}}{e^{ny}}\,dy\\
&=\frac{1}{2}\int\left[e^{-(n-1)y}+e^{-(n+1)y}\right]\,dy\\
&=-\frac{e^{-(n-1)y}}{2(n-1)}-\frac{e^{-(n+1)y}}{2(n+1)}+C
\end{align}
The rest part is trivially done by using identities $\cosh y\pm\sinh y=e^{\pm y}$ and $\cosh^2 y-\sinh^2 y=1$, hence
\begin{equation}
I_n=-\frac{(\sec x-\tan x)^{n-1}}{2(n-1)}-\frac{(\sec x-\tan x)^{n+1}}{2(n+1)}+C
\end{equation}
Interestingly, we have a nice closed-form for the following definite integral
\begin{equation}
I_n=\int_0^{\pi/2}\frac{\sec^2x}{\left(\sec x+\tan x\right)^n}\,dx=\frac{n}{n^2-1}
\end{equation}
A: $\bf{Another\; Solution::}$Let
$$\displaystyle I = \int\frac{\sec^2 x}{(\sec x+\tan x)^{\frac{9}{2}}}dx = \int\frac{\cos ^{\frac{5}{2}}x}{(1+\sin x)^{\frac{9}{2}}}dx = \int\frac{\cos^{\frac{3}{2}}x\cdot \cos x}{(1+\sin x)^{\frac{9}{2}}}dx$$
Now Let $\sin x = t\;,$ Then $\cos xdx = dt\;,$ So $$\displaystyle I = \int\frac{(1-t^2)^{\frac{3}{4}}}{(1+t)^{\frac{9}{2}}}dt = \int\frac{(1-t)^{\frac{3}{4}}}{(1+t)^{\frac{15}{4}}}dt$$
Now Let $\displaystyle (1+t) = s\;,$ Then $dt = ds$ and $$\displaystyle I = \int (2-s)^{\frac{3}{4}}\cdot s^{-\frac{15}{4}}ds = \int \left(\frac{2-s}{s}\right)^{\frac{3}{4}}\cdot s^{-3}ds$$
Now Let $\displaystyle \left(\frac{2}{s}-1\right) = y\;,$ Then $$\displaystyle -\frac{2}{s^2}ds = dy\Rightarrow  ds = -\frac{1}{2}y^2dy$$
So $$\displaystyle I = -\frac{1}{4}\int y^{\frac{3}{4}}\cdot (y+1)dy = -\frac{1}{4}\int y^{\frac{7}{4}}dy-\frac{1}{4}\int y^{\frac{3}{4}}dy$$
So $$\displaystyle I = -\frac{1}{11} y^{\frac{11}{4}}-\frac{1}{7} y^{\frac{7}{4}}+\mathcal{C} = -\left[\frac{1}{11}\cdot \left(\frac{2-s}{s}\right)^{\frac{11}{4}}+\frac{1}{7}\cdot \left(\frac{2-s}{s}\right)^{\frac{7}{4}}\right]+\mathcal{C}$$
So $$\displaystyle \int\frac{\sec^2 x}{(\sec x+\tan x)^{\frac{9}{2}}}dx = -\left[\frac{1}{11}\cdot \left(\frac{1-\sin x}{1+\sin x}\right)^{\frac{11}{4}}+\frac{1}{7}\cdot \left(\frac{1-\sin x}{1+\sin x}\right)^{\frac{7}{4}}\right]+\mathcal{C}$$
A: $\bf{My\; solution::}$ Given $$\displaystyle \int\frac{\sec^2 x}{(\sec x+\tan x)^{\frac{9}{2}}}dx$$
Let $$(\sec x+\tan x)= t\;,$$ Then $$\left(\sec x\cdot \tan x+\sec^2 x\right)dx = dt $$
So $$\displaystyle \left(\sec x+\tan x\right)dx = \frac{dt}{\sec x}\Rightarrow  \displaystyle dx = \frac{dt}{\sec x}$$
Now Using $$\bullet \displaystyle (\sec^2 x-\tan^2 x) = 1\Rightarrow (\sec x+\tan x)\cdot (\sec x-\tan x) = 1$$
So $$\displaystyle (\sec x-\tan x) = \frac{1}{t}$$ and we above substitute $$\displaystyle (\sec x+\tan x)=t$$
So we get $$\displaystyle \sec x = \frac{1}{2}\left(t+\frac{1}{t}\right)$$
Now our Integral convert into $$\displaystyle \frac{1}{2}\int\frac{\sec x}{t^{\frac{9}{2}}}dt = \frac{1}{2}\int \frac{t+\frac{1}{t}}{t^{\frac{9}{2}}}dt = \frac{1}{2}\int t^{-\frac{7}{2}}dt+\frac{1}{2}\int t^{-\frac{11}{2}}dt$$
So  we get $$\displaystyle \frac{1}{2}\cdot -\frac{2}{5}\cdot t^{-\frac{5}{2}}+\frac{1}{2}\cdot -\frac{2}{9}\cdot t^{-\frac{9}{2}}+\mathcal{C}$$
So $$\displaystyle \int\frac{\sec^2 x}{(\sec x+\tan x)^{\frac{9}{2}}}dx = -\frac{1}{5}\cdot (\sec x+\tan x)^{-\frac{5}{2}}-\frac{1}{9}\cdot (\sec x+\tan x)^{-\frac{9}{2}}+\mathcal{C}$$
A: Given $$\displaystyle \int\frac{\sec^2 x}{(\sec x+\tan x)^{\frac{9}{2}}}dx = \frac{1}{2}\int\frac{\sec x(\sec x+\tan x)+\sec x(\sec x-\tan x)}{(\sec x+\tan x)^{\frac{9}{2}}}dx$$
$$\displaystyle = \frac{1}{2}\int\frac{\sec x\cdot (\sec x+\tan x)}{(\sec x+\tan x)^{\frac{9}{2}}}dx+\frac{1}{2}\int\frac{\sec x\cdot (\sec x-\tan x)}{(\sec x+\tan x)^{\frac{9}{2}}}dx$$
Now Use $\sec^2x-\tan^2 x= 1$ For Second Integral, We Get
$$\displaystyle = \frac{1}{2}\int\frac{\sec x\cdot (\sec x+\tan x)}{(\sec x+\tan x)^{\frac{9}{2}}}dx+\frac{1}{2}\int\frac{\sec x\cdot (\sec x+\tan x)}{(\sec x+\tan x)^{\frac{13}{2}}}dx$$
Now For both  Integral , Let $\sec x+\tan x=t\;,$ Then $\sec x(\sec x+\tan x)dx = dt$
We Get $$\displaystyle = \frac{1}{2}\int\frac{1}{t^{\frac{9}{2}}}dt+\frac{1}{2}\int\frac{1}{t^{\frac{13}{2}}}dt = -\frac{1}{2}\cdot \frac{2}{7}t^{-\frac{7}{2}}-\frac{1}{2}\cdot \frac{2}{11}t^{-\frac{11}{2}}+\mathcal{C}$$
So We Get $$\displaystyle \int\frac{\sec^2 x}{(\sec x+\tan x)^{\frac{9}{2}}}dx = -\frac{1}{7}(\sec x+\tan x)^{-\frac{9}{2}}-\frac{1}{11}(\sec x+\tan x)^{-\frac{11}{2}}+\mathcal{C}$$
A: Let $\dfrac\pi2-x=2y$
$$I_n=\int\dfrac{\sec^2x\ dx}{(\sec x+\tan x)^n}=-2\int\dfrac{\csc^22y}{(\csc2y+\cot2y)^n}dy$$
$$-2I_n=\int\dfrac{\sin^ny}{\sin^2y\cos^2y\cos^ny}=\int\dfrac{\tan^ny}{\sin^2y}\sec^2y\ dy$$
Set $\tan y=u,$ $$-2I_n=\int\dfrac{u^n(1+u^2)}{u^2}\ du=\int u^n\ du+\int u^{n-2}du$$
$$u=\tan y=\tan\left(\dfrac\pi4-\dfrac x2\right)=\dfrac{\sin2\left(\dfrac\pi4-\dfrac x2\right)}{1+\cos2\left(\dfrac\pi4-\dfrac x2\right)}=\dfrac{\cos x}{1+\sin x}=(\sec x+\tan x)^{-1}$$
A: There are already 7 nice solutions.  I want to generalize the result further, by rationalization and substitutions, of the given integral to $$
I(m ,n):=\int \frac{\sec ^m x}{(\sec x+\tan x)^{n}} d x= \int \frac{\sec ^{m} x(\sec x-\tan x)^{n}}{\left(\sec ^{2} x-\tan ^{2} x\right)^{n}} d x=\int \frac{(1-\sin x)^{n}}{\cos ^{m+n} x} d x
$$
Letting $y=\frac{\pi}{2}-x$ transforms the integral into
$$
I(m, n)=-\int \frac{\left(2\sin ^{2} \frac{y}{2}\right)^{n}}{2 ^{m+n}  \sin ^{m+n} \frac{y}{2} \cos ^{m+n} \frac{y}{2}} d x$$
Letting $z=2y$ transforms the integral into
$$I(m,n) =-\frac{1}{2^{m-1}} \int \tan ^{n-m}z \sec ^{2m}z d z$$
Letting $t=\tan z$ transforms the integral into
$$
\begin{aligned}
I(m, n)&=-\frac{1}{2^{m-1}} \int^{n} t^{n-m}\left(1+t^{2}\right)^{m-1} d t \\
&=-\frac{1}{2^{m-1}} \sum_{\substack{k=0}}^{m-1} \int t^{n-m+2 k} d t\\ &=-\frac{1}{2^{m-1}} \sum_{k=0}^{m-1} \frac{t^{n-m+2 k+1}}{n-m+2 k+1}+C \\ &=-\frac{1}{2^{m-1}} \sum_{k=0}^{m-1} \frac{(\sec x-\tan x)^{n-m+2 k+1}}{n-m+2 k+1}+C
\end{aligned}
$$
$$\boxed{I(m, n)=-\frac{1}{2^{m-1}} \sum_{k=0}^{m-1} \frac{(\sec x-\tan x)^{n-m+2 k+1}}{n-m+2 k+1}+C}$$
as $t=\tan \left(\frac{\pi}{4}-\frac{x}{2}\right)=\frac{1-\tan \frac{x}{2}}{1+\tan \frac{x}{2}}=\frac{\cos \frac{x}{2}-\sin \frac{x}{2}}{\cos \frac{x}{2}+\sin \frac{x}{2}}=\frac{\left(\cos \frac{x}{2}-\sin \frac{x}{2}\right)^{2}}{\cos ^{2} \frac{x}{2}-\sin ^{2} \frac{x}{2}}=\sec x-\tan x.$
Back to our original integral, putting $m=2$ and $n=\frac 92$ yields $$\begin{aligned} 
\int \frac{\sec^2 x}{(\sec x + \tan x )^{{9}/{2}}}\,\mathrm dx&=-\frac{1}{7} (\sec x-\tan x) ^{\frac{7}{2}}-\frac{1}{11} (\sec x-\tan x) ^{\frac{11}{2}}+C
\end{aligned}
$$
A: Rationalization gives
$$I(m ,n):=\int \frac{\sec ^m x}{(\sec x+\tan x)^{n}} d x= \int \sec ^{m} x(\sec x-\tan x)^{n}d x$$
Letting $t=\sec \theta-\tan \theta$, then $\frac{1}{t}=\sec \theta+\tan \theta$ and $\sec \theta d \theta=-\frac{d t}{t}$ gives
$$\begin{aligned}
I(m,n)&= \int\left[\frac{1}{2}\left(t+\frac{1}{t}\right)\right]^{m-1} t^{n}\left(-\frac{d t}{t}\right) \\&=-\frac{1}{2^{m-1}} \int t^{n-m}\left(1+t^{2}\right)^{m-1} d t \\& =-\frac{1}{2^{m-1}} \sum_{k=0}^{m-1} \frac{(\sec x-\tan x)^{n-m+2 k+1}}{n-m+2 k+1}+C\end{aligned}
$$
Back to our original integral, putting $m=2$ and $n=\frac 92$ yields $$\begin{aligned} 
\int \frac{\sec^2 x}{(\sec x + \tan x )^{{9}/{2}}}\,\mathrm dx&=-\frac{1}{7} (\sec x-\tan x) ^{\frac{7}{2}}-\frac{1}{11} (\sec x-\tan x) ^{\frac{11}{2}}+C
\end{aligned}
$$
