# Homework Help: Find a cubic function that has horizontal tangents at two given points

1. Jul 22, 2008

### illjazz

1. The problem statement, all variables and given/known data
Find a cubic function ax^3 + bx^2 + cx + d whose graph has horizontal tangents at the points (-2, 6) and (2. 0).

2. Relevant equations
No idea.

3. The attempt at a solution
I realize that the trick in here somewhere is to work "backwards". I completed a problem earlier that asked me to find the points at which a given function had horizontal tangents. I tried to go back to that and construct a path to the solution for this problem by going in reverse but did not get anywhere.

So far I've taken the first and second derivatives of the given cubic function to arrive at

y' = 3ax^2 + 2bx + c
y'' = 6ax + 2b

Since the points are given, I figure perhaps I need to set something equal to a point-slope equation.. something like this, basically:

y - 6 = (x - (-2))

for the first point, for example. I'm confused as to how exactly to proceed and whether how I thought about this so far is the right way of thinking about it. Some pointers would be appreciated. Thanks!

2. Jul 22, 2008

### rock.freak667

Horizontal tangent means that the gradient/slope at that point is zero. Use that idea.

3. Jul 22, 2008

### illjazz

I failed to mention that but I'm aware of this. I've trained myself to instantly translate my book's mention of "horizontal tangents" into the real meaning, which is slope = 0. My real problem here is that I don't know just where to begin..

As I've mentioned, I assume the point-slope form may make an appearance in the path to the solution, and I'm sure derivatives are involved as well.

I also think I will have an equation at some point that I will want to set equal to zero and then solve for some variable that I can then plug in somewhere else, like the original equation. What I'm having trouble with specifically is seeing how to use the given point coordinates in a way that will help me construct the sought after polynomial.

Thanks for trying to help!

4. Jul 22, 2008

### rock.freak667

Let y=ax^3 + bx^2 + cx + d

your gradient function is $\frac{dy}{dx}$

$$\frac{dy}{dx}=3ax^2+2bx+c$$

At the points (2,0) and (-2,6), $\frac{dy}{dx}=0$. i.e. when x=2 dy/dx=0,etc. You now have two equations with 3 unknowns. Can't solve yet.

But (2,0) & (-2,6) also are points on the curve. What does this mean now? (If you don't know,how would you test that these points are actually on the curve?)

5. Jul 23, 2008

### illjazz

Hmmm.. so (2, 0) and (-2, 6) are on the graph of the cubic function given. How would I test to see if those points are actually on the curve?

I suppose by plugging those coordinates in for x and y, respectively. I'm not sure if that would work though.. I mean I can plug in, but I will still have the four unknowns a, b, c and d.

Also, as you said, at the two given points I am told that y' = 0, which suggests that I could solve for

$$3ax^2+2bx+c=0$$

but what do I solve for? I'm missing something here :/

6. Jul 23, 2008

### HallsofIvy

The horizontal tangents are at x= 2 and x= -2, remember. This last equation is only true for x= 2 and x= -2. That gives you two equations for a, b, and c. Setting (x, y)= (2,0) and (x,y)= (-2, 6) in the original equation gives you two more equations for a, b, c, and d. Now you have four linear equations in four unknowns. What more could you want?

7. Jul 23, 2008

### illjazz

Ok, that helps! A little. The question is what to solve FOR?

So with this realization that y' = 0 iff x = 2 or -2, I now have the following equation:

y' = 3a(2)^2 + 2b(2) + c = 0
12a + 4b + c = 0
12a = -4b -c
a = -(4b + c)/12

Here I solved for a, but how do I know I'm supposed to solve for a? I might as well have solved for b or c.

I suppose if I knew what to solve for, I could use the result of this first calculation above and plug that into y' = 0 where x = -2 to find what b is, say.

Then use the points for the original equation and solve

y = ax^3 + bx^2 + cx + d with (x, y) = (-2, 6), so
6 = a(-2)^3 + b(-2)^2 + c(-x) + d
...

to get c. Finally, I could solve y one last time, now knowing c, with the second point, (x, y) = (2, 0) to get d.

Do I have the right idea here? I think what's confusing is whether order matters here and just what variable to pick at first to solve for. I think I have roughly the right idea, but I'm not sure what I outlined above is quite right.

8. Jul 23, 2008

### rock.freak667

For x=2 you'll get one equation and for x=-2, you'd get another different equation.

You seem to know how to solve the equations, but find the 4 equations that you need first, and then solve. Don't just find one and begin solving.

9. Jul 23, 2008

### illjazz

I should have mentioned that I did do that, actually. I remember thinking to write that but didn't for some reason.

I had two equations for y' = 0, of course. One with x = 2 and the other with 2 = -2.

The first one gave a = -(4b + c)/12 and the second one a = (4b - c)/12.

This is where I'm even more confused than before.. I suppose that's why I failed to mention it at first because I wanted to take this one step at a time..

So now I have TWO equations, both containing 3 unknowns. In either, I can either solve for a, b or c. Does it matter which variable I pick? I have a hard time imagining how it WOULDN'T matter. Also, if I solve the second equation for a, I then have two values of a.. which, well, doesn't help. Which one to pick?

Also, assume I choose to take the a I get from y' = 0 with x = 2. How do I know that's the correct a to use in the following equations, and not the one from y' = 0 with x = -2? (Hmmm.. I guess that's the same question I just asked in the previous paragraph..).

