I think you can avoid the Newton-Raphson altogether, since cubic is solvable in radicals.
Here is the complete algorithm (working under constraints outlined in the problem), in Mathematica:
Clear[PositiveCubicRoot];
PositiveCubicRoot[p_, q_, r_] :=
Module[{po3 = p/3, a, b, det, abs, arg},
b = ( po3^3 - po3 q/2 + r/2);
a = (-po3^2 + q/3);
det = a^3 + b^2;
If[det >= 0,
det = Power[Sqrt[det] - b, 1/3];
-po3 - a/det + det
,
(* evaluate real part, imaginary parts cancel anyway *)
abs = Sqrt[-a^3];
arg = ArcCos[-b/abs];
abs = Power[abs, 1/3];
abs = (abs - a/abs);
arg = -po3 + abs*Cos[arg/3]
]
]
Then
In[222]:= PositiveCubicRoot[-2.52111798, -71.424692, -129.51520]
Out[222]= 10.499
However, if the Newton-Raphson method must be used, then a good initial guess is imperative. Binary division is a good method to isolate the root in the case at hand.
We start with an arbitrary point $x$, I chose $x=1$, and double it while the polynomial
at that point is negative. Then do binary division a certain number of times (the code below does it twice). Ultimately, polish it off with Newton-Raphson iterations:
In[283]:=
NewtonRaphsonStartingPoint[{p_, q_, r_}] := Module[{x1=0, x2=1,f1,f2,xm,fm},
f1 = r + x1 (q + (p + x1) x1);
While[(f2 = r + x2 (q + (p + x2) x2)) <= 0,
x1 = x2; f1 = f2; x2 = 2 x2];
Do[xm = (x1 + x2)/2; fm = r + xm (q + (p + xm) xm);
If[fm <= 0, f1 = fm; x1 = xm, f2 = fm; x2 = xm], {i, 2}];
(f2 x2 - f1 x1)/(f2 - f1)
];
NewtonRaphsonIterate[{p_, q_, r_}, x0_Real] :=
FixedPoint[
Function[x, x - (r + x (q + (p + x) x))/(q + (2 p + 3 x) x)], x0]
In[285]:=
NewtonRaphson[p_, q_, r_] :=
NewtonRaphsonIterate[{p, q, r}, NewtonRaphsonStartingPoint[{p, q, r}]]
In[286]:= NewtonRaphson[-2.52111798, -71.424692, -129.51520]
Out[286]= 10.499
The derivative of your quartic is $$4(45x^3 - 108x^2 + 73x - 14) = 4(3x-2)(3x-1)(5x-7)$$
So the stationary points are at $x = \frac{1}{3}, \frac{2}{3}, \frac{7}{5}$, does this help you draw the graph?
In addition to this, we have the second derivative as $$540x^2-864x + 292$$
that will allow you to check whether your stationary points are minimums or maximums.
Best Answer
You can use the rational root theorem to guess some roots.
For example, in the integer case, one can take $q=1$, and one only has to test $p = \pm 1$, $p = \pm 2$, $p= \pm 5$, and then you have it. (you of course could test $\pm 7$, $\pm 10$, $\pm 14$, $\pm 35$ and $\pm 70$ as well, but it would be less work to just divide by the $x-5$)
Another technique:
In this case it is useless. But if it is a polynomial like $x^3+3x^2+4x+2$, you now know that there are no positive roots.
Last technique:
If the root is larger than 10, the $x^3$ and $x^2$ term are large enough to be able to ignore the smaller terms, thus this is a good estimation. Write $a$ for the first coefficient and $b$ for the second, $c$ for the third and $d$ for the fourth.
Now, if $x$ is large, then $ax^3+bx^2+cx+d \sim ax^3+bx^2$. Therefore the roots will be comparable. But $ax^3+bx^2=0$ gives $x^2=0$ or $ax+b=0$. In the first case $x$ isn't large enough. In the second case we have $ax+b=0$, thus $ax=-b$, thus $x=\frac{-b}{a}=-\frac{\mathrm{second} \; \mathrm{coefficient}}{\mathrm{first} \; \mathrm{coefficient}}$.