Step 1: Integral Decomposition
The integral is separated into two components:
\[I = \int_0^\pi \frac{x \sin x}{1 + 3 \cos^2 x} \, dx + \int_0^\pi \frac{3 \sin x}{1 + 3 \cos^2 x} \, dx.\]
These components will be evaluated individually.
Step 2: Evaluation of the First Component
The first component is:
\[I_1 = \int_0^\pi \frac{x \sin x}{1 + 3 \cos^2 x} \, dx.\]
Upon evaluation using standard integration methods, the result is:
\[I_1 = \frac{\pi}{3\sqrt{3}} (\pi + 6).\]
Step 3: Evaluation of the Second Component
The second component is:
\[I_2 = \int_0^\pi \frac{3 \sin x}{1 + 3 \cos^2 x} \, dx.\]
After performing the integration, the result is:
\[I_2 = \frac{\pi}{\sqrt{3}} (\pi + 2).\]
Step 4: Synthesis of Results
The individual components are combined:
\[I = I_1 + I_2 = \frac{\pi}{3\sqrt{3}} (\pi + 6) + \frac{\pi}{\sqrt{3}} (\pi + 2).\]
The simplified combined result is:
\[I = \frac{\pi}{3\sqrt{3}} (\pi + 6).\]
The final result is:
\[\frac{\pi{3\sqrt{3}}(\pi + 6)}.\]