By which method, can I find the nearest root of : $x^5−2x+1.1=0$ ?
Thank you.
By which method, can I find the nearest root of : $x^5−2x+1.1=0$ ?
Thank you.
On
You might try Newton's method. Or the Maclaurin series of the root (that is $0$ for $a=0$) of $x^5 - 2 x + a$ as a function of $a$, which is
$$x = \sum_{k=0}^\infty {{5 k} \choose k} \dfrac{a^{4k+1}}{2(4k+1) 32^k}$$
EDIT: If, as Antonio Vargas suggested, you expand around $a=1$ rather than $a=0$, the formula isn't so pretty. I get for the first few terms (where $r$ is the root you want at $a=1$) $$\eqalign{ x&=r+\frac{a-1}{ 5\,{r}^{3}+5\,{r}^{2}+5\,r-3}\cr &+ \frac{10 r^3 (a-1)^2}{(5\,{r}^{3}+5\,{r}^{2}+5\,r-3)^3}\cr &+ \frac{(200 r^6+50 r^5+50 r^4+50 r^3-30 r^2) (a-1)^3}{(5\,{r}^{3}+5\,{r}^{2}+5\,r-3)^5}\cr &+ \frac{(5000\,{r}^{9}+2500\,{r}^{8}+2625\,{r}^{7}+2750\,{r}^{6}-1125\,{r}^{5}+ 100\,{r}^{4}-25\,{r}^{3}-150\,{r}^{2}+45\,r) (a-1)^4}{(5\,{r}^{3}+5\,{r}^{2}+5\,r-3)^7}\cr &+ \frac{(140000\,{r}^{12}+105000\,{r}^{11}+120000\,{r}^{10}+135125\,{r}^{9}- 17625\,{r}^{8}+12750\,{r}^{7}-2350\,{r}^{6}-17700\,{r}^{5}+5100\,{r}^{ 4}-190\,{r}^{3}-90\,{r}^{2}+135\,r-27)(a-1)^5}{(5\,{r}^{3}+5\,{r}^{2}+5\,r-3)^9} \cr&+ \ldots} $$
On
One method is the so-called "bisection" method. This is essentially a binary search on the space of possible roots. Say you want to find $x$ such that $P(x) = 0$, and you have some $a$ such that $P(a) < 0$ and $b$ such that $P(b) > 0$. Then there must be a root somewhere between $a$ and $b$. So calculate $P\left(\frac{b-a}2\right)$ and see if it is positive or negative. (If it's zero, you win.) If it's negative, you now know that the root lies between $\frac{b-a}2$ and $b$; if positive you know that the root lies between $a$ and $\frac{b-a}2$. You can repeat this as many times as desired, cutting the size of the interval by half each time.
For fifth-degree polynomials it's not hard to come up with the initial $a$ and $b$: just take $a$ to be a large negative number, and $b$ a large positive number.
Often a better method is the Newton-Raphson method. In this method you guess a root, say $g_0$. If $P(g_0)$ is zero, you win. But if not, then you calculate the line that is tangent to $P$ at the point $(g_0, P(g_0))$ and extend this line until it intersects the $x$-axis. The idea is that the graph of $P$ was heading toward the $x$-axis in some direction, and the tangent line is heading in more or less the same direction, so the place where the line reaches the axis, say $g_1$, should be a better approximation of the root than $g_0$ was.
If you work out the geometry, the tangent line has slope $P'(g_0)$ (where $P'$ is the derivative of $P$) and its equation is $y - P(g_0) = P'(g_0)\cdot(x - g_0)$. We want to find the intersection of this line with the line $y=0$, which occurs at $$x=g_0-\frac{P(g_0)}{P'(g_0)}.$$
This value of $x$ is the new guess $g_1$; you repeat this process, producing guesses that are (one hopes) closer and closer to the actual root.
The derivative of the fifth-degree polynomial $P(x) = a_5x^5 + a_4x^4 + a_3x^3 + a_2x^2 + a_1x+a_0$ is the fourth-degree polynomial $P'(x) = 5a_5x^4 + 4a_4x^3 + 3a_3x^2 + 2a_2x + a_1$. For your example $P(x) = x^5−2x+1.1$, so the derivative $P'(x)$ is simply $5x^4-2$. So for your example the Newton-Raphson method looks like this: Make an initial guess $g$, say zero. Then repeatedly calculate
$$ g_{next} = g - \frac{g^5-2g+1.1}{5g^4-2}$$
until it seems like $g$ is pretty close to a root.
One of the more popular methods is Newton's Method. There also exists other methods that converge to the root more slowly than Newton's Method, such as the Bisection Method, Fixed Point Method, etc...