TITLE: How do you integrate $\int e^x \cot(x)dx$
QUESTION [4 upvotes]: I originally was to evaluate
  $$
\int \frac{e^{\arctan\left(\sqrt{x}\right)}}{\sqrt{x}+x\sqrt{x}} \ dx
$$

So i took $t = \arctan \sqrt{x}$ and then, $\frac1{1+x} = \frac{dt}{dx}$ and $\tan t= \sqrt x$. I plugged this in and ended up with the following integral
$$
\int e^x\cot x\,dx
$$
I tried integration by parts, but couldn't make it work.
I'm only an undergrad. Could you please suggest a method which I can use?

REPLY [5 votes]: Your calculation is wrong. The integral of $e^x\cdot\cot(x)dx$ is not elementary.
But, the integral you started does have an antiderivative. 
$$\frac d{dx}(\arctan(\sqrt x))=\frac12\cdot\frac1{x^{\frac12}+ x^{\frac32}}.$$
So when $t=\arctan(\sqrt x)$, the integral becomes $2e^t dt$, so the final antiderivative is $$2e^t+C=2e^{\arctan(\sqrt x)} + C.$$
{"set_name": "stack_exchange", "score": 4, "question_id": 3486625}