Answer
$0$
Work Step by Step
Given
$$\int_{-\pi / 2}^{\pi / 2} \frac{x}{1+\cos ^{2} x} d x$$
Consider $f(x) = \dfrac{x}{1+\cos ^{2} x} $ , since
\begin{aligned}
f(-x)&= \dfrac{-x}{1+\cos ^{2} (-x)}\\
&= \dfrac{x}{1+\cos ^{2} x}\\
&=-f(x)
\end{aligned}
Then $f(x) $ is odd function , apply the rule
$$\int_{-a}^{a}f(x) dx = 0 ,\ \ \ \text{when }\ f(x) \ \text{odd}$$
Hence
$$\int_{-\pi / 2}^{\pi / 2} \frac{x}{1+\cos ^{2} x} d x=0$$