10. Jul 23, 2008

### rock.freak667

What were the 4 equations that you got?

In your 4 equations, pick one, and make one variable the subject and substitute it into the other 3. You'll now have 3 equations. Pick another equation and substitute it into the other 2. Then you can solve easily again.

11. Jul 23, 2008

### illjazz

1. 3a2^2 + 2b2 + c = 0
12a + 4b + c = 0

2. 3a(-2)^2 + 2b(-2) + c = 0
12a - 4b + c = 0

3. 6 = a(-2)^3 + b(-2)^2 + c(-2) + d
6 = -8a + 4b + 2c - d

4. 0 = a(2)^3 + b(2)^2 + c(2) + d
0 = 8a + 4b + 2c + d

Those :/

So now, just pick any one of those, and then pick any variable to solve for.. and then plug the result into any of the remaining three, until done? That seems so random it seems like magic, or even a miracle, that you could consistently get the same end result if you went through all the various possibilities.

12. Jul 23, 2008

### rock.freak667

Well if you keep eliminating one variable from each equation, eventually you'll get one equation with one unknown.

If you know how to solve systems of linear equations using row reduction, you can easily solve it using matrices.

But since I don't think you know how to do that, you need to just keep elminating the variables.

13. Jul 23, 2008

### illjazz

Thanks for the reminder.. I actually know how to RREF a matrix.

I made one that looked like this:

[12, 4, 1, 0; 12, -4, 1, 0; -8, 4, 2, 6; 8, 4, 2, 6; 8, 4, 2, 0]

based on the equations I mentioned earlier, and where the fourth row is the 4th row of the "augmented matrix".. so after the third row, imagine that vertical line inside the matrix. I assumed that the rows corresponded to the coefficients.. so rows 1 through 4 are coefficients a through d. Unless I made mistakes (which is possible since I haven't done matrix alg in a while).. what I ended up getting is nothing like the solution in the back of the book.

I got (-1/12)x^3 + 1/6x - 4/3

and according to the book, it's supposed to be y = (3/16)x^3 - (9/4)x + 3

:(

Edit:
I tried to figure out how to enter an augmented matrix on my NSpire calculator but can't get it to work for the life of me.. there's plenty of ways to enter a plain nxn matrix.. but I don't know how to tell the calculator that the last column is supposed to be the augmented column :/.

14. Jul 24, 2008

### illjazz

Whoops.. typing that up I just realized that I constructed a 3x4 matrix with one augmented column.. but in doing so, I completely ignored the d variable in the last two equations! Looks like I need a 4x4 matrix with an augmented column..

15. Jul 24, 2008

### Defennder

If you're looking for a matrix row-reduction solver or even a system of linear equations solver, you can find them online here:

along with a lot of other online calculators such as Fourier/Laplace (inverse) transform.

16. Jul 24, 2008

### illjazz

Nevermind.. I found out how to do it on my calculator with a function called simult() or simultstep()..

I did

[12, 4, 1, 0;
12, -4, 1, 0;
-8, 4, 2, 1;
8, 4, 2, 1]

and the augmented column was [0, 0, 6, 0].

I got back (-8/3, 0, 9/2, -6).. looks nothing like the solution, unless again I'm doing something wrong.

17. Jul 24, 2008

### illjazz

Awesome, thank you! I'll check that out :)

BTW.. I'm beginning to think that the problem here is that my first two and my last two equations are "not compatible". After all, the last two are degree-3 polynomials and the first two are degree-2. Doesn't the degree of the polynomial dictate the position of terms/their ordering in a linear system of equations?

Damn.. I should have stuck to just solving and substituting one by one..

18. Jul 24, 2008

### rock.freak667

This equation should be 6=-8a+4b-2c+d

19. Jul 24, 2008

### illjazz

My bad.. but look at my matrix examples.. for the d's I used 1's and did not write -1 in the third column.. so while I made a mistake in typing that up, I did not make it later in the calculations on the calculator.

Are we sure that the four equations are correct? What's wrong here?

20. Jul 24, 2008

### rock.freak667

Well that is how to do the question.

Do you happen to know what the answer should be?