How to derive the equation of a parabola given a focus and a directrix not parallel to the x or y axis?

$$d_1=\sqrt{(x-x_1)^2+(y-y_1)^2}$$ And $$d_2=\frac{|y-mx+c|}{\sqrt{1+m^2}}$$ You can form the equation of Parabola now, but as you were unsure about second, I'll help you prove it:


As we are measuring perpendicular distance, take the line perpendicular to $y=mx+c$ passing through $(x_0,y_0)$ and the foot of perpendicular on line $(\alpha,\beta)$,i.e.$$(\beta-y_0)=\frac{-1}m(\alpha-x_0)$$ Or, $$m(\beta-y_0)+(\alpha-x_0)=0$$ Squaring, $$m^2(\beta-y_0)^2+(\alpha-x_0)^2=-2m(\alpha-x_0)(\beta-y_0)\tag1$$ Now consider, $$(m(\alpha-x_0)-(\beta-y_0))^2=m^2(\alpha-x_0)^2+(\beta-y_0)^2-2m(\alpha-x_0)(\beta-y_0)$$ Or $$m^2(\alpha-x_0)^2+(\beta-y_0)^2-(m(\alpha-x_0)-(\beta-y_0))^2=2m(\alpha-x_0)(\beta-y_0)\tag2$$ Adding (1) and (2), $$m^2(\beta-y_0)^2+(\alpha-x_0)^2+m^2(\alpha-x_0)^2+(\beta-y_0)^2=(m(\alpha-x_0)-(\beta-y_0))^2$$ Or [Use $c=\beta-m\alpha$ and rearrange] $$(m^2+1)((\beta-y_0)^2+(\alpha-x_0)^2)=(y_0-mx_0-c)^2$$ So distance from line is: $$d=\sqrt{(\beta-y_0)^2+(\alpha-x_0)^2}=\frac{|(y_0-mx_0-c)|}{\sqrt{m^2+1}}$$ Note: For a line $ax+by=c$, put $m=-\frac ab$ to get: $$d=\frac {|ax_0+by_0+c|}{\sqrt{a^2+b^2}}$$