limit of an integral divided by tan What is $$\lim_{x\to0}\frac{1}{\tan(x)}\int_{x}^{\sin2x}(1+\sin(t))^{1/t}dt$$?
The integrand should be $e$, but I don't know how $\tan x$ connects to that.
 A: The integrand is continuous everywhere, so its primitive function, say $\;F(x)\;$ ,  is derivable, and we have
$$\int_x^{\sin2x}\left(1+\sin t\right)^{1/t}dt=F(\sin2x)-F(x)$$
and thus we can write our limit as follows (and use l'Hospital rule!):
$$\lim_{x\to0}\frac{F(\sin2x)-F(x)}{\tan x}\stackrel{\text{l'H}}=\lim_{x\to0}\frac{2\cos2xF'(\sin2x)-F'(x)}{\frac1{\cos^2x}}=\lim_{x\to0}\left(2\cos^2x\cos2x\left(1+\sin\sin2x\right)^{\frac1{\sin2x}}-\cos^2x\left(1+\sin x\right)^{1/x}\right)\;\;\color{green}{(**)}$$
Now:
$$\left(1+\sin\sin2x\right)^{\frac1{\sin2x}}=\exp\left(\frac{\log(1+\sin\sin2x)}{\sin2x}\right)\xrightarrow[x\to0]{}e$$
since
$$\lim_{x\to0}\frac{\log(1+\sin\sin2x)}{\sin2x}\stackrel{\text{l'H}}=\lim_{x\to0}\frac{\color{red}{2\cos2x}\cos\sin2x}{\color{red}{2\cos2x}(1+\sin\sin2x)}=\frac11=1\;,$$
and also
$$\lim_{x\to0}\frac{\log(1+\sin x)}x\stackrel{\text{l'H}}=\lim_{x\to0}\frac{\cos x}{1+\sin x}=1$$
So we finally get that the limit $\;\color{green}{(**)}\;$ equals
$$\color{green}{(**)}=\left(2\cdot1^2\cdot1\cdot e-1^2\cdot e\right)=e$$
A: Hint:
Intuitively (this is not a rigorous answer), you can replace the trigonometric functions by their linear approximation, as there is no cancellation of these terms.
$$\lim_{x\to0}\frac{1}{\tan(x)}\int_{x}^{\sin2x}(1+\sin(t))^{1/t}dt=\lim_{x\to0}\frac{1}{x}\int_{x}^{2x}(1+t)^{1/t}dt.$$
Letting $F(t)$ be the antiderivative of the integrand,
$$\lim_{x\to0}\frac1x\left.F(t)\right|_{t=x}^{2x}=\lim_{x\to0}\frac{F(2x)-F(0)-F(x)+F(0)}x=\lim_{x\to0}2F'(2x)-F'(x).$$
Hence the requested limit is $e$.
