Help in finding $\int \frac{x+x\sin x+e^x \cos x}{e^x+x\cos x-e^{x} \sin x} dx$
Note the law of equal peopoetions, we have: $$\frac{1+\sin x}{\cos x}=\frac{\cos x}{1-\sin x} \implies \frac{x(1+\sin x)}{x \cos x}=\frac{e^x \cos x}{e^x-e^x \sin x}=\frac{x+x\sin x+e^x \cos x}{x\cos x+ e^{x}-e^{x} \sin x}$$ So $$\int \frac{x+x\sin x+e^x \cos x}{e^x+x\cos x-e^{x} \sin x} dx= \int \frac{\cos x}{1-\sin x}dx=-\ln (1-\sin x)+C$$
Hint:
For $1+\sin x\ne0,$
the denominator
$$=e^x(1-\sin x)+x\cos x$$
$$=\dfrac{e^x\cos^2x+x\cos x(1+\sin x)}{1+\sin x}$$
$$=\dfrac{\cos x}{1+\sin x}\cdot (e^x\cos x+x(1+\sin x))$$
Can you recognize the numerator as a multiplicand?