For a non negative integer $n$, set t $I_n=\int_0^{\frac{\pi}{4}} \tan ^ n x\ dx$ to answer the following questions:

(1) Calculate $I_{n+2}+I_n.$

(2) Evaluate the values of $I_1,\ I_2$ and $I_3.$

1978 Niigata university entrance exam
1. **Expressing \( I_n \) in terms of \( I_{n+2} \) and \( I_n \):**

   We start with the integral \( I_n = \int_0^{\frac{\pi}{4}} \tan^n x \, dx \). To find a relationship between \( I_{n+2} \) and \( I_n \), we use the identity \( \tan^2 x = \sec^2 x - 1 \):

   \[
   I_n = \int_0^{\frac{\pi}{4}} \tan^n x \, dx = \int_0^{\frac{\pi}{4}} \tan^{n-2} x \cdot \tan^2 x \, dx
   \]

   Substituting \( \tan^2 x = \sec^2 x - 1 \):

   \[
   I_n = \int_0^{\frac{\pi}{4}} \tan^{n-2} x (\sec^2 x - 1) \, dx
   \]

   This can be split into two integrals:

   \[
   I_n = \int_0^{\frac{\pi}{4}} \tan^{n-2} x \sec^2 x \, dx - \int_0^{\frac{\pi}{4}} \tan^{n-2} x \, dx
   \]

   The first integral can be simplified using the substitution \( u = \tan x \), \( du = \sec^2 x \, dx \):

   \[
   \int_0^{\frac{\pi}{4}} \tan^{n-2} x \sec^2 x \, dx = \int_0^1 u^{n-2} \, du = \left[ \frac{u^{n-1}}{n-1} \right]_0^1 = \frac{1}{n-1}
   \]

   Therefore, we have:

   \[
   I_n = \frac{1}{n-1} - I_{n-2}
   \]

2. **Finding \( I_{n+2} + I_n \):**

   Using the relationship derived above, we set \( n = n+2 \):

   \[
   I_{n+2} = \frac{1}{(n+2)-1} - I_n = \frac{1}{n+1} - I_n
   \]

   Adding \( I_n \) to both sides:

   \[
   I_{n+2} + I_n = \frac{1}{n+1}
   \]

3. **Evaluating \( I_1, I_2, \) and \( I_3 \):**

   - For \( I_1 \):

     \[
     I_1 = \int_0^{\frac{\pi}{4}} \tan x \, dx
     \]

     Using the substitution \( u = \tan x \), \( du = \sec^2 x \, dx \):

     \[
     I_1 = \int_0^1 u \, du = \left[ \frac{u^2}{2} \right]_0^1 = \frac{1}{2}
     \]

   - For \( I_2 \):

     \[
     I_2 = \int_0^{\frac{\pi}{4}} \tan^2 x \, dx = \int_0^{\frac{\pi}{4}} (\sec^2 x - 1) \, dx
     \]

     \[
     I_2 = \left[ \tan x \right]_0^{\frac{\pi}{4}} - \int_0^{\frac{\pi}{4}} 1 \, dx = 1 - \frac{\pi}{4}
     \]

   - For \( I_3 \):

     Using the relationship \( I_{n+2} + I_n = \frac{1}{n+1} \):

     \[
     I_3 + I_1 = \frac{1}{2}
     \]

     Since \( I_1 = \frac{1}{2} \):

     \[
     I_3 + \frac{1}{2} = \frac{1}{2} \implies I_3 = 0
     \]

The final answer is \( \boxed{ I_{n+2} + I_n = \frac{1}{n+1} } \), \( I_1 = \frac{1}{2} \), \( I_2 = 1 - \frac{\pi}{4} \), \( I_3 = 0 \)