Raymond J. answered 01/14/21
Patient with Ability to Explain in Many Ways
The general form of a cubic equation is f(x) = Ax3+Bx2+Cx+D
You have 4 points so we can get 4 equations and solve the system of equations.
From (-3, 0):
f(-3) = A(-3)3 + B(-3)2 + C(-3) + D = 0 ⇒ -27A + 9B - 3C + D = 0
(-1,0)
f(-1) = A(-1)3 + B(-1)2 + C(-1) + D = 0 ⇒ -A + B - C + D = 0
(0, 18)
f(0) = D = 18 (so we have our first coefficient, D = 18)
(3,0)
f(3) = A(3)3 + B(3)2 + C(3) + D = 0 ⇒ 27A + 9B + 3C + D = 0
Rewriting these and plugging in for D = 18, then reducing we get:
9A - 3B + C = 18
A - B + C = 18
9A + 3B + C = -6
Now solve the system of linear equations (I used matrices, but difficult to reproduce here).
I came up with A = -2, B = -2, C = 18, and D = 18 hence
f(x) = -2x3 - 2x2 + 18x + 18