To find the locus of the midpoint of the points \( P(\theta) \) and \( Q\left(\frac{\pi}{2} + \theta\right) \) on the ellipse given by the equation
\[
\frac{x^2}{9} + \frac{y^2}{4} = 1,
\]
we can follow these steps:
### Step 1: Parametrize the Points on the Ellipse
The standard parametric equations for the ellipse are:
\[
x = 3 \cos \theta, \quad y = 2 \sin \theta.
\]
Thus, for point \( P(\theta) \), we have:
\[
P(\theta) = (3 \cos \theta, 2 \sin \theta).
\]
For point \( Q\left(\frac{\pi}{2} + \theta\right) \), we substitute \( \theta \) with \( \frac{\pi}{2} + \theta \):
\[
Q\left(\frac{\pi}{2} + \theta\right) = \left(3 \cos\left(\frac{\pi}{2} + \theta\right), 2 \sin\left(\frac{\pi}{2} + \theta\right)\right).
\]
Using the trigonometric identities, we find:
\[
\cos\left(\frac{\pi}{2} + \theta\right) = -\sin \theta, \quad \sin\left(\frac{\pi}{2} + \theta\right) = \cos \theta.
\]
Thus,
\[
Q\left(\frac{\pi}{2} + \theta\right) = (-3 \sin \theta, 2 \cos \theta).
\]
### Step 2: Find the Midpoint of PQ
The midpoint \( M \) of points \( P \) and \( Q \) is given by:
\[
M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right).
\]
Substituting the coordinates of \( P \) and \( Q \):
\[
M = \left(\frac{3 \cos \theta - 3 \sin \theta}{2}, \frac{2 \sin \theta + 2 \cos \theta}{2}\right).
\]
This simplifies to:
\[
M = \left(\frac{3}{2}(\cos \theta - \sin \theta), \sin \theta + \cos \theta\right).
\]
### Step 3: Express the Coordinates in Terms of \( h \) and \( k \)
Let:
\[
h = \frac{3}{2}(\cos \theta - \sin \theta), \quad k = \sin \theta + \cos \theta.
\]
### Step 4: Eliminate \( \theta \)
To find the relationship between \( h \) and \( k \), we can express \( \cos \theta \) and \( \sin \theta \) in terms of \( h \) and \( k \).
From \( k = \sin \theta + \cos \theta \), we can square both sides:
\[
k^2 = (\sin \theta + \cos \theta)^2 = \sin^2 \theta + \cos^2 \theta + 2 \sin \theta \cos \theta = 1 + 2 \sin \theta \cos \theta.
\]
Thus,
\[
2 \sin \theta \cos \theta = k^2 - 1.
\]
From \( h = \frac{3}{2}(\cos \theta - \sin \theta) \), we can also square this:
\[
h^2 = \left(\frac{3}{2}\right)^2 (\cos \theta - \sin \theta)^2 = \frac{9}{4}(\cos^2 \theta - 2 \sin \theta \cos \theta + \sin^2 \theta) = \frac{9}{4}(1 - 2 \sin \theta \cos \theta).
\]
Substituting \( 2 \sin \theta \cos \theta \):
\[
h^2 = \frac{9}{4}(1 - (k^2 - 1)) = \frac{9}{4}(2 - k^2).
\]
### Step 5: Final Equation
Now we have:
\[
h^2 = \frac{9}{4}(2 - k^2).
\]
Rearranging gives:
\[
\frac{h^2}{9} + \frac{k^2}{4} = 2.
\]
Thus, the locus of the midpoint \( M \) is given by the equation:
\[
\frac{x^2}{9} + \frac{y^2}{4} = 2.
\]