To find \(\cos \theta\) when \(\sin \theta = \frac{3}{4}\) and \(\frac{\pi}{2} < \theta < \pi\), we can use the Pythagorean identity:
\[ \sin^2 \theta + \cos^2 \theta = 1 \]
Since \(\sin \theta = \frac{3}{4}\):
\[ \sin^2 \theta = \left(\frac{3}{4}\right)^2 = \frac{9}{16} \]
Now, substitute \(\sin^2 \theta\) into the identity:
\[ \frac{9}{16} + \cos^2 \theta = 1 \]
To find \(\cos^2 \theta\), we can rearrange the equation:
\[ \cos^2 \theta = 1 - \frac{9}{16} = \frac{16}{16} - \frac{9}{16} = \frac{7}{16} \]
Now, take the square root of both sides to find \(\cos \theta\):
\[ \cos \theta = \pm \sqrt{\frac{7}{16}} = \pm \frac{\sqrt{7}}{4} \]
Since \(\theta\) is in the second quadrant (between \(\frac{\pi}{2}\) and \(\pi\)), \(\cos \theta\) will be negative:
\[ \cos \theta = -\frac{\sqrt{7}}{4} \]
Thus, the final answer is:
\[ \cos \theta = -\frac{\sqrt{7}}{4} \]