Question: Newton-Raphson's method- how to improve the range of result interval?

Let's consider the function f(x)= tan(x)- x and its root in the interval (Pi/2,3*Pi/2)

Firstly, we zoom the intersection point of the function with g(x)= tan(x) and h(x)= x ( or the function f(x) and the Ox axis):

plot([tan(x),x], x= 4.3..4.55, gridlines=true);

 Now, we use the Newton-Raphson method to reach the root, like this:

restart: f:= x -> x-tan(x);
a[-1]:= 0: a[0]:= 4.55:                # a[0]= 4.55 since we obtain the root is close to 4.55 
 N:= 0: 
 while abs(a[N]-a[N-1])>10^(-9) do     
 a[N+1]:= a[N]- f(a[N])/fdiff(f(x), x=a[N]) ; 
 N:=N+1 od: 
 print(); 
 'N'=N; 
 'a[N]'= a[N]; 
 'f(a[N])'= f(a[N]); 
 

 Then, of course, it certainly reach the root.

However the problem is that how can I find an interval, as large as possible, in which any starting value (i.e a[0]) generates a sequence that converges to the solution?

Is there any other theorem that improve such interval? Or we just use heudristics?

 

Please Wait...