# $5^{th}$ degree polynomial expression

$p(x)$ is a $5$ degree polynomial such that

$p(1)=1,p(2)=1,p(3)=2,p(4)=3,p(5)=5,p(6)=8,$ then $p(7)$

$\bf{My\; Try::}$ Here We can not write the given polynomial as $p(x)=x$

and $p(x)=ax^5+bx^4+cx^3+dx^2+ex+f$ for a very complex system of equation,

plz hel me how can i solve that question, Thanks

• – lab bhattacharjee Jun 20 '16 at 6:09
• You already have a very good start. You should recognize that from the given information you have a system of six equations and six unknowns. You may use matrices then to describe the scenario and use Gaussian Elimination to solve for the coefficients of the polynomial (or to solve for the space spanned by the solutions). From there, you can find $p(7)$. – JMoravitz Jun 20 '16 at 6:12
• Note the general result: a polynomial of degree $n$ is uniquely specified by $n+1$ points on its graph. – MathematicsStudent1122 Jun 20 '16 at 6:48

Let's do it in the most elementary way. Let $$Q(x)=P(x+1)-P(x)-x+2 \tag{1}$$Observe that $Q$ is of degree $4$ and $Q(3)=Q(4)=Q(5)=0$. Therefore we can write$$Q(x)=a(x-3)(x-4)(x-5)(x-b) \tag{2}$$You have also from $(1)$ that $Q(1)=Q(2)=1$, which after substitution in $(2)$ you get $a=-1/8$ and $b=2/3$. So $$Q(6)=-\frac{1}{8}(6-3)(6-4)(6-5)\left(6-\frac{2}{3} \right)=-4$$And finally$$P(7)=Q(6)+P(6)+6-2=-4+8+6-2=8$$

• The nice thing about this is that it doesn't require any computations with large intermediate quantities, rational arithmetic, or row reduction on $6\times6$ matrices. The only downside is that the generalization to non-uniformly spaced sample points is not so obvious, whereas the other methods apply easily to such cases. – Erick Wong Jun 20 '16 at 6:29
• Yeah that's a big barricade and conundrum for this algorithm. – Zack Ni Jun 20 '16 at 6:56
• @ErickWong: the generalization is the computation of the Lagrange polynomial by the Neville scheme. But that would be overkill. – Yves Daoust Jun 20 '16 at 6:56

let $x_i=i\,$, $\,i=1,2,\cdots,6$ and apply Lagrange's interpolation method $${{L}_{i}}(x)=\frac{\prod\limits_{j\ne i,j=1}^{6}{(x-{{x}_{j}})}}{\prod\limits_{j\ne i,j=1}^{6}{({{x}_{i}}-{{x}_{j}})}}\,\,\,\,,\,\,\,i=1,2,\ldots ,7$$ $$P(x)=\sum\limits_{i=1}^{6}{{{L}_{i}}}(x)P({{x}_{i}})$$

hint : write the polynomial in this form $$f(x)= a(x-1)(x-2)(x-3)(x-4)(x-5)+b(x-1)(x-2)(x-3)(x-4)(x-6) +c(x-1)(x-2)(x-3)(x-5)(x-6)+d(x-1)(x-2)(x-4)(x-5)(x-6)+e(x-1)(x-3)(x-4)(x-5)(x-6)+f(x-2)(x-3)(x-4)(x-5)(x-6)$$ now finding constants are easy

HINT:

Let $$\dfrac{p(x)}{(x-1)(x-2)(x-3)(x-4)(x-5)(x-6)}=\sum_{i=1}^6\dfrac{A_i}{x-i}$$

Multiply both sides by $(x-1)(x-2)(x-3)(x-4)(x-5)(x-6)$ and put $x=1,2,3,4,5,6$ one by one in the resultant identity.

Assume $p(x)$ of the form $$p(x)=a\prod_{r=1}^5(x-r)+b\prod_{r=1}^4(x-r)+c\prod_{r=1}^3(x-r)+d\prod_{r=1}^2(x-r)+e(x-1)+f$$ Now put the values of $x$ i.e. $x=1,2,3,4,5,6$ , then values of $a,b,c,d,e,f$ will be $[\frac{-1}{40},\frac{1}{12},\frac{-1}{6},\frac{1}{2},0,1]$ respectively. you can get these values very easily and with alomost no calculation. Start with $x=1$ and get the value of $f$ and then put more values to get $b,c,d,e,f$

So $p(7)=8$

Hope this will help as this method does not solves the complicated equations.

• To Vineet Would you like to explain me how can we write $p(x)$ as $p(x)=a\prod_{r=1}^5(x-r)+b\prod_{r=1}^4(x-r)+c\prod_{r=1}^3(x-r)+d\prod_{r=1}^2(x-r)+e(x-1)+f,$ Thanks – juantheron Jun 21 '16 at 6:16
• I wrote $p(x)$ in this form just to make calculation simple and this form of $p(x)$ is a degree 5 poynomial. So this can be used. – Vineet Mangal Jun 21 '16 at 6:26

Substitute $x$ for the appropriate values in your expression $$p(x)=ax^5+bx^4+cx^3+dx^2+ex+f$$and you will have a system of linear equations in $6$ variables ($a,b,c,d,e,f)$ that can be dealt with your favorite method, including linear algebra tech.

For instance, $p(2)=1$ yields $32a+16b+8c+4d+2e+f=1$.

After solving said system, you will have an explicit formula for $p(x)$, and then all you have to do is plug $x=7$ into it to obtain $p(7)$.