A couple of years ago I stumbled upon a curious expression that determines the tangent points to a parabola.
Given a point $A(x_a,y_a)$ in $\mathbb{R}^{2}$ and a generic parabola $(p)$ $y = ax^{2} + bx +c$, the horizontal components of the intersection of the parabola with the tangent lines through $A$ are,
$$ x = \frac{ax_a \pm \sqrt{a({ax_a}^{2} + bx_a + c - y_a)}}{a} $$
These are the solutions to the system,
$$\begin{cases} y = ax^{2} + bx + c \\ y=2ax^2 + (b-2x_aa)x + (y_a-bx_a) \end{cases}$$
My problem is I have no idea where that second parabola came from. I wrote this down years ago but never followed up with an explanation (I know, I know).
Why does this work?
Let m be the slope of the tangent, then
$$\frac{y - y_a}{x - x_a} = m => y = mx - mx_a + y_a$$
$$=> ax^2 + (b - m)x + c + mx_a - y_a$$
As the tangent only touch the parabola at one point, the determinant should be zero :
$$(b - m)^2 = 4a(c + mx_a - y_a)$$ $$=> m^2 - (2b + 4ax_a)m + b^2 - 4ac + 4ay_a = 0$$ $$=>m = b + 2ax_a \pm 2\sqrt{a(ax_a^2 + bx_a + c - y_a)}$$
From the equation for x we have
$$x = \frac{m - b}{2a} = \frac{ax_a \pm\sqrt{a(ax_a^2 + bx_a + c - y_a)}}{a}$$