Algebraic solution for the intersection point(s) of two parabolas I recently ran through an algebraic solution for the intersection point(s) of two parabolas $ax^2 + bx + c$ and $dx^2 + ex + f$ so that I could write a program that solved for them. The math goes like this:
$$
ax^2 - dx^2 + bx - ex + c - f = 0 \\
x^2(a - d) + x(b - e) = f - c \\
x^2(a - d) + x(b - e) + \frac{(b - e)^2}{4(a - d)} = f - c + \frac{(b - e)^2}{4(a - d)} \\
(x\sqrt{a - d} + \frac{b - e}{2\sqrt{a - d}})^2 = f - c + \frac{(b - e)^2}{4(a - d)} \\
(a - d)(x + \frac{b - e}{2(a - d)})^2 = f - c + \frac{(b - e)^2}{4(a - d)} \\
x + \frac{b - e}{2(a - d)} = \sqrt{\frac{f - c + \frac{(b - e)^2}{a - d}}{a - d}} \\
x = \pm\sqrt{\frac{f - c + \frac{(b - e)^2}{a - d}}{a - d}} - \frac{b - e}{2(a - d)} \\
$$
Then solving for $y$ is as simple as plugging $x$ into one of the equations.
$$
y = ax^2 + bx + c
$$
Is my solution for $x$ and $y$ correct? Is there a better way to solve for the intersection points?

All the other answers are fine from a mathematical point of view, but they ignore the fact that using the quadratic formula is a very bad way to solve quadratic equations in computer code (using floating point arithmetic).
The problem arises when one of the roots is near zero. In this case, either the "$+$" or the "$-$" formula of the $\pm$ will cause you to subtract two numbers that are nearly equal, and this will result in catastrophic cancellation error. The problem is illustrated here, and the well-known solutions are described.
For other interesting examples, see George Forsythe's famous paper "Why a Math Book is not Enough".
