In the function $f(x)= x^3-15x^2+ax+b$ the graph has $3$ consecutive points where it crosses the x-axis. These $3$ points are consecutive integers. Find $a$ and $b$ for this is you know that $a$ and $b$ are real numbers.

How do I start to find the answer?

  • 7
    $\begingroup$ Hint: $4+5+6=15$ $\endgroup$
    – Hrhm
    Aug 23, 2016 at 0:06

4 Answers 4


The brute force method that doesn't require any formulas or theorems would be like so:

You know that there are $3$ consecutive zeroes $(n-1)$, $n$, $(n+1)$. It's important to pick them like so as opposed to $n$, $(n+1)$, $(n+2)$ because this will save you a lot of algebra.

$0=(n-1)^3-15(n-1)^2+a(n-1)+b $

$0=n^3-15n^2+an+b $

$0=(n+1)^3-15(n+1)^2+a(n+1)+b $

$\color{red}{\text {This is how to start it. Below is the answer, so if you just wanted a hint you can stop here.}}$

Get rid of the $b$ first because it's easy. To do this, subtract the middle equation from the other two, producing two equations with $a$ and $n$ as unknowns:

$$0-0=[(n-1)^3-15(n-1)^2+a(n-1)+b ]- (n^3-15n^2+an+b )$$

Which simplifies to

$$0=-a-3n^2+33n-16 $$


$$0-0 = [(n+1)^3-15(n+1)^2+a(n+1)+b ] - (n^3-15n^2+an+b )$$

Which simplifies to

$$0=a+3n^2-27n-14 $$

So we have the system

$$0=-a-3n^2+33n-16 $$

$$0=a+3n^2-27n-14 $$

Now add these $2$ equations together, and get




Now that you have $n$, you know that the other solutions are of the form $n \pm 1$, so the $3$ roots are $4, 5, 6$.

Now plug just two of these into your cubic (maybe the two smallest ones) and you will have two equations with $a$ and $b$ as unknowns.






Solving this system, we get

$$a=74, \ b=-120$$


As noticed by mathguy in the comments below, we can cut down on the work required. Once we find $n$, we can use the equation

$$0=a+3n^2-27n-14 $$

to find $a$:

$$0=a+3 \cdot(5)^2-27 \cdot (5) -14$$

$\implies$ $a=74$

Now we can use one of the original $3$ equations (the one with $n-1$ for the easiest computation?) to find $b$:

$$0=(5-1)^3-15(5-1)^2+74(5-1)+b $$

$\implies$ $b = -120$

$$a=74, \ b=-120$$

  • 3
    $\begingroup$ +1 Nice to think of explaining at the level expected with minimal pre-requisites $\endgroup$ Aug 23, 2016 at 4:10
  • $\begingroup$ wolfram says your math is incorrect wolframalpha.com/input/?i=(x-4)(x-5)(x-6) a & b should be 74 & -120 respectively $\endgroup$ Aug 23, 2016 at 10:05
  • $\begingroup$ @SouhaiebBesbes Thank you, I had $4^2$ and $5^2$ where they should've been cubed. Fixed now $\endgroup$
    – Ovi
    Aug 23, 2016 at 12:18
  • $\begingroup$ You had an equation that gave you $a$ directly as a function of $n$, and then another that gave you $b$ as a function of $a$ and $n$ - the last part (plugging in the roots into the original function) can be avoided. Otherwise nice solution, +1! $\endgroup$
    – user325968
    Aug 23, 2016 at 12:50
  • $\begingroup$ @mathguy Thank you and you're right, I just plowed my way through it. I might update it later when I have time. Your solution is much shorter though $\endgroup$
    – Ovi
    Aug 23, 2016 at 13:08

OK, so let's assume you never heard of Vieta's formulas.

Points where the graph crosses the $x$ axis are roots of the polynomial, and if you know the roots of the polynomial, call them $A, B, C$, then the polynomial can be written as $f(x) = (x-A)(x-B)(x-C)$. Are you supposed to know this much? If not, I would suggest the problem is unfair. So let's say you are allowed to assume this much.

Then $f(x) = x^3 - (A+B+C) x^2 + \cdots$ (or $-\cdots$). So this means $A+B+C = 15$. This is the Vieta formula for the sum of roots, even if you never heard of it (and to solve the problem, you don't need to know it even has a name).

Now $A,B,C$ are consecutive integers, so the middle one must be 5, and the others are 4 and 6. Plug back into $f(x)=(x-4)(x-5)(x-6)$ and find $a, b$ by brute force (multiply out the RHS).


Crossing the $x$ axis means you have a root. There is a neat formula, called Vieta's Formula (being alluded to in the comments) that for a monic polynomial of the form $$ x^n+a_{n-1}x^{n-1}+....+a_0=0 $$ The roots of this polynomial sum to $-a_{n-1}$.

So in your case you have an equation in one variable since you know the roots are consecutive. Let $r_1,r_1+1,r_1+2$ be your roots and use Vieta's.

  • $\begingroup$ Eventhough this is a lovely subject i might learn once i haave some more time, i think this is not the formula we are supposed to know or supposed to be knowing. Also i tried to find it in my own language and i still don't fully understand :S $\endgroup$
    – Michelle_B
    Aug 23, 2016 at 0:13
  • 1
    $\begingroup$ You can derive the theorem with more work (or by googling), but a good start may be to try and divide by $x-r_1$ and see what happens. If I had more time I would try and give an alternative solution, sorry! $\endgroup$ Aug 23, 2016 at 0:15
  • $\begingroup$ @Michelle_B What class is this for? This seems more like a problem for math contests, seems a little odd for school $\endgroup$
    – Ovi
    Aug 23, 2016 at 0:26
  • $\begingroup$ Actually, the roots sum to $-a_{n-1}$. $\endgroup$
    – user325968
    Aug 23, 2016 at 3:21
  • $\begingroup$ @mathguy As well they should. good call, fixing $\endgroup$ Aug 23, 2016 at 3:32

This should be useful to you: Vieta's formulas.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.