LAST EDITED ON Aug-11-03 AT 05:29 PM (EST)
While you can find one root of this equation by guessing, guessing fails if you slightly modify the equation. Equations like this are solved by various methods of successive approximations. The method that seems the easiest to remember is based on the mean value theorem:If a real function f(x) is has a continuous derivative in the interval <a, b>, there is a number x such that a < x < b and
f(b) - f(a) = (b - a)·f'(x)
You can write your equation as f(x) = 0 and you are looking for a root of the function f(x) (in your case, f(x) = x2 - 2x = 0). If you use the mean value theorem with some arbitrary point x0 and the root x, then (since f(x) = 0)
f(x0) = (x0 - x)·f'(x0)
Solving for the root x:
x = x0 - f(x0)/f'(x0)
Since you do not know x0 (you know just that x0 is between x0 and x), you replace it with x0. Now the above equation will not give you the root x, but some number x1, hopefully closer to the root x that the initial number x0:
x1 = x0 - f(x0)/ f'(x0)
In general, you calculate a sequence x0, x1, x2, ... by repeating
xk+1 = xk - f(xk)/ f'(xk)
and hope that the sequence has the root as a limit. If you do not want just to hope, you have to make sure that you choose the initial approximation x0 sufficiently close to the root so that the function f(x) is monotonous in the interval <x, x0> (if x < x0) or <x0, x> (if x > x0), because you must avoid points where the derivative f'(x) = 0. An initial approximation close to the root also speeds up the convergence to the limit.
Lets look at your equation:
f(x) = x2 - 2x = 0
f'(x) = 2x - (ex·ln2)' = 2x - ln2·ex·ln2 = 2x - ln2·2x
xk+1 = xk - {xk2 - 2xk}/{2xk - ln2·2xk}
The best way to perform the calculation is to use a spreadsheet program, such as MS Excel. Enter some initial approximation in the cell A1, enter function
A1 - (A1*A1 - POWER(2,A1))/(2*A1 - LN(2)*POWER(2, A1))
into the cell A2, highlight the cell A2, and drag its lower right corner down the column A. Then enter various initial approximations in the cell A1 to get all roots if there is more than one. The result is:
1
2.629445677
1.880715254
2.001064679
2.000000036
2
2
2
etc.
0
-1.442695041
-0.89706458
-0.773470226
-0.766685079
-0.766664696
-0.766664696
-0.766664696
etc.
10
8.660447728
7.407817449
6.29072267
5.361944518
4.666032417
4.228600094
4.037717242
4.001251722
4.00000144
4
4
4
etc.
which are all the roots I found with various initial approximations.