Another service from Omega

Finding the Parabola y = a x^2 + b x + c

Let's call the parabola P
> P := y = a*x^2 + b*x + c:
  • When x = -1 then y = 6
    > E1 := subs({x=-1, y=6}, P);
    
                                  E1 := 6 = a - b + c
    
  • When x = 1 then y = 4
    > E2 := subs({x=1, y=4}, P);
                                   E2 := 4 = a + b + c
    
  • When x=2 then y=9
    > E3 := subs({x=2, y=9}, P);
                                E3 := 9 = 4 a + 2 b + c
    
  • This is a system of three linear equations in the three unknowns a, b, c. The solution is given by
    > solve({E1, E2, E3}, {a,b,c});
    
                                 {c = 3, b = -1, a = 2}