# Find the cubic function whose graph has horizontal Tangents

Problem: Find the cubic function $y = ax^3 + bx^2 + cx + d$ whose graph has horizontal tangents at $(-2, 6)$ and $(2, 0)$.

Now I can never seem to gather enough information for find all the values of $a,b,c,d$.

All the information I can gather is:

1. the derivative $\dfrac{\mathrm{d}y}{\mathrm{d}x}$.

2. $\dfrac{\mathrm{d}y}{\mathrm{d}x}$ is zero at those points, and therefore can set up two equations for the derivative.

3. Those given points lie on the graph and therefore I can plug in the $x$ and $y$ values of both points into the original equation set up two more equations.

Even with all this information I was only able to find out the $b = 0$, and just don't know what to do from there!

• You get four linear equation in four unknowns. Solving such a system is a standard problem, which can be attacked with for instance Gaussian elimination.
– Ian
Oct 17, 2015 at 14:25
• In fact this particular type of problem can be attacked in a more clever manner, using a technique called Hermite interpolation. You probably will not see this method in general in your class, but in this particular case it amounts to writing down the system of equations for the form $a+b(x+2)+c(x+2)^2+d(x+2)^2(x-2)$. Using this form turns out to make the resulting system triangular.
– Ian
Oct 17, 2015 at 14:27

From the fact that $\frac{dy}{dx}=0$ at $x=-2$ and $x=2$, we get

$$f'(x)=k(x+2)(x-2)=kx^2-4k$$

for a scaling constant $k$. Then by taking the anti-derivative

$$f(x)=\frac{1}{3}kx^3-4kx+C$$

Plugging in the coordinates of the two points on the curve

$$\begin{array}{ccccc} f(-2)&=&-\frac{8}{3}k+8k+C&=\frac{16}{3}k+C=6 \\ f(2)&=&\frac{8}{3}k-8k+C&=-\frac{16}{3}k+C=0 \end{array}$$ with solution $k=\frac{9}{16},C=3$.

So $\boxed{f(x)=\frac{3}{16}x^3-\frac{9}{4}x+3}$

• You have an error in the antiderivative. Oct 17, 2015 at 14:57
• @EmilioNovati - thanks. That was a silly mistake! Oct 17, 2015 at 15:23

Here’s yet another approach: the graph of a cubic polynomial $f$ has rotational symmetry (180°) about the inflection point, so if we place the local max and min symmetrically about the origin, we get an odd cubic polynomial. You make this move by subtracting $3$ from the function, and I’ll call the result $g(x)=f(x)-3$.

We now have $g(x)=ax^3+bx$, $g(2)=-3$, $g'(2)=0$, giving the linear equations $8a+2b=-3$, $12a+b=0$, $b=-12a$, $8a-24a=-3$, $a=3/16$, $b=-9/4$. Thus we have $g(x)=3x^3/16-9x/4$, $f(x)=3x^3/16-9x/4+3$.

• Very interesting approach. +1. You could have put a little explanation on how you got that $\color{blue}3$ Oct 17, 2015 at 17:17
• The max and min points are equidistant from the $y$-axis, so no right-left adjustment is needed; to make them equidistant from the $x$-axis, you have to lower them both by $3$. Oct 18, 2015 at 2:14
• I get it. Thanks. Nice Oct 18, 2015 at 2:18

Hint:

With $y'(-2)$ = 0 and $y'(2) = 0$ you get $b = 0$ and $12a+c = 0$

With $y(2) = 6$ and $y(-2) = 0$ you get $d = 3$ and $8a + 2c = -3$

Now take the equations of the above two and get a and c

You have the informations: $$y'(-2)=0\quad y'(2)=0 \quad y(-2)=6 \quad y(2)=0$$ that is: four equations for the four unknowns $a,b,c,d$

$$\begin{cases} 12a-4b+c=0\\ 12a+4b+c=0\\ -8a+4b-2c+d=6\\ 8a+4b+2c+d=0 \end{cases}$$ Can you solve this system ?

Find : $a=3/16$, $b=0$, $c=-9/4$, $d=3$.

# Hint:

$$y'=3ax^2+2bx+c$$ at (-2,6) the slope equal to the slope at (2,0) $$3a(-2)^2+2b(-2)+c=3a(2)^2+2b(2)+c$$ $$b=0$$ to complete the solution, we will use the $y'=0$ at point (-2,6) or (2,0)(if you use two point, you will get same equation) $$3a(-2)^2+c=0$$ now use the two points with the original equations $$a(-2)^3+c(-2)+d=6$$ $$a(2)^3+c(2)+d=0$$

solve the three equations to get the coefficients

The derivative must be a multiple of $x^2-4$, hence the polynomial is $A\left(\dfrac{x^3}3-4x\right)+B$.

Then $P(2)+P(-2)=2B=6$, and $P(2)-P(-2)=2A\left(\dfrac83-8\right)=-6$, and

$$P(x)=\frac9{16}\left(\frac{x^3}3-4x\right)+3.$$