Iterative method For $x=\phi(x)$ , $x_{n+1}=\phi(x_n)$
$x\sin x+\cos x=0$
$[x=2.7984]$
I tried the following forms but they are not provide solution
$x=\arccos(-x\sin(x))$
$x=\arcsin(\cos(x)/x)$
$x=\operatorname{arccot}(-x)$
$x=-\cot(x)$
$x=x+x\sin x+\cos x$
What is the general way to try to write $x=\phi(x)$ in programming?
It usually helps when the iteration function provides some visual compression from domain to range. While $$ x=ϕ(x)=-\frac{\cos x}{\sin x}=-\cot x $$ will expand finite intervals to the full real line, due to the periodic poles of the cotangent function, the branches $$ x=ϕ_k(x)=k\pi-\text{arccot}(x) $$ of the inverse function will have the opposite effect, mapping the full real line to the finite interval $(\,(k-1)\pi,k\pi\,)$. Starting the iteration in the middle of that interval a test of the iteration can be implemented as
with the results
showing rapid convergence.