To find \(\cos\left(\frac{x}{2}\right)\) given that \(\cos x = -\frac{1}{7}\) and that \( \frac{3\pi}{2} < x < 2\pi \), we can use the half-angle identity for cosine:
\[ \cos\left(\frac{x}{2}\right) = \pm \sqrt{\frac{1 + \cos x}{2}}. \]
First, we need to calculate \(1 + \cos x\):
\[ 1 + \cos x = 1 - \frac{1}{7} = \frac{7}{7} - \frac{1}{7} = \frac{6}{7}. \]
Now substitute this into the half-angle formula:
\[ \cos\left(\frac{x}{2}\right) = \pm \sqrt{\frac{\frac{6}{7}}{2}} = \pm \sqrt{\frac{6}{14}} = \pm \sqrt{\frac{3}{7}}. \]
Next, we need to determine the sign (positive or negative) of \(\cos\left(\frac{x}{2}\right)\). Since \(x\) is in the range \(\frac{3\pi}{2} < x < 2\pi\), we need to find \(\frac{x}{2}\):
\[ \frac{3\pi}{4} < \frac{x}{2} < \pi. \]
The angle \(\frac{x}{2}\) lies in the interval \((\frac{3\pi}{4}, \pi)\). In this interval, the cosine function is negative. Therefore, we will take the negative value from the half-angle formula:
\[ \cos\left(\frac{x}{2}\right) = -\sqrt{\frac{3}{7}}. \]
Thus, the exact value of \(\cos\left(\frac{x}{2}\right)\) is:
\[ \boxed{-\sqrt{\frac{3}{7}}}. \]