# To find a polynomial

My doubt is from a PRMO model paper I had today. The image of the question is given below ( I had to have my lunch, so thought of a quicker way to put my question and ended up with this) :

What I tried :

I felt that $$f(x) - x^3$$ can give me the value of the quadratic part of the polynomial. As a result, taking the quadratic part to be of the form $$ax^2 +bx + c$$, the differences I get are :

1. $$f(1) - 1^3 = a + b + c = 0$$
2. $$f(2) - 2^3 = 4a + 2b + c = -4$$
3. $$f(3) - 3^3 = 9a + 3b + c = -18$$

I am not an expert at solving 3 linear equations in 3 variables , but I tried and ended up pulling out my hair (trying to be a bit literary; hope you won't mind the wordings , but rather concentrate on the question). I tried to take 2 equations at a time, and ended getting multiple values for the same variables.

I will be grateful to anyone who is willing to help me out.

• Note : the question didn't have options, it was a numerical answer-type question. – Spectre Sep 27 '20 at 8:08
• It’s $-18$, not $-9$. Note that $3a+b$ is $-4$ and $8a+2b$ is $-18$ thus $4a+b$ is $-9$. – Mindlack Sep 27 '20 at 8:17
• Thanks for the correction – Spectre Sep 27 '20 at 9:00
• I am, at times, a bit careless ... – Spectre Sep 27 '20 at 9:04

1. $$f(1) - 1^3 = a + b + c = 0$$
2. $$f(2) - 2^3 = 4a + 2b + c = -4$$
3. $$f(3) - 3^3 = 9a + 3b + c = -18$$

The third equation is wrong

Subtracting eq(1) from eq(2)

$$4a + 2b + c -( a + b + c) = -4-0$$

$$3a +b = -4$$------------------------------ eq(3)

Subtracting eq(1) from eq(3)

$$9a + 3b + c -(4a + 3b + c) = -18-(-4)$$

$$5a = -22$$ $$a = \frac{-2}{5}$$ Substitute this in all equations and you'll get the answers

Note that $$f(x) = x^2$$ satisfy the three given equations. But we want of degree $$3$$ so we add $$(x-1)(x-2)(x-3)$$ and get $$f(x) = (x-1)(x-2)(x-3) + x^2$$ with $$f(4) = 6+16 = 22$$.

• Just what user suggested, @cgss – Spectre Sep 27 '20 at 9:12
• I am sorry, I don't understand what you are saying. – cgss Sep 27 '20 at 10:23
• Refer the solution by @user – Spectre Sep 27 '20 at 10:30
• I got you now. It's not the same though. User used lagrange polynomials with a slight change to take advantage of the fact that $a_3 = 1$. I used polynomial division on $f(x) - x^2$. – cgss Sep 27 '20 at 10:35

Hint: Consider $$f(x)-x^2$$ instead. It's so much easier to work with polynomials that are 0 at given points.

• But the deduction technique and the use of linear equations in two variables (those that TimCrosby and user suggested) are exactly what I wanted... I like to take the hard route at times ... :) – Spectre Sep 27 '20 at 9:09

While the solutions involving $$x^2$$ are likely the ones intended by the question-setter, it is also easy to quickly get the value of $$f(4)$$ without extracting the quadratic by using finite differences. Let $$g(n) = f(n) - n^3$$, as in the OP, be quadratic. The first-order differences are:

$$\Delta g(1) = g(2)-g(1) = -4 \\ \Delta g(2) = g(3) - g(2) = -14.$$

So the second-order difference is $$\Delta^2 g(1) = \Delta g(2) - \Delta g(1) = -10$$, which for any quadratic (or lower) polynomial is constant. Hence $$\Delta^2 g(2) = -10$$, so $$\Delta g(3) = \Delta g(2) -10 = -24$$, and $$g(4) = g(3) -24 = -42$$.

So $$f(4) = 4^3 -42 = 22$$.

We have $$a+b+c=0,$$ $$4a+2b+c=-4$$ and $$9a+3b+c=-18,$$ which gives $$(a,b,c)=(-5,11,-6)$$ and $$f(x)=x^3-5x^2+11x-6.$$ Thus, $$f(4)=22.$$

We don't need to determine explicitly the coefficients for the polynomial, indeed we have that by uniqueness

$$f(x)=(x-1)(x-2)(x-3)+\frac12(x-2)(x-3)-4(x-1)(x-3)+\frac92(x-1)(x-2)$$

which satisfies by construction the given conditions with $$f(1)=1$$, $$f(2)=4$$ and $$f(3)=9$$, then

$$f(4)=(3)(2)(1)+\frac12(2)(1)-4(3)(1)+\frac92(3)(2)=6+1-12+27=22$$

As noticed by other answers, more trickly we have that

$$f(x)=(x-1)(x-2)(x-3)+x^2$$

• But such kind of deduction was a bit hard for me though ... by the way, thanks for that answer ... I'll someday learn to deduce better ... – Spectre Sep 27 '20 at 9:06
• @Spectre Yes I understand that! Anyway try to think to similar problem also for simpler cases to get confident with it. Bye – user Sep 27 '20 at 9:09
• Thanks for that advice too, @user ! I like it ! – Spectre Sep 27 '20 at 9:10
• Unfortunately, I didn't accept your answer as I can't accept many answers at a time, and also because I needed to learn how to solve linear equations in 3 variables. – Spectre Sep 27 '20 at 9:11
• @Spectre That's fine! You are doing a great work! Bye – user Sep 27 '20 at 9:21

Given $$f(x)$$ , a monic cubic polynomial.

$$f(1) = 1$$, $$f(2) = 4$$, $$f(3) = 9$$

By factor theorem we can show that $$(x-1)$$,$$(x-2)$$ and $$(x-3)$$ are factors of $$f(x) - x^2$$

We have three linear factors thus we can write $$f(x)$$ as,

$$f(x) - x^2 = k(x-1)(x-2)(x-3)$$, where k is some constant

But $$f(x)$$ is a monic polynomial, therefore k = 1

thus our polynomial becomes, $$f(x) - x^2 = (x-1)(x-2)(x-3)$$

Putting x = 4,

$$f(4) = 6 + 16 = 22$$

This is common technique to solve competition math problems, You can read more about it here https://brilliant.org/wiki/polynomial-interpolation/