Derivation of the integral 
Evaluate
  $$\large\frac{d}{dx}\int_{0}^{\large\int_0^{e^x}{\cos (s)\,\mathrm  ds}}\sec(t^2)\,\mathrm dt$$

I got the answer to be $$e^x\cdot\sec(\sin^2(e^x))\cdot \cos(e^x)$$ but do not know if this is correct and if not some suggestions? 
 A: It is 
$$ [ \tan(\int_0^{e^{x^2}}\cos sds)]' =  [ \tan(\sin e^{x^2})]'$$

 $$\sec^2(\sin e^{x^2})  \cdot \cos e^{x^2}  \cdot e^{x^2} \cdot  (2x)  $$

Can you proceed from here?
A: Let us consider first $$F(x)=\int_0^{a(x)}f(t)dt$$ The fundamental theorem of calculus says that $$\frac{dF(x)}{dx}=\frac{d}{dx}\int_0^{a(x)}f(t)dt=f\big(a(x)\big) a'(x)$$ So, for the case considered here $$a(x)=\int_0^{e^x}\cos(s)ds=\sin \left(e^x\right)$$ $$a'(x)=e^x \cos \left(e^x\right)$$ and since $$f(t)=\sec(t^2)$$ combining all pieces lead to $$\frac{dF(x)}{dx}=e^x \cos \left(e^x\right) \sec \left(\sin ^2\left(e^x\right)\right)$$ which is identical to the answer given in the post.
A: Take $f'(t)=\sec(t^2)$ and $g'(s)=\cos(s)$. Then by the fundamental theorem of calculus,
$$\frac{d}{dx}\int_{0}^{\large\int_0^{e^x}{\cos (s)\,\mathrm  ds}}\sec(t^2)\,\mathrm dt=\frac{d}{dx}{\int_0^{\large\int_0^{e^x}g'(s)\,\mathrm ds}}f'(t)\,\mathrm dt$$
$$=\frac{d}{dx}\int_0^{g(e^x)-g(0)}f'(t)\mathrm \,dt=\frac{d}{dx}\left(f\,(g(e^x)-g(0)\,)-f(0)\,\right)$$
$$=f'(g(e^x)-g(0))g'(e^x)e^x=\sec(\sin^2(e^x))\cos(e^x)e^x$$
A: $$\frac{d}{dx}\int_0^{\int_0^{e^x}\cos(s)ds} \sec(t^2)dt=\sec(\sin^2e^x)\frac{d}{dx}{\sin^2e^x}=\sec(\sin^2e^x).(\sin2e^x)e^x$$
