Find the possible real values of $(x,y)$ satisfying $\sin x+\cos x=\frac{y^2-2y+4}{y^2+2y+4}$ Find the possible real values of $(x,y)$ satisfying $\sin x+\cos x=\frac{y^2-2y+4}{y^2+2y+4}$.
I could not solve this question after trying many times.How can two variables be solved with one equation?Please help me.
Its answer is $(2n\pi+\frac{\pi}{4}\pm\arccos\frac{k}{\sqrt2},\frac{1+k\pm\sqrt{(k-3)(1-3k)}}{1-k});$ where $k\in [\frac{1}{3},\sqrt2]-\left\{1\right\}$ and $(2n\pi+\frac{\pi}{4}\pm\frac{\pi}{4},0)$

HINT:
Let $u=\dfrac{y^2-2y+4}{y^2+2y+4}$
$\iff y^2(u-1)+2y(u+1)+4u-4=0$
As $y$ is real, the discriminant  $4\{(u+1)^2-4(u-1)^2\}\ge0$
$\iff3u^2-10u+3\le0\iff (u-3)\left(u-\dfrac13\right)\le0\iff\dfrac13\le u\le3$
Now $\cos x+\sin x=\sqrt2\sin\left(\dfrac\pi4+x\right)\implies-\sqrt2\le\cos x+\sin x\le\sqrt2$
So, we need $\dfrac13\le\dfrac{y^2-2y+4}{y^2+2y+4}=\cos x+\sin x\le\sqrt2$
Now set $$\dfrac{y^2-2y+4}{y^2+2y+4}=\cos x+\sin x=k$$  with $\dfrac13\le k\le\sqrt2$
