Fixed-point iteration for $x=\tan(x)$ I've been trying to find an accurate $g(x)$ in order to find a solution for $x=\tan(x)$ in the interval $[4,5]$. However, no matter what, all of them end up converging to zero which is not the answer. So far, I've tried:

$$g(x)=\tan(x)$$
$$g(x)=\tan^{-1}(x)$$
$$g(x)=\sin^{-1}(x\cos(x))$$
$$g(x)=\sqrt{x\tan(x)}$$

I thought maybe I was having trouble with the interval since I was working with angles, but even if I just use $[\pi/45,\pi/36]$, the functions still converge to 0. Can anybody help me out? I need to solve this problem using fixed-point iteration.
The $\arctan$ function is more nicely behaved than $\tan$. Let 
$$g(x)=\arctan x+\pi.$$
Be sure your calculator is in radian mode, and start with $x_0$ not too far from $4.5$. Use the iteration $x_{n+1}=g(x_n)$. Convergence should be acceptably quick. 

Added: The reason we get nice behaviour with our choice of $g(x)$ is that near the root, the derivative of $\arctan x$ has rather small absolute value. By way of contrast, the derivative of $\tan x$ near the root is much larger than $1$. That means that with the choice $g(x)=\tan x$, the root is a repelling fixed point.
X=tan X
1/X = 1/tan X &#8658; (1/x)-(1/tan X) =0 
F(X)= 1/x- 1/tan X =0
From fixed point iterationX=g(X)=f(X)g(X) = 1/X - (1/tan X) -xBy 10-4precision
p1=
g(4)=4.61369
p2=g(4.61369)=4.495964p3=g(4.495964)=4.49341p4=g(4.49341)=4.49340