If $x+i y=\frac{a+i b}{a-i b}$, prove that $\mathbf{x}^{2}+\mathbf{y}^{2}=1$
Consider the given equation,
$x+i y=\frac{a+i b}{a-i b}$
Now, rationalizing
$x+i y=\frac{a+i b}{a-i b} \times \frac{a+i b}{a+i b}$
$=\frac{(a+i b)(a+i b)}{(a-i b)(a+i b)}$
$=\frac{a(a+i b)+i b(a+i b)}{(a)^{2}-(i b)^{2}}$
$\left[(a-b)(a+b)=a^{2}-b^{2}\right]$
$=\frac{a^{2}+i a b+i a b+i^{2} b^{2}}{a^{2}-i^{2} b^{2}}$
$=\frac{a^{2}+i a b+i a b+(-1) b^{2}}{a^{2}-(-1) b^{2}}\left[i^{2}=-1\right]$
$x+i y=\frac{a^{2}+2 i a b-b^{2}}{a^{2}+b^{2}}$
$x+i y=\frac{\left(a^{2}-b^{2}\right)}{a^{2}+b^{2}}+i \frac{2 a b}{a^{2}+b^{2}}$
On comparing both the sides, we get
$x=\frac{\left(a^{2}-b^{2}\right)}{a^{2}+b^{2}} \& y=\frac{2 a b}{a^{2}+b^{2}}$
Now, we have to prove that $x^{2}+y^{2}=1$
Taking LHS,
$x^{2}+y^{2}$
Putting the value of x and y, we get
$\left[\frac{\left(a^{2}-b^{2}\right)}{a^{2}+b^{2}}\right]^{2}+\left[\frac{2 a b}{a^{2}+b^{2}}\right]^{2}$
$=\frac{1}{\left(a^{2}+b^{2}\right)^{2}}\left[\left(a^{2}-b^{2}\right)^{2}+(2 a b)^{2}\right]$
$=\frac{1}{\left(a^{2}+b^{2}\right)^{2}}\left[a^{4}+b^{4}-2 a^{2} b^{2}+4 a^{2} b^{2}\right]$
$=\frac{1}{\left(a^{2}+b^{2}\right)^{2}}\left[a^{4}+b^{4}+2 a^{2} b^{2}\right]$
$=\frac{1}{\left(a^{2}+b^{2}\right)^{2}}\left[\left(a^{2}+b^{2}\right)^{2}\right]$
$=1$
$=\mathrm{RHS}$