how to show the convergence of an algorithm I have two unknown variables  x and y which are non linear equations to be solved.
\begin{eqnarray}
y=\frac {|\sin(2x+\theta)|}{\sin x\sqrt{A+2B\cos(2x+\theta)}} \nonumber \\
x=\arccos\bigg( -\frac{1}{2(Dr^{y/M}+1)} \bigg) 
\end{eqnarray}
I have developed some iterative process algorithm to calculate the answer.
simulations show that the algorithm converges, but the problem is how do I prove this mathematically. What techniques need to be used? 
Algorithm:
given $x(0)=2\pi/3$ and $\epsilon=10^{-6}$ and $A,B,D,r,M,\theta$ are constants
i=0 


*

*compute $y$:
\begin{equation}
y(i)=\frac {|\sin(2x(i)+\theta)|}{\sin x(i)\sqrt{A+2B\cos(2x(i)+\theta)}} \nonumber 
\end{equation}

*update $x$:
\begin{equation}
x(i+1)=\arccos\bigg( -\frac{1}{2(Dr^{y(i)/M}+1)} \bigg)  \nonumber
\end{equation}
i=i+1 
repeat till $|x(i+1)-x(i) |<\epsilon$ 
 A: This is a fixed point iteration, which, given an equation $x=f(x)$ you want to solve for $x$, seeks the solution by an iterative process $x_{k+1}=f(x_k)$ starting from some initial guess $x_0$.
A usual approach to determine if the fixed point iteration converges is to verify whether $f$ is Lipschitz continuous with the Lipschitz constant smaller than one.
A: Plugging the expression of $y$ into that of $x$, you have a single equation in a single unknown $x=f(x)$, which you could solve by classical methods such as the secant, regula falsi, Newton, Brent... alternatively to fixed-point. Some of these methods give you guarantees on convergence.
A first step is to observe the shape of $f(x)$ for typical values of the free parameters, as a general study risks to be arduous. 
Note that you can absorb the two parameters $M$ and $r$ in $A$ and $B$.
Interestingly, you can rewrite the second relation as
$$y=a\ln(-2\sec(x)-1)+b,$$
which has a simple behavior (two vertical asymptotes and a single extremum in the middle, repeating periodically).
