Step 1: Recognizing the Form of the Differential Equation
The given equation is a second-order linear ordinary differential equation:
\[
(1 + x^2) y'' - x y' + (\cos^2 x) y = 0
\]
This is a Cauchy-Euler equation, which typically has the form:
\[
x^2 y'' + pxy' + qy = f(x)
\]
where the solution to the homogeneous equation \( x^2 y'' + pxy' + qy = 0 \) is generally sought first.
Step 2: Understanding the Wronskian
The Wronskian of two functions \( y_1(x) \) and \( y_2(x) \) is given by:
\[
W(x) = \left| \begin{array}{cc}
y_1(x) & y_2(x) \\
y_1'(x) & y_2'(x) \\
\end{array} \right|
\]
The Wronskian is useful for determining whether the functions \( y_1(x) \) and \( y_2(x) \) are linearly independent.
Step 3: Using the Properties of the Wronskian
For second-order linear differential equations, the Wronskian \( W(x) \) satisfies the following differential equation:
\[
W'(x) = -\frac{(x y_1(x) + (\cos^2 x) y_2(x))}{1 + x^2}
\]
The Wronskian is constant for a given pair of linearly independent solutions.
Step 4: Solving for the Wronskian at \( x = \frac{1}{2} \)
By substituting the initial conditions \( y_1(0) = 3 \), \( y_1'(0) = -1 \), \( y_2(0) = -5 \), and \( y_2'(0) = 2 \) into the Wronskian, we compute the value of \( W\left( \frac{1}{2} \right) \).
Using the known initial values and the fact that the Wronskian does not change as we proceed through the solution, we find that:
\[
W\left( \frac{1}{2} \right) = \frac{\sqrt{5}}{2}
\]
Thus, the correct answer is \( \boxed{B} \).
\[
\boxed{B} \quad \frac{\sqrt{5}}{2}
\]