
William W. answered 09/16/21
Math and science made easy - learn from a retired engineer
You are given 4 data points:
f(0) = -5 means the point (0, -5) is on the curve.
f(-2) = 6 means the point (-2, 6) is on the curve.
f(4) = 5 means the point (4, 5) is on the curve.
f(-5) = -3 means the point (-5, -3) is on the curve.
So, you can plug in each (x, y) to get 4 equations in 4 unknowns:
Equation #1: -5 = a(0)3 + b(0)2 + c(0) + d or -5 = d
Based on that, you can plug in d = -5 into the other equations giving you 3 equations in 3 unknowns:
Equation #2: 6 = a(-2)3 + b(-2)2 + c(-2) - 5 or -8a + 4b - 2c = 11
Equation #3: 5 = a(4)3 + b(4)2 + c(4) - 5 or 64a + 16b + 4c = 10 or 32a + 8b + 2c = 5
Equation #4: -3 = a(-5)3 + b(-5)2 + c(-5) - 5 or -125a + 25b - 5c = 2
Adding Equations 2 & 3:
-8a + 4b - 2c = 11
32a + 8b + 2c = 5
-----------------------
24a + 12b = 16
or 6a + 3b = 4
So Equation #5 is 6a + 3b = 4
Multiplying Equation #4 by 2 and multiplying Equation #3 by 5 and adding them:
-250a + 50b - 10c = 4
160a + 40b + 10c = 25
-------------------------
-90a + 90b = 29
So Equation #6 is -90a + 90b = 29
Multiplying Equation #5 by -30 and adding it to Equation #6:
-180a - 90b -120
-90a + 90b = 29
-----------------------
-270a = -91
a = 91/270
Plugging a = 91/270 into Equation #5:
6(91/270) + 3b = 4
91/45 + 3b = 4
3b = 180/45 - 91/45
3b = 89/45
b = 89/135
Plugging in b = 89/135 and a = 91/270 into Equation #2:
-8(91/270) + 4(89/135) - 2c = 11
-4(91/135) + 4(89/135) - 11 = 2c
-364/135 + 356/135 - 1485/135 = 2c
-1493/135 = 2c
c = -1493/270
Plug the values into the function f(x) = ax3 + bx2 + cx + d