In what case this equation has a solution(s)? I am trying to solve this problem saying, for what values of $a$ and $b$ (in which they are not zero), the equation $a(1-\sin(x))=b(1-\cos(x))$ has any solution(s)? Thank you very much.  :)

$1- \sin(x) = (\cos(x/2) - \sin(x/2))^2$ and $1 - \cos(x) = 2 \sin^2(x/2)$. This gives us that $$\cot(x/2) - 1 = \pm \sqrt{2b/a}$$ i.e. $$\tan(x/2) = \frac1{1 \pm \sqrt{2b/a}}$$ i.e. $$x = 2 \arctan \left(\frac1{1 \pm \sqrt{2b/a}} \right)$$
Another way to approach is as follows. We have $$a \sin(x) - b \cos(x) = b-a$$ i.e. $$\frac{a \sin(x) - b \cos(x)}{\sqrt{a^2+b^2}} = \frac{b-a}{\sqrt{a^2+b^2}}$$ i.e. $$\sin(x + \phi) = \frac{b-a}{\sqrt{a^2+b^2}}$$ 
Hence, $$x = \arcsin \left(\frac{b-a}{\sqrt{a^2+b^2}} \right) - \phi$$ where $\phi$ is such that $\displaystyle \cos(\phi) = \frac{a}{\sqrt{a^2+b^2}}$ and $\displaystyle \sin(\phi) = -\frac{b}{\sqrt{a^2+b^2}}$. For $x \in \mathbb{R}$, we need $$-1 \leq \frac{b-a}{\sqrt{a^2+b^2}} \leq 1$$ i.e. $$\frac{(b-a)^2}{a^2+b^2} \leq 1$$ i.e. $$-2ab \leq 0$$ i.e. $$ab \geq 0$$ Hence, $a$ and $b$ must both be of the same sign.
