Let ∫cot−1(ex)exdx=I
Substitue ex=t and exdx=dt
Therefore
I=∫cot−1(t)t2dt
Integrating it by part, taking cot−1(t) as first function and t2 as second function, we get
I=−cot−1(t)t−∫1t(t2+1)dt∫1t(t2+1)dt=Pt2=u,2tdt=duP=12∫1u(u+1)du=12∫(1u−1(u+1))du=12(logu−logu+1)+CI=−cot−1(t)t−12(log|u|−log|u+1|)+C=12(log∣∣t2+1∣∣−log∣∣t2∣∣−2cot−1(t)t)+C=12(log∣∣e2x+1∣∣−log∣∣e2x∣∣−2cot−1(ex)ex)+C=12log∣∣e2x+1∣∣−cot−1(ex)ex−x+C