How to find the vertex form of a cubic?

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!

• Start with a generic quadratic polynomial vanishing at $-2$ and $2$: $k(x^2-4)$. Integrate that, and use the two arbitrary constants to set the correct values of $y$. Jul 12, 2017 at 17:10

$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$

Let $f(x)=a x^3+b x^2+c x+d$ be the cubic we are looking for

We know that it passes through points $(−2, 5)$ and $(2, 3)$ thus

$f(-2)=-8 a+4 b-2 c+d=5;\;f(2)=8 a+4 b+2 c+d=3$

Furthermore we know that those points are vertices so $f'(x)=0$

$f'(x)=3 a x^2+2 b x+c$ so we get other two conditions

$f'(-2)=12 a-4 b+c=0;\;f'(2)=12 a+4 b+c=0$

subtracting these last two equations we get $8b=0\to b=0$ so the other equations become $$-8 a-2 c+d=5;\;8 a+2 c+d=3;\;12 a+c=0$$ from the 3rd we get $c=-12a$ substitute in the first two and in the end we get

$a= \dfrac{1}{16},b= 0,c=-\dfrac{3}{4},d= 4$

and the equation of the cubic is

$f(x)=\dfrac{x^3}{16}-\dfrac{3 x}{4}+4$

Well, it depends. $$ax^3+bx^2+cx+d$$ can't be converted fully in general form to vertex form... unless you have a trig up your sleeve. The problem is $$x^3$$. You can't transform $$x^3$$ to reach every cubic, so instead, you need a different parent function. Using the triple angle formula from trigonometry, $$\cos\left(3\cos^{-1}\left(x\right)\right)=4x^3-3x$$, which can work as a parent function. With 2 stretches and 2 translations, you can get from here to any cubic. $$ax^{3}+bx^{2}+cx+d=\frac{2\sqrt{\left(b^{2}-3ac\right)^{3}}}{27a^{2}}\cos\left(3\cos^{-1}\left(\frac{x+\frac{b}{3a}}{\frac{2\sqrt{b^{2}-3ac}}{3a}}\right)\right)+\frac{27a^{2}d-9abc+2b^{3}}{27a^{2}}$$ Note this works for any cubic, you just might need complex numbers. They will cancel, your answer will get real.

• Given that the question is asked in the context of a calculus class, I fail to see how this is a terribly useful answer, particularly considering that you don't justify your formulae in any way, and simply assert that they hold... Jun 4, 2022 at 22:20
• To verify the formula, simply rewrite $\cos\left(3\cos^{-1}\left(x\right)\right)$ as $4x^{3}-3x$, expand and simplify to get back the general cubic. Also, if they're in calculus, why are they asking for cubic vertex form here? You could just take the derivative and solve the system of equations that results to get the cubic they need. Jun 4, 2022 at 22:28