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.
 A: 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.

A: As there are three double roots, $$x^6 - 10x^5 + 29x^4 - 4x^3 + ax^2-bx-c$$ is a perfect square, and we can evaluate its square root.
Looking at the first two terms,
$$x^6-10x^5\leftrightarrow(x^3-5x)^2=x^6-10x^5\cdots$$
Next
$$x^6-10x^5+29x^4\leftrightarrow(x^3-5x^2+px)^2=x^6-10x^5+(2p+25)x^4\cdots$$ so that $p=2$.
Then
$$x^6-10x^5+29x^4-4x^3\leftrightarrow(x^3-5x^2+2x+q)^2=x^6-10x^5+29x^4+(2q-20)x^3\cdots$$ and $q=8$.
The roots of 
$$x^3-5x^2+2x+8$$ are $-1, 2$ and $\color{green}4$.
A: We have the lines $y = x^{2}(x^{4}-10x^{3}+29x^{2}-4x+a)$ and $y = bx + c$
With $x^{2}(x^{4}-10x^{3}+29x^{2}-4x+a) \geq bx + c$
Let's call the $3$ points of intersection $x_{1}, x_{2}$ and $x_{3}$, with $x_{1}<x_{2}<x_{3}$
Let $h(x) = x^{6}-10x^{5}+29x^{4}-4x^{3}+ax^{2}$
Then at the $3$ points of intersections, $h'(x_{i}) = b$
We want the equation
$x^{2}(x^{4}-10x^{3}+29x^{2}-4x+a) =  bx + c$ 
to have $x_{1},x_{2}$ and $x_{3}$ as its $3$ distinct solutions.
$x^{6}-10x^{5}+29x^{4}-4x^{3}+ax^{2}- bx - c =0$
$(x-x_{1})(x-x_{2})(x-x_{3})f(x) = 0$ where $f$ is some function of $x$. 
It is clear that $f$ would be a cubic, which would have at least $1$ solution to $f(x) = 0$. So then we require that either, one of our points of intersection is a root of $f(x)$ and the quadratic remaining has no real roots, or $f(x)$ has up to $3$ roots equal to our points of intersection. 
Now consider the cases:
$x_{3} = 4: 1024 +16a = 4b + c $
$x_{3} = 5: 2000 + 25a = 5b + c$
$x_{3} = 7: 17836 + 49a = 7b + c$
These are all the 'conditions' I can think of. The inequality seems rather complex and hard to make use of. 
