  # Quadratic Equation through 3 Points

Category: Mathematics

Demonstrates: Linear simultaneous equations; Array variables

## Problem Description

Given the x, y co-ordinates of three points, obtain a quadratic simultaneous equation that passes through these points.

Assuming the co-ordinates of three points to be (x1, y1), (x2, y2) and (x3, y3), the following equations can be formed:

 ax12+bx1+c=y1 ax22+bx2+c=y2 ax32+bx3+c=y3

The EQUATRAN source text for this problem is:

 /*  Quadratic equation defined by three points  */ VAR x(3), y(3) y = a*x^2 + b*x + c INPUT x, y OUTPUT a, b, c

Enter the lines above into a new source text window, then click the Run button:

Input values are now requested, type 1, 5, 9 and click Input to enter the values for X, then repeat for the Y values 6, 3, 10. Click Go. The calculation result is displayed:

 /*  Quadratic equation defined by three points  */                       <<   input data   >> x               =                   1) 1                2) 5                3) 9              y               =                   1) 6                2) 3                3) 10             <<   results   >> a               =  0.3125         b               =  -2.625         c               =  8.3125