[Math] How to find the vertex form of a cubic

calculuspolynomialsslope

In a calculus textbook, i am asked the following question:

Find a cubic polynomial whose graph has horizontal tangents at (−2, 5) and (2, 3)

A vertex on a function $f(x)$ is defined as a point where $f(x)' = 0$. So the slope needs to be 0, which fits the description given here. So i am being told to find the vertex form of a cubic. Further i'd like to generalize and call the two vertex points (M, S), (L, G).

I understand how i'd get the proper x-coordinates for the vertices in the final function:

I need to find the two places where the slope is $0$. So i need to control the
x-intercepts of a cubic's derivative. I start by:
$(x + M) * (x + L)$ which becomes: $x^2 + x*(M+L)+M*L$

I now compare with the derivative of a cubic in the form: $ax^3 + bx^2 + cx + d$:

$3a*x^2 + 2b*x + c = x^2 + (M+L)*x+M*L$ . From this i conclude:

$3a = 1$, $2b=(M+L)$, $c=M*L$, so, solving these: $a=1/3$, $b=\frac{L+M}{2}$, $c=M*L$.

So, putting these values back in the standard form of a cubic gives us:
$\frac{1}{3} * x^3 + \frac{L+M}{2} * x^2 + L*M*x + d$

And that's where i get stumped. This works but not really. If both $L$ and $M$ are positive, or both negative, the function starts giving wrong results.

But the biggest problem is the fact that i have absoloutely no idea how i'd make this fit certain requirements for the $y$-values. Only thing i know is that substituting $x$ for $L$ should give me $G$. And substituting $x$ for $M$ should give me $S$.

Any help is appreciated, have a good day!

Best Answer

$f(x) = ax^3 + bx^2+cx +d\\ f'(x) = 3ax^2 + 2bx + c$

We have some requirements for the stationary points.

$f'(x) = 3a(x-2)(x+2)\\ f'(x) = 3ax^2 - 12a = 3ax^2 + 2bx + c$

Note, in your work above you assumed that the derivative was monic (leading coefficient equal to 1). This seems to be the cause of your troubles.

$b = 0, c = -12 a\\ f(x)= ax^3 - 12ax + d$

Now fit your points to find $a, d$

$f(-2)= 16k + d=5\\ f(2)= -16k + d=3$