Answer
$$r = \frac 4 {2 + cos(\theta)}$$
Work Step by Step
1. Determine the equation that we are going to use:
$$r = 4sec(\theta) = 4 \frac 1 {cos(\theta)} \longrightarrow rcos(\theta) = 4 \longrightarrow x = 4$$
Since the directrix is defined by $x = 4$, we are going to use $cos(\theta)$ in the equation. Since $4$ is positive, the equation 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)}$$