If $I_n=\int_0^{\pi/4}\tan^n x dx$, then evaluate $\lim_{n\to\infty}\sum_{k=0}^nI_kI_{k+1}+I_kI_{k+3}+I_{k+1}I_{k+2}I_{k+3}$ 
Let 
  $$I_{n}=\int^{\pi/4}_{0}\tan^{n}x\;dx\quad(n=0,1,2,3,4,\ldots)$$
  and 
  $$S_{n}=\sum^{n}_{k=0}I_{k}I_{k+1}+I_{k}I_{k+3}+I_{k+1}I_{k+2}I_{k+3}$$ 
  Then find $\displaystyle \lim_{n\rightarrow \infty}S_{n}$.

My Try: $$I_{k}+I_{k+2}=\int^{\pi/4}_{0}\tan^{k}x\cdot \sec^2 x\;dx=\frac{1}{k+1}$$
So $$I_{k}\left(I_{k+1}+I_{k+3}\right)=\frac{I_{k}}{k+2}$$ 
Could some help me to solve it, Thanks
 A: \begin{aligned} I_{n} &=\int \tan ^{n} x d x \\ &=\int \tan ^{n-2} x \tan ^{2} x d x \\ &=\int \tan ^{n-2} x\left(\sec ^{2} x-1\right) d x \\ &=\int \tan ^{n-2} x \sec ^{2} x d x-I_{n-2} \end{aligned}
Use Integration by parts: 
\begin{aligned} I_{n} &=\tan ^{n-1} x-\int(n-2) \tan ^{n-2} x \sec ^{2} x d x \\ &=\tan ^{n-1} x-(n-2)\left(I_{n}+I_{n-2}\right)-I_{n-2} \end{aligned}
Which gives
$$
I_{n}=\frac{1}{n-1} \tan ^{n-1} x-I_{n-2}
$$
Iteratively, 
$$
I_{2 k+1}=(-1)^{k} I_{1}+\sum_{p=1}^{k} \frac{(-1)^{p+k}}{2 p} \tan ^{2 p} x
$$
and 
$$
I_{2 k}=(-1)^{k} I_{0}+\sum_{p=1}^{k} \frac{(-1)^{p+k}}{2 p-1} \tan ^{2 p-1} x
$$
We need the boundary values of $I_0$ and $I_1$
$$
\begin{aligned} I_{0} &=\int \tan ^{0} x d x \\ &=x \end{aligned}
$$ 
and $$
\begin{aligned} I_{1} &=\int \tan ^{1} x d x \\ &=\int \tan x d x \\ &=-\ln \cos x \\ &=\ln \sec x \end{aligned}
$$
Therefore, the final expression for any $I_n$ would be 
$$
I_{2 k+1}=(-1)^{k} \ln \sec x+\sum_{p=1}^{k} \frac{(-1)^{p+k}}{2 p} \tan ^{2 p} x
$$
and 
$$
I_{2 k}=(-1)^{k} x+\sum_{p=1}^{k} \frac{(-1)^{p+k}}{2 p-1} \tan ^{2 p-1} x
$$
Now, $\tan^n(\frac{pi}{4}) = 1$, we end up with partial fractions. 
$$
I_{2 k+1}=(-1)^{k} \ln \sqrt{2}+\sum_{p=1}^{k} \frac{(-1)^{p+k}}{2 p} 
$$
and 
$$
I_{2 k}=(-1)^{k} \frac{\pi}{4}+\sum_{p=1}^{k} \frac{(-1)^{p+k}}{2 p-1} 
$$
I am unable to simplify this further. Please feel free to edit it. 
