How to find integral $\int e^{\cos (x)}(x \sin (x) + \csc(x)\cot(x))dx$ ?
I tried using the formula $\int e^{g(x)}(f(x)g'(x)+ f'(x))dx=e^{g(x)}f(x)$ but that is not working.Help!
How to find integral $\int e^{\cos (x)}(x \sin (x) + \csc(x)\cot(x))dx$ ?
I tried using the formula $\int e^{g(x)}(f(x)g'(x)+ f'(x))dx=e^{g(x)}f(x)$ but that is not working.Help!
On
$$I=\int e^{\cos (x)}(x \sin (x)+\csc(x)\cot(x))dx=\int e^{\cos (x)}x \sin (x)dx+\int e^{\cos (x)}\frac{\cos{x}}{\sin^{2}x}dx$$
Now notice that $$\int e^{\cos (x)}\frac{\cos{x}}{\sin^{2}}dx=\int e^{\cos (x)}d(-\frac{1}{\sin{x}})=-\frac{e^{\cos{x}}}{\sin{x}}-\int e^{\cos (x)}dx,$$ where we used partial integration.
Therefore, $$I=-\frac{e^{\cos{x}}}{\sin{x}}+\int e^{\cos (x)}(x \sin (x)-1)dx.$$ Since $$d(x e^{\cos{x}})=e^{\cos{x}}-x\sin{x}e^{\cos{x}}$$ and $$\int e^{\cos (x)}(x \sin (x)-1)dx=-\int d(x e^{\cos{x}})=-x e^{\cos{x}}+C,$$ we finally have $$I=-\frac{e^{\cos{x}}}{\sin{x}}-xe^{\cos{x}}+C.$$
Hint:
$e^{\cos (x)}(x \sin (x) + \csc(x)\cot(x)) \\ = e^{\cos (x)}(x \sin (x) -1 + 1+ \csc(x)\cot(x)) \\ = e^{\cos (x)}(x \sin (x) - 1 + \sin(x) \csc(x)+ \csc(x)\cot(x)) \\= e^{\cos (x)}(x \sin (x) - 1) + e^{\cos (x)}(\sin(x) \csc(x)+ \csc(x)\cot(x))$
Caution: sign of the derivative of $\cos x$