Calculation of $\int_0^{\frac{\pi}{4}} (\tan(x))^n\,dx$ 
Evaluate : $$\int_0^{\frac{\pi}{4}} (\tan x)^n \,dx$$

So I tried the following:
Firstly I substituted $\tan x$ as $u$ and tried to convert it to an integrable form or a beta function. That didn't end well.
So next I tried :
$$f(t) = \int_0^{\frac{\pi}{4}} (\tan tx)^n \,dx$$
$$\frac{d(f(t))}{dt} = \int_0^{\frac{\pi}{4}} nx(\tan tx)^{n-1} \sec ^2 tx \,dx$$
So here I imparted integration by parts:
$$f'(t) = n \big[ \left(\frac{x(\tan tx)^n}{n}\right)_0^{\frac{\pi}{4}} - \frac{1}{n}\int_0^{\frac{\pi}{4}} (\tan tx)^n \,dx \big]$$
$$f'(t) = \frac{\pi}{4} (\tan \frac{\pi t}{4})^n -f(t)  $$
This is a linear DE :
$$e^t f(t) = \frac{\pi}{4}\int e^t (\tan \frac{\pi t}{4})^n \,dt $$
I can't see how to go ahead from here.....or is there a better way to solve this?
Any help would be appreciated. Thanks.
 A: Evaluate the integral with the recursive relationship below
$$I_n =\int_0^{\frac{\pi}{4}} \tan^n x\,dx
= \int_0^{\frac{\pi}{4}} \tan^{n-2} x (\sec^2 x -1)dx \\
=  \int_0^{\frac{\pi}{4}} \tan^{n-2} x d(\tan x) - \int_0^{\frac{\pi}{4}} \tan^{n-2} xdx \\
 =  \frac1{n-1} \tan^{n-1}x|_0^{\frac{\pi}{4}}- I_{n-2}
= \frac1{n-1} - I_{n-2}\\
$$
with $I_0= \frac\pi4$ and $I_1=\frac12\ln2$.
A: $$\int_{0}^{\pi/4}\left(\tan x\right)^n\,dx \stackrel{x\to\arctan z}{=} \int_{0}^{1}\frac{z^n}{z^2+1}\,dz=\int_{0}^{1}\left(z^n-z^{n+2}+z^{n+4}-\ldots\right)\,dz $$
equals
$$ \frac{1}{n+1}-\frac{1}{n+3}+\frac{1}{n+5}-\ldots $$
i.e. a tail of 
$$ \sum_{m\geq 0}\frac{(-1)^m}{2m+1}=\frac{\pi}{4}\qquad\text{or}\qquad\sum_{m\geq 0}\frac{(-1)^m}{2m+2}=\log\sqrt{2}$$
according to the parity of $n$.
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\left.\int_{0}^{\pi/4}\tan^{n}\pars{x}\,\dd x
\right\vert_{\,\Re\pars{n}\ >\ -1} =
\int_{0}^{1}{x^{n} \over 1 + x^{2}}\,\dd x =
\int_{0}^{1}{x^{n} - x^{n + 2}\over 1 - x^{4}}\,\dd x
\\[3mm] & =
\int_{0}^{1}{x^{n/4} - x^{n/4 + 1/2}\over 1 - x}
\,{1 \over 4}\,x^{-3/4}\,\dd x
\\[3mm] & =
{1 \over 4}\pars{%
\int_{0}^{1}{1 - x^{n/4 - 1/4} \over 1 - x}\,\dd x -
\int_{0}^{1}{1 - x^{n/4 - 3/4} \over 1 - x}\,\dd x}
\\[3mm] & =
\bbx{{1 \over 4}\bracks{%
\Psi\pars{{n \over 4} + {3 \over 4}} -
\Psi\pars{{n \over 4} + {1 \over 4}}}}
\end{align}
$\large \Psi:\ {\bf Digamma\ Function}$.
