Finding equations of lines I'm sitting an exam soon and have been revising for a while but I sometimes get stuck with questions that I know are simple but still have no idea about how to do them at all! Please explain to me how this is done. (Note: this is all the info I have about the question):
Let $L$ be the line with equation $x + y = 0$, $F = (1,1)$ and $P = (a,b)$.
(a) Find the equation of the line perpendicular to $L$ which passes through $P$, the intersection of the two lines and hence the least distance between $P$ and $L$.
(b) Determine the Cartesian equation of the parabola with focus $F$ and directrix $L$.
(c) Show that the tangent to the parabola at the point $(x_1,y_1)$ has equation
$(x_1 - y_1 + 2)y + (y_1 - x_1 + 2)x - 2(x_1 + x_1y_1 + y_1) + x_1^2 + y_1^2 = 0$.
 A: a) The line $y_L=-x$ has a slope of $-1$, so a perpendicular line must have a slope of $-\frac{-1}{1}=1$; hence $y_P=x+C$, where $b=y_P(a)=a+C$ implies $C=b-a$. The lines intersect at $y_L(x_I)=-x_I=x_I+b-a=y_P(x_I)$; that is, at $x_I=\frac{a-b}{2}$. Thus the distance between the point $P=(a,b)$ and the line $L$ is given by $\sqrt{\left(a-\frac{a-b}{2}\right)^2+\left(b-\frac{b-a}{2}\right)^2}=\sqrt{2}\left(\frac{a+b}{2}\right)$.
b) Let $(x,y)$ be any point on the parabola. The distance between the point and the focus $F=(1,1)$ is $\sqrt{(x-1)^2+(y-1)^2}$ and the distance between the point and the directrix $L$ is $\sqrt{2}\left(\frac{x+y}{2}\right)$, which we calculated above. Now, we equate and square the two expressions:
$$\begin{align*} &\quad(x-1)^2+(y-1)^2=2\left(\frac{x+y}{2}\right)^2=\frac{(x+y)^2}{2}\\
&\implies x^2-2x+1+y^2-2y+1=\frac{x^2+2xy+y^2}{2}\\
&\implies \frac{x^2}{2}-2x+\frac{y^2}{2}-2y-xy+2=0 \end{align*}$$
This is the equation of the parabola with focus $F$ and directrix $L$.
c) We first find the slope of the tangent line. To do this, we consider $y$ as a function of $x$ and differentiate with respect to $x$:
$$\begin{align*} &\quad\frac{\mathrm{d}}{\mathrm{d}x}\left(\frac{x^2}{2}-2x+\frac{y(x)^2}{2}-2y(x)-xy(x)+2\right)=\\
&=x-2+y(x)y'(x)-2y'(x)-y(x)-xy'(x)=0\\
&\implies \frac{\mathrm{d}y}{\mathrm{d}x}=y'(x)=\frac{2-x+y}{y-x-2} \end{align*}$$
At the point $(x_1,y_1)$, we obtain the slope $\frac{\mathrm{d}y}{\mathrm{d}x}=\frac{2-x_1+y_1}{y_1-x_1-2}$. Hence the equation of the tangent line is given by
$$y-y_1=\frac{2-x_1+y_1}{y_1-x_1-2}(x-x_1)\\
\implies yy_1-yx_1-2y-y_1^2+x_1y_1+2y_1=2x-xx_1+xy_1-2x_1+x_1^2-x_1y_1\\
\implies x(y_1-x_1+2)+y(x_1-y_1+2)-2(x_1+x_1y_1+y_1)+x_1^2+y_1^2=0$$
This is what we wanted to show.
