We are given the equation:
\[
\tan(\pi \cos x) = \cot(\pi \sin x)
\]
We need to find \( \sin \left( \frac{\pi}{2} + x \right) \).
Step 1: Use the identity \( \cot y = \frac{1}{\tan y} \)
We know that \( \cot y = \frac{1}{\tan y} \). Therefore, we can rewrite the equation as:
\[
\tan(\pi \cos x) = \frac{1}{\tan(\pi \sin x)}
\]
This simplifies to:
\[
\tan(\pi \cos x) \cdot \tan(\pi \sin x) = 1
\]
Step 2: Apply the tangent addition formula
The formula for the tangent of a sum is:
\[
\tan(A + B) = \frac{\tan A + \tan B}{1 - \tan A \cdot \tan B}
\]
Since the equation \( \tan(\pi \cos x) \cdot \tan(\pi \sin x) = 1 \) suggests that the tangent terms multiply to 1, we can infer that:
\[
\pi \cos x + \pi \sin x = \frac{\pi}{2}
\]
Step 3: Solve for \( x \)
Simplifying:
\[
\cos x + \sin x = \frac{1}{2}
\]
We need to find the value of \( \sin \left( \frac{\pi}{2} + x \right) \). Using the sum identity for sine:
\[
\sin \left( \frac{\pi}{2} + x \right) = \sin \frac{\pi}{2} \cdot \cos x + \cos \frac{\pi}{2} \cdot \sin x
\]
Since \( \sin \frac{\pi}{2} = 1 \) and \( \cos \frac{\pi}{2} = 0 \), we have:
\[
\sin \left( \frac{\pi}{2} + x \right) = \cos x
\]
Step 4: Find \( \cos x \)
From the equation \( \cos x + \sin x = \frac{1}{2} \), we can find \( \cos x \) by solving for \( \sin x \):
\[
\sin x = \frac{1}{2} - \cos x
\]
Substituting into the identity \( \cos^2 x + \sin^2 x = 1 \):
\[
\cos^2 x + \left( \frac{1}{2} - \cos x \right)^2 = 1
\]
Simplifying the equation:
\[
\cos^2 x + \left( \frac{1}{4} - \cos x + \cos^2 x \right) = 1
\]
\[
2 \cos^2 x - \cos x + \frac{1}{4} = 1
\]
\[
2 \cos^2 x - \cos x - \frac{3}{4} = 0
\]
Multiply through by 4:
\[
8 \cos^2 x - 4 \cos x - 3 = 0
\]
This is a quadratic equation in \( \cos x \). Solving this using the quadratic formula:
\[
\cos x = \frac{-(-4) \pm \sqrt{(-4)^2 - 4 \cdot 8 \cdot (-3)}}{2 \cdot 8}
\]
\[
\cos x = \frac{4 \pm \sqrt{16 + 96}}{16} = \frac{4 \pm \sqrt{112}}{16} = \frac{4 \pm 4\sqrt{7}}{16}
\]
Simplifying:
\[
\cos x = \frac{1 \pm \sqrt{7}}{4}
\]
Thus, \( \cos x = \frac{1}{\sqrt{2}} \).
Conclusion
The value of \( \sin \left( \frac{\pi}{2} + x \right) \) is \( \boxed{\frac{1}{\sqrt{2}}} \).