<s>[INST] Sixth degree polynomial problem If the graph of $$y = x^6 - 10x^5 + 29x^4 - 4x^3 + ax^2$$  always lies above the line $y = bx + c$, except for $3$ points where the curve intersects the line.
What is the largest value of $x$ for which the line intersects the curve?


*

*A) 4

*B) 5

*C) 6

*D) 7


Through general idea of graphs and with the help of a graphing calculator I have concluded the approximate look of such a curve and a line.
However, I would like to know a proper mathematical solution to this problem.
 [/INST] I begin the computation by the same expression as @Ákos Somogyi
$$\tag{1}x^6-10 x^5+29 x^4-4 x^3+ax^2-bx-c=\underbrace{(x-\alpha)^2(x-\beta)^2(x-\gamma)^2}_{p(x)^2}$$
But I consider at once that this polynomial is equal to 
$$\tag{2}p(x)^2=(x^3+ux^2+vx+w)^2$$
for certain coefficients $u,v,w.$ Expanding the square in (2):
$$\tag{3}x^6+2ux^5+(u^2+2v)x^4+(2uv+w)x^3+(2uw+v^2)x^2+2vwx+w^2,$$
we easily obtain by identification of coefficients in (1) and (3): 
$$u=-5, v=2, w=8.$$
from which we deduce: $a=-76, b=-32, c=-64$ and
$$p(x)=x^3-5x^2+2x+8=(x+1)(x-2)(x-4)$$
Thus the rightmost root is: $x=4$, as can be seen on the picture below. This picture represents the curve with equation $y=x^6-10x^5+29x^4-4x^3-76x^2$ and the straight line with equation $y=-32x-64$, tangent to the curve at 3 differents points.

</s>