Answer
$$r = \frac 4 {2 + cos(\theta)}$$
Work Step by Step
1. Determine the equation that we are going to use:
Since the directrix is defined by $x = 4$, we are going to use $cos(\theta)$ in the formula.
Since $4$ is positive, the formula will have "$+cos(\theta)$":
$$r = \frac{ed}{1 + ecos(\theta)}$$
2. Substitute the given values for $d$ (directrix) and e (eccentricity):
$$r = \frac{\frac 12 (4)}{1 + \frac 12 cos(\theta)} = \frac {2}{1 + \frac 12 cos(\theta)}$$
In order to eliminate the fraction, we should multiply the fraction by $\frac 2 2$:
$$r = \frac {2}{1 + \frac 12 cos(\theta)} \times \frac 22 $$
$$r = \frac 4 {2 + cos(\theta)}$$