As I had solved the equation when $k=1$ in Quora and MSE by two methods, I started to investigate the equation for any real constant $k$: $$ \sin x+\cos x=k \sin x \cos x, $$
I first rewrite the equation as
$$ \sqrt{2} \cos \left(x-\frac{\pi}{4}\right)=\frac{k}{2} \sin (2 x) $$ Letting $ \displaystyle y=x-\frac{\pi}{4}$ yields $$ \begin{array}{l} \sqrt{2} \cos y=\frac{k}{2}\left(2 \cos ^{2} y-1\right) \\ 2 k \cos ^{2} y-2 \sqrt{2} \cos y-k=0 \end{array} $$ When $k\neq 0$, using quadratic formula gives
$$ \cos y=\frac{1 \pm \sqrt{1+k^{2}}}{\sqrt{2} k} $$
For real $y$, we have to restrict $\displaystyle \frac{1 \pm \sqrt{1+k^{2}}}{\sqrt{2} k}$ in $[-1,1]$. Then I found that
$$ -1 \leqslant \frac{1+\sqrt{1+k^{2}}}{\sqrt{2} k} \leqslant 1 \Leftrightarrow \quad|k| \geqslant 2 \sqrt{2} $$ and $$ -1 \leqslant \frac{1-\sqrt{1+k^{2}}}{\sqrt{2} k} \leqslant 1 \Leftrightarrow \quad k<0 \text { or } k>0 $$
Now we can conclude that
A. When $k\neq0$ $$x=n \pi-\frac{\pi}{4}$$
B. When $0\neq|k| \geqslant 2 \sqrt{2}, $ $$x=\frac{(8 n+1) \pi}{4} \pm \arccos \left(\frac{1\pm \sqrt{1+k^{2}}}{\sqrt{2} k}\right)$$
C. When $ 0 \neq|k|<2 \sqrt{2},$ $$ x= \frac{(8 n+1) \pi}{4} \pm \arccos \left(\frac{1-\sqrt{1+k^{2}}}{\sqrt{2} k}\right) $$
where $n\in Z.$
I am looking forward to seeing other methods to solve the equation.
Furthermore, how about $$a\sin x+b\cos x+c\sin x\cos x=0?$$
You can rationalize with the Weierstrass substitution, which gives
$$\frac{1-t^2+2t}{1+t^2}=k\frac{2t(1-t^2)}{(1+t^2)^2}$$ or
$$t^4-2(k+1)t^3+2(k-1)t-1=0.$$
The resolution of this quartic is difficult. https://www.wolframalpha.com/input/?i=t%5E4-2%28k%2B1%29t%5E3%2B2%28k-1%29t-1%3D0
The method works similarly for the generalized equation.