We need to find the value of \(\int_{-\frac{1}{2}}^{\frac{1}{2}} \cos^{-1} x \, dx\).
Let's integrate by parts. Let \(u = \cos^{-1} x\) and \(dv = dx\). Then \(du = -\frac{1}{\sqrt{1-x^2}} dx\) and \(v = x\).
\(\int \cos^{-1} x \, dx = x \cos^{-1} x - \int x \cdot (-\frac{1}{\sqrt{1-x^2}}) dx\)
\(\int \cos^{-1} x \, dx = x \cos^{-1} x + \int \frac{x}{\sqrt{1-x^2}} dx\)
For the second integral, let \(w = 1-x^2\), then \(dw = -2x \, dx\), so \(x \, dx = -\frac{1}{2} dw\).
\(\int \frac{x}{\sqrt{1-x^2}} dx = \int \frac{-\frac{1}{2}}{\sqrt{w}} dw = -\frac{1}{2} \int w^{-1/2} dw = -\frac{1}{2} \cdot \frac{w^{1/2}}{1/2} = -w^{1/2} = -\sqrt{1-x^2}\)
So, \(\int \cos^{-1} x \, dx = x \cos^{-1} x - \sqrt{1-x^2}\).
Now we need to evaluate the definite integral:
\(\int_{-\frac{1}{2}}^{\frac{1}{2}} \cos^{-1} x \, dx = [x \cos^{-1} x - \sqrt{1-x^2}]_{-\frac{1}{2}}^{\frac{1}{2}}\)
= \(((\frac{1}{2}) \cos^{-1} (\frac{1}{2}) - \sqrt{1-(\frac{1}{2})^2}) - ((-\frac{1}{2}) \cos^{-1} (-\frac{1}{2}) - \sqrt{1-(-\frac{1}{2})^2}))\)
= \((\frac{1}{2} \cdot \frac{\pi}{3} - \sqrt{\frac{3}{4}}) - (-\frac{1}{2} \cdot \frac{2\pi}{3} - \sqrt{\frac{3}{4}})\)
= \((\frac{\pi}{6} - \frac{\sqrt{3}}{2}) - (-\frac{\pi}{3} - \frac{\sqrt{3}}{2})\)
= \(\frac{\pi}{6} - \frac{\sqrt{3}}{2} + \frac{\pi}{3} + \frac{\sqrt{3}}{2}\)
= \(\frac{\pi}{6} + \frac{\pi}{3} = \frac{\pi}{6} + \frac{2\pi}{6} = \frac{3\pi}{6} = \frac{\pi}{2}\)
Therefore, the correct option is (B) \(\frac{\pi}{2}\).