I know that I usually use r^2=x^2+y^2, x = r cos(t) and y = r sin(t) to convert polar equations to rectangular, but I seem to come to the correct solution.

$\displaystyle r(\theta) = \frac{e \cdot p}{1+e \cdot cos(\theta)}$

e and p are constants

The polar equation is supposed to be an ellipse, but the solution I came up with doesn't seem correct.

$\displaystyle x = r \cdot cos(t)$

$\displaystyle r = \frac{e \cdot p}{1 + e \frac{x}{r}}$

$\displaystyle r(1+e \frac{x}{r}) = e \cdot p$

$\displaystyle r + e \cdot x = ep$

$\displaystyle r = e \cdot x - e \cdot p$

$\displaystyle r = e ( x - p)$

$\displaystyle r^{2} = ( e ( x-p))^{2}$

$\displaystyle x^{2}+y^{2} = ( e ( x-p))^{2}$

Any ideas?