If $\int_{0}^{\frac{\pi}{4}}\tan^6(x) \sec(x) dx = I$ then express $\int_{0}^{\frac{\pi}{4}} \tan^8(x) \sec(x) dx$ in terms of $I$ how can I proceed with this exercise?
If 
$$\int_{0}^{\frac{\pi}{4}} \tan^6(x) \sec(x) dx = I$$ 
then express 
$$\int_{0}^{\frac{\pi}{4}} \tan^8(x) \sec(x) dx$$ 
in terms of $I$.
What I've got so far:
$$\int_{0}^{\frac{\pi}{4}} \tan^8(x) \sec(x) dx = \int_{0}^{\frac{\pi}{4}} \tan^2(x) \tan^6(x) \sec(x) dx = \int_{0}^{\frac{\pi}{4}} \left( \sec^2(x) - 1 \right) \tan^6(x) \sec(x) dx = \\ = - \int_{0}^{\frac{\pi}{4}} \tan^6(x) \sec(x) dx + \int_{0}^{\frac{\pi}{4}} \tan^6(x) \sec^3(x) dx = -I + \cdots$$ 
Any help is highly appreciated.
$\\$
(Exercise 50 from Stewart's Calculus book section chapter 7.2 7th edition)
 A: Short answer: intergration by parts.
Long answer: denote the integral you want to find as $J$. Then you have
$J = \int_0^{\frac{\pi}{4}}\tan^8(x)\sec(x)dx = \int_0^{\frac{\pi}{4}}\tan^7(x)d(\sec(x)) = \left.\tan^7(x)\sec(x)\right|_0^{\frac{\pi}{4}} - \int_0^{\frac{\pi}{4}}\sec(x)d(\tan^7(x)) = \sqrt{2} - 7\int_0^{\frac{\pi}{4}}\tan^6(x)\sec^3(x)dx = \sqrt{2}-7\int_0^{\frac{\pi}{4}}\tan^6(x)\sec(x)(1+\tan^2(x))dx = \sqrt{2} - 7I - 7J = J$
$\sqrt{2} - 7I - 7J = J$
Hope all the steps are clear.
A: Let's be a little nit more general and look at the Integrals
$$
I_{m}=\int \tan^m(x)\sec(x)dx\\
I_{m-2}=\int \tan^{m-2}(x)\sec(x)dx
$$
now substitute $x=\arctan(y)$ . We get
$$
I_m=\int\frac{y^m}{\sqrt{1+y^2}}dy=\int y^{m-1}\frac{y}{\sqrt{1+y^2}}dy
$$
Integrating by parts:
$$
I_m=y^{m-1}\sqrt{1+y^2}-(m-1)\int y^{m-2}\sqrt{1+y^2}dy=\\
y^{m-1}\sqrt{1+y^2}-(m-1)\int y^{m-2}\frac{1+y^2}{\sqrt{1+y^2}}dy=\\
y^{m-1}\sqrt{1+y^2}-(m-1)(I_m+I_{m-2})
$$
Therefore

$$
I_m=\frac{1}{m}y^{m-1}\sqrt{1+y^2}-\frac{m-1}{m}I_{m-2}
$$

putting $m=8$, and plugging in the appropriate endpoints of integration $y=0$ and $y=1$ u can find your question as a special case of the above.
