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 \]
First, we calculate \( \sin^2 \theta \):
\[ \sin^2 \theta = \left(\frac{3}{4}\right)^2 = \frac{9}{16} \]
Now, plug this into the Pythagorean identity:
\[ \frac{9}{16} + \cos^2 \theta = 1 \]
Subtract \( \frac{9}{16} \) from both sides:
\[ \cos^2 \theta = 1 - \frac{9}{16} \]
Convert 1 into a fraction with a denominator of 16:
\[ 1 = \frac{16}{16} \]
So:
\[ \cos^2 \theta = \frac{16}{16} - \frac{9}{16} = \frac{7}{16} \]
Next, take the square root of both sides:
\[ \cos \theta = \pm \sqrt{\frac{7}{16}} = \pm \frac{\sqrt{7}}{4} \]
Since we know that \( \theta \) is in the second quadrant (between \( \frac{\pi}{2} \) and \( \pi \)), \( \cos \theta \) must be negative in this quadrant. Therefore, we take the negative root:
\[ \cos \theta = -\frac{\sqrt{7}}{4} \]
Thus, the final answer is:
\[ \cos \theta = -\frac{\sqrt{7}}{4} \]