I'm looking for a method to solve for $A$, $B$, and $C$ in the equation for a parabola given three points $(x_i, y_i), i = 1, 2, 3$. To start, I thought I should try to solve the system of equations:
$$ \left[ \begin{array}{ccc|c} x_1^2 & x_1 & 1 & y_1 \\ x_2^2 & x_2 & 1 & y_2 \\ x_3^2 & x_3 & 1 & y_3 \end{array} \right] $$ As I guessed, this got really messy really quickly, so I just plugged it into Wolfram Alpha and it spit out some of the ugliest things I've seen in a while:
$$ A = \frac{x_3(y_2 - y_1) + x_2(y_1 - y_3) + x_1(y_3 - y_2)}{(x_1 - x_2)(x_1 - x_3)(x_2 - x_3)}\\ B = \frac{x_1^2(y_2 - y_3) + x_3^2(y_1 - y_2) + x_2^2(y_3 - y_1)}{(x_1 - x_2)(x_1 - x_3)(x_2 - x_3)}\\ C = \frac{x_2^2(x_3y_1 - x_1y_3) + x_2(x_1^2y_3 - x_3^2y_1) + x_1x_3(x_3 - x_1)y_2}{(x_1 - x_2)(x_1 - x_3)(x_2 - x_3)} $$
These are horrible! I feel like I'm overcomplicating it. Is there any nicer way of doing it?