How do you find the quadratic function #y=ax^2+bx+c# whose graph passes through the given points (1,-1), (-1, 5), (2,10)?
2 Answers
Explanation:
There are several ways to do this, but here's a very standard one:
Substitute the given points into the quadratic equation to get three simultaneous equations in
#{ (a+b+c = -1), (a-b+c = 5), (4a+2b+c = 10) :}#
Subtracting the second equation from the first, we get:
#2b = -6#
and hence
Subtracting the first equation from the third equation, we get:
#3a+b = 11#
Substituting
#3a = 14#
Hence
Then from the first equation:
#c = -1-a-b = -1-14/3+3 = -8/3#
So:
#y = 14/3x^2-3x-8/3#
graph{(y - (14/3x^2-3x-8/3))(9(x-1)^2+(y+1)^2-0.01)(9(x+1)^2+(y-5)^2-0.01)(9(x-2)^2+(y-10)^2-0.01) = 0 [-3, 3, -4, 12]}
Explanation:
Here's another method, which is a little more sophisticated and very useful...
Given points:
#f_1(x) = ((x-(color(blue)(-1)))(x-color(blue)(2)))/((color(blue)(1)-(color(blue)(-1)))(color(blue)(1)-color(blue)(2))) = -1/2(x^2-x-2)#
#f_2(x) = ((x-color(blue)(1))(x-color(blue)(2)))/(((color(blue)(-1))-color(blue)(1))((color(blue)(-1))-color(blue)(2))) = 1/6(x^2-3x+2)#
#f_3(x) = ((x-color(blue)(1))(x-(color(blue)(-1))))/((color(blue)(2)-color(blue)(1))(color(blue)(2)-(color(blue)(-1)))) = 1/3(x^2-1)#
These are constructed so that:
#f_1(1) = 1" "f_1(-1) = 0" "f_1(2) = 0#
#f_2(1) = 0" "f_2(-1) = 1" "f_2(2) = 0#
#f_3(1) = 0" "f_3(-1) = 0" "f_3(2) = 1#
We can then add together a linear combination of these polynomials to match the required
#y = (color(blue)(-1))f_1(x) + color(blue)(5)f_2(x) + color(blue)(10)f_3(x)#
#color(white)(y) = (-1)(-1/2(x^2-x-2)) + 5(1/6(x^2-3x+2)) + 10(1/3(x^2-1))#
#color(white)(y) = 1/2(x^2-x-2) + 5/6(x^2-3x+2) + 10/3(x^2-1)#
#color(white)(y) = 14/3 x^2-6x-8/3#