An expression for the definite integral $I_n = \int_0^{\pi/4}{\tan^n{x}\,\mathrm{d}x}$ I have the following definite integral:
$$I_n = \int_0^{\pi/4}{\tan^n{x}\,\mathrm{d}x}\quad ,\forall n \in \mathbb{N}$$


*

*Calculate $I_0$ and $I_1$.

*Calculate $I_n + I_{n+2}$.

*Can we deduce $I_n$?



Here is my solution:
$$I_0 = \int_0^{\pi/4}{dx}=\pi/4$$
$$I_1 = \int_0^{\pi/4}{\tan{x}\,dx}=\int_0^{\pi/4}{\dfrac{\sin{x}}{\cos{x}}\,dx}$$ we put $u = \cos{x} \rightarrow du = -\sin{x}dx $ 
I found that: $I_1 = \ln{\sqrt{2}} $

for the second question:
$$I_n+I_{n+2} =\int_0^{\pi/4}{\tan^n{x}\left( 1+\tan^2{x}\right)\,dx} $$ we put $u = \tan{x} \rightarrow du = (1+\tan^2{x})dx$, that leads to:
$$I_n+I_{n+2} = \dfrac{1}{n+1}$$
My question is: Now, can we deduce the expression of $I_n$? I think it will be a recursive relation, Am I right?
Thank you
 A: By replacing $x$ with $\arctan(t)$ we get:
$$ I_n = \int_{0}^{1}\frac{t^n}{1+t^2}\,dt \tag{1}$$
and by writing $t^n$ as $(t^n-t^{n-2})+(t^{n-2}-t^{n-4})+\ldots +A_n$, where $A_n$ is $t^2$ if $n$ is even and $t$ if $n$ is odd, we have:
$$ I_n = \int_{0}^{1}\left(t^{n-2}+t^{n-4}+\ldots\right)\,dt+\int_{0}^{1}\frac{A_n}{1+t^2}\,dt \tag{2}$$
where the first term gives $\frac{1}{n-1}+\frac{1}{n-3}+\ldots $ and the last one gives $1-\frac{\pi}{4}$ or $\frac{1}{2}\log 2$, depending on the parity of $n$.
A: Yes. 
$$I_{2n} = \frac{1}{2n-1}- \frac{1}{2n-3}+ \cdots + (-1)^{n-1} +(-1)^{n}\pi/4 $$
$$I_{2n+1} = \frac{1}{2n}- \frac{1}{2n-2}+ \cdots + (-1)^{n+1}/2 +(-1)^{n}\ln(\sqrt{2}) $$
A: You are almost there; just observe that $$I_{n+2} = \frac{1}{n+1} - I_n,$$ so that $$I_n = \frac{1}{n-1} - I_{n-2} = \frac{1}{n-1} - \frac{1}{n-3} + I_{n-4} = \ldots,$$ which we can split into even and odd cases:  in the even case, you would obtain $$I_n = \frac{1}{n-1} - \frac{1}{n-3} + \cdots + (-1)^{n/2} I_0,$$ and in the odd case, $$I_n = \frac{1}{n-1} - \frac{1}{n-3} + \cdots + (-1)^{(n-1)/2} I_1.$$
