# Math Help - Finding expression of cubic function

1. ## Finding expression of cubic function

Find an expression for a cubic function if f(1)=6 and f(-1)=f(0)=f(2)=0.

-I understand that one part of the equation could be (x+1)(x-2) since f(-1)=0 and f(2)=0. Now for the gradient, which is where i am having the trouble. The answer comes out to be -3x(x+1)(x-2). I don't know how the -3x was obtained. Do i uses rise over run formula to obtain the -3......such as (1,6) (-1,0).....still by doing this i come to a gradient of 3 not -3.

2. ## Re: Finding expression of cubic function

Originally Posted by johnsy123
Find an expression for a cubic function if f(1)=6 and f(-1)=f(0)=f(2)=0.

-I understand that one part of the equation could be (x+1)(x-2) since f(-1)=0 and f(2)=0. Now for the gradient, which is where i am having the trouble. The answer comes out to be -3x(x+1)(x-2). I don't know how the -3x was obtained. Do i uses rise over run formula to obtain the -3......such as (1,6) (-1,0).....still by doing this i come to a gradient of 3 not -3.
You cubic can be written in the form \displaystyle \begin{align*} y = a(x - x_1)(x - x_2)(x - x_3) \end{align*}, where \displaystyle \begin{align*} x_1, x_2, x_3 \end{align*} are your x intercepts. You know these are -1, 0 and 2, so you have

\displaystyle \begin{align*} y &= a[x - (-1)](x - 0)(x - 2) \\ y &= a\,x(x + 1)(x - 2) \end{align*}

Now substitute the last point to evaluate the value of a.