# Solve 3 quadratics simultaneously given (x,y)

• Jul 5th 2007, 03:05 PM
Hydra3847
Solve 3 quadratics simultaneously given (x,y)
I am trying to solve a system of quadratic equations.

Given:
y1 = a*x1^2 + b*x1 + c
y2 = a*x2^2 + b*x2 + c
y3 = a*x3^2 + b*x3 + c

(x1, y1), (x2, y2), (x3, y3)

I need to solve for a,b,c.

Trying to use Gaussian Elimination does not seem to give any success.

Does anyone have any idea where to find a solution to this? I have checked out the web on solving for the three-point quadratic, but nothing shows the algorithm.
• Jul 5th 2007, 05:25 PM
ThePerfectHacker
You can solve this with a computer easily by using Cramer's rule as the algorithm.

Note: As line as (x1,y1),(x2,y2),(x3,y3) are not on the same line the determinant is non-zero.
• Jul 6th 2007, 03:56 AM
Soroban
Hello, Hydra!

Quote:

I am trying to solve a system of quadratic equations.

Given: . $\begin{array}{c}
y_1 \:= \:ax_1^2 + bx_1 + c \\
y_2 \:= \:ax_2^2 + bx_2 + c \\
y_3 \:= \:ax_3^2 + bx_3 + c\end{array}$

. . $(x_1,\,y_1),\;(x_2,\,y_2),\;(x_3,\,y_3)$

I need to solve for $a,\,b,\,c$.

First of all, this system of equations is not quadratic.

We have a linear system: . $\begin{vmatrix}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{vmatrix}$

As ThePerfectHacker suggested, Cramer's Rule would be the simplest approach.

Curious . . . Do you REALLY want a general formula for a 3-by-3 system?
. . It is truly ugly . . .

• Jul 6th 2007, 10:14 AM
Jhevon
Quote:

Originally Posted by Soroban

Curious . . . Do you REALLY want a general formula for a 3-by-3 system?
. . It is truly ugly . . .

I know two ways, I think, to find the Determinant of a 3-by-3 matrix. The general co-factor expansion method, and this other one that I don't even know the name for. Were you referring to something else?
• Jul 6th 2007, 11:21 AM
ThePerfectHacker
Quote:

Originally Posted by Jhevon
Were you referring to something else?

He was talking about the solution for $x,y,z$ to the above system. Any way you do it is will lead to a long equation answer.

The only simple think to compute is the determinant which is the Virtumonde Determinant.
• Jul 9th 2007, 01:20 PM
Hydra3847
After reading the various replies to this query, I do not think I stated my intentions clearly. I am trying to solve for a parabola that passes through three points.

Given 3 points (x1, y1), (x2, y2), (x3, y3), where x1=x, x2=x+1, x3=x+2

I want to solve the three equations simultaneously to get one generic equation for those three points. So obviously the three equations to solve simultaneously for would be

y1 = a*x1^2 + b*x1 + c = a*x^2 + bx + c
y2 = a*x2^2 + b*x2 + c = a*(x+1)^2 + bx + b + c = ax^2 + 2ax + a + bx + b + c
y3 = a*x3^2 + b*x3 + c = a*(x+2)^2 + bx + 2b + c = ax^2 + 4ax + 4a + bx + 2b + c

Sorry for any confusion caused.
• Jul 26th 2007, 03:12 PM
ray_sitf
y1 = a*x1^2 + b*x1 + c = a*x^2 + bx + c
y2 = a*x2^2 + b*x2 + c = a*(x+1)^2 + bx + b + c = ax^2 + 2ax + a + bx + b + c
y3 = a*x3^2 + b*x3 + c = a*(x+2)^2 + bx + 2b + c = ax^2 + 4ax + 4a + bx + 2b + c

These are 3 very friendly equations, because they all have + c on the end. By doing 2nd - 1st and 3rd - 2nd you get rid of the c at a stroke and have two eqns with two unknowns.
These 2 equations both have + b on the end so you can take one away from the other and find "a".
• Jul 26th 2007, 04:10 PM
topsquark
Quote:

Originally Posted by Hydra3847
After reading the various replies to this query, I do not think I stated my intentions clearly. I am trying to solve for a parabola that passes through three points.

Given 3 points (x1, y1), (x2, y2), (x3, y3), where x1=x, x2=x+1, x3=x+2

I want to solve the three equations simultaneously to get one generic equation for those three points. So obviously the three equations to solve simultaneously for would be

y1 = a*x1^2 + b*x1 + c = a*x^2 + bx + c
y2 = a*x2^2 + b*x2 + c = a*(x+1)^2 + bx + b + c = ax^2 + 2ax + a + bx + b + c
y3 = a*x3^2 + b*x3 + c = a*(x+2)^2 + bx + 2b + c = ax^2 + 4ax + 4a + bx + 2b + c

Sorry for any confusion caused.

You need to solve the system:
$y_1 = ax^2 + bx + c$
$y_2 = a(x + 1)^2 + b(x + 1) + c$
$y_3 = a(x + 2)^2 + b(x + 2) + c$

Given the points $(x, y_1), (x + 1, y_2), (x + 2, y_3)$

The solution method is the same as you've been told. Set up your equations in matrix form:
$\left ( \begin{matrix} x^2 & x & 1 \\ (x + 1)^2 & (x + 1) & 1 \\ (x + 2)^2 & (x + 2) & 1 \end{matrix} \right ) \cdot \left ( \begin{matrix} a \\ b\\ c \end{matrix} \right ) = \left ( \begin {matrix} y_1 \\ y_2 \\ y_3 \end{matrix} \right )$

Cramer's rule would probably be the simplest method to do this.

-Dan