# How do you integrate $\int e^x \cot(x)dx$

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?

• What makes you think there is an analytical way to integrate in terms of basic functions? Do you possibly mean $\int e^x \cos x dx$ and not $\int e^x \cot x dx$? – gt6989b Dec 24 '19 at 19:08
• I don't think this has an elementary anti-derivative. So none of your calculus techniques are going to work. If this is really a definite integral, tell us the limits. There might be a trick. – B. Goddard Dec 24 '19 at 19:09
• For what its worth, mathematica says the antiderivative of $e^x\cot(x)$ is $\left(-\frac{2}{5}-\frac{i}{5}\right) e^x \left((1+2 i) \, _2F_1\left(-\frac{i}{2},1;1-\frac{i}{2};e^{2 i x}\right)+e^{2 i x} \, _2F_1\left(1,1-\frac{i}{2};2-\frac{i}{2};e^{2 i x}\right)\right)$ – QC_QAOA Dec 24 '19 at 19:11
• Well, just note that $\left( \arctan \sqrt x\right)=\frac12\frac{1}{\sqrt x+x\sqrt x}$. So the original integral is: $$2\int e^{\arctan \sqrt x} (\arctan \sqrt x)'dx=2e^{\arctan \sqrt x}+C$$ – Zacky Dec 24 '19 at 19:28
• Don't forget about the chain rule. – Zacky Dec 24 '19 at 19:31

Your calculation is wrong. The integral of $$e^x\cdot\cot(x)dx$$ is not elementary.
$$\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.$$