To solve the problem, we need to evaluate the integrals \( I_1 \) and \( I_2 \) and find the ratio \( \frac{I_1}{I_2} \).
### Step 1: Evaluate \( I_1 \)
The integral \( I_1 \) is defined as:
\[
I_1 = \int_0^{\pi} \frac{x \sin x}{1 + \cos^2 x} \, dx
\]
To simplify this, we can use the property of definite integrals:
\[
\int_0^{a} f(x) \, dx = \int_0^{a} f(a - x) \, dx
\]
Here, we let \( a = \pi \):
\[
I_1 = \int_0^{\pi} \frac{(\pi - x) \sin(\pi - x)}{1 + \cos^2(\pi - x)} \, dx
\]
Using the identities \( \sin(\pi - x) = \sin x \) and \( \cos(\pi - x) = -\cos x \), we have:
\[
\cos^2(\pi - x) = \cos^2 x
\]
Thus,
\[
I_1 = \int_0^{\pi} \frac{(\pi - x) \sin x}{1 + \cos^2 x} \, dx
\]
Now, we can add the two expressions for \( I_1 \):
\[
2I_1 = \int_0^{\pi} \left( \frac{x \sin x}{1 + \cos^2 x} + \frac{(\pi - x) \sin x}{1 + \cos^2 x} \right) \, dx
\]
This simplifies to:
\[
2I_1 = \int_0^{\pi} \frac{\pi \sin x}{1 + \cos^2 x} \, dx
\]
Thus,
\[
I_1 = \frac{\pi}{2} \int_0^{\pi} \frac{\sin x}{1 + \cos^2 x} \, dx
\]
### Step 2: Evaluate the integral \( \int_0^{\pi} \frac{\sin x}{1 + \cos^2 x} \, dx \)
To evaluate this integral, we can use the substitution \( t = \cos x \), which gives \( dt = -\sin x \, dx \). The limits change from \( x = 0 \) to \( x = \pi \) which corresponds to \( t = 1 \) to \( t = -1 \):
\[
\int_0^{\pi} \frac{\sin x}{1 + \cos^2 x} \, dx = \int_1^{-1} \frac{-1}{1 + t^2} \, dt = \int_{-1}^{1} \frac{1}{1 + t^2} \, dt
\]
This integral evaluates to:
\[
\int_{-1}^{1} \frac{1}{1 + t^2} \, dt = 2 \tan^{-1}(1) = 2 \cdot \frac{\pi}{4} = \frac{\pi}{2}
\]
Thus,
\[
I_1 = \frac{\pi}{2} \cdot \frac{\pi}{2} = \frac{\pi^2}{4}
\]
### Step 3: Evaluate \( I_2 \)
The integral \( I_2 \) is defined as:
\[
I_2 = \int_0^{\pi} x \sin^4 x \, dx
\]
Using the identity \( \sin^4 x = \left( \sin^2 x \right)^2 = \left( \frac{1 - \cos 2x}{2} \right)^2 \):
\[
\sin^4 x = \frac{1 - 2\cos 2x + \cos^2 2x}{4}
\]
Now, we can express \( I_2 \):
\[
I_2 = \frac{1}{4} \int_0^{\pi} x (1 - 2\cos 2x + \frac{1 + \cos 4x}{2}) \, dx
\]
This can be split into three integrals:
\[
I_2 = \frac{1}{4} \left( \int_0^{\pi} x \, dx - 2 \int_0^{\pi} x \cos 2x \, dx + \frac{1}{2} \int_0^{\pi} x \cos 4x \, dx \right)
\]
The first integral evaluates to:
\[
\int_0^{\pi} x \, dx = \frac{\pi^2}{2}
\]
The second integral can be evaluated using integration by parts:
Let \( u = x \) and \( dv = \cos 2x \, dx \), then \( du = dx \) and \( v = \frac{1}{2} \sin 2x \):
\[
\int_0^{\pi} x \cos 2x \, dx = \left[ \frac{x}{2} \sin 2x \right]_0^{\pi} - \int_0^{\pi} \frac{1}{2} \sin 2x \, dx = 0 - \left[ -\frac{1}{4} \cos 2x \right]_0^{\pi} = \frac{1}{4} (1 - 1) = 0
\]
The third integral can also be evaluated similarly:
\[
\int_0^{\pi} x \cos 4x \, dx = 0
\]
Thus,
\[
I_2 = \frac{1}{4} \left( \frac{\pi^2}{2} - 0 + 0 \right) = \frac{\pi^2}{8}
\]
### Step 4: Find the ratio \( \frac{I_1}{I_2} \)
Now we can find the ratio:
\[
\frac{I_1}{I_2} = \frac{\frac{\pi^2}{4}}{\frac{\pi^2}{8}} = \frac{8}{4} = 2
\]
### Final Answer
Thus, the ratio \( I_1 : I_2 \) is:
\[
\boxed{2}
\]