# What is a short way to deal with this cubic polynomial problem?

i tried to denote the roots to be $a,(a+1),b$ in this problem and i set up a bunch of equations but they are too complicated to solve. What is a way to solve this problem and check it within 3-4 minutes (you all know the time limit for contest is generally very limited)?

Let k be a positive integer and let w be an integer such that two of the roots for x of the cubic equation $x^3 - 17x^2 +kx +w=0$ are consecutive positive integers. Find the value of k if absolute value of (k-w) is a maximum.

-

Perhaps you didn't make use of the sum of the roots being $17$? This lets you eliminate $b$, and you just have a function of $a$ to worry about.

EDIT: Some details:

The roots are $a$, $a+1$, and $b$.

They add up to $17$ (why?), so $b=16-2a$, so the roots are $a$, $a+1$, and $16-2a$.

The sum of the products of pairs of roots is $k$, so $k=a(a+1)+a(16-2a)+(a+1)(16-2a)=-3a^2+31a+16$ (but check my algebra here).

Now $k$ is supposed to be positive, so $-3a^2+31a+16\gt0$, which by standard methods gets you $0\le a\le10$.

The product of all the roots is $-w=a(a+1)(16-2a)$ which gives you $w=2a^3-14a^2-16a$ (if I did the algebra right), and $k-w=16+47a+11a^2-2a^3$.

So all we have to do is find the integer $a$, $0\le a\le10$, that maximizes $|16+47a+11a^2-2a^3|$.

-
How am i able to finish it? I never get the correct answer somehow, and i probably throw my scratch paper away –  Victor Feb 27 '12 at 21:09
Try it again, and before you throw away your scratch paper, post what you got. We'll see if we can take it from there. –  Gerry Myerson Feb 28 '12 at 1:02
i know how to use calculus way to continue, but is there a algebraic way? –  Victor Mar 6 '12 at 21:58
There are only 11 integers $a$, $0\le a\le10$, so you have available the arithmetic way of just trying all 11. –  Gerry Myerson Mar 6 '12 at 23:36