<s>[INST] Independence of $\frac{1-\cos(x)+k\sin(x)}{\sin(x)+k(1+\cos(x))}$ from $k$. How to one can show that the value of the following expression
$$\frac{1-\cos(x)+k\sin(x)}{\sin(x)+k(1+\cos(x))}$$ 
doesn't depend to values of $k$?
 [/INST] Writing $x = 2y$, we obtain
$$\begin{align}
\frac{1-\cos x + k\sin x}{\sin x + k(1+\cos x)} &= \frac{(1-\cos (2y)) + k\sin (2y)}{\sin(2y) + k(1+\cos(2y))}\\
&= \frac{2\sin^2 y + 2k\sin y\cos y}{2\sin y\cos y + 2k\cos^2 y}\\
&= \frac{\sin y}{\cos y}\cdot\frac{\sin y+k\cos y}{\sin y + k\cos y}\\
&= \tan y
\end{align}$$
using the double-angle formulae $\sin (2y) = 2\sin y\cos y$ and $\cos (2y) = \cos^2 y - \sin^2 y$.
</s>