Calculate $\frac{d}{dx}f(x)=\frac{d}{dx}(\int_0^xe^{-t^2}dt)^2$
So I thought of applying the leibniz integral rule:
$\frac{d}{dx}\int_{u(x)}^{o(x)}h(t,x)dt=o'(x)h(o(x),x)-u'(x)h(u(x),x)+\int_{u(x)}^{o(x)}\frac{\partial}{\partial x}h(t,x)dt$
So we got :
$u(x)=0 \Rightarrow u'(x)=0$
$o(x)=x \Rightarrow o'(x)=1$
$\frac{\partial}{\partial x}h(t,x)=\frac{\partial}{\partial x}(e^{-t^2})=0$
$h(o(x),x)=e^{-x^2}$
$h(u(x),x)=e^0=1$
Finally:
$\frac{d}{dx}\int_0^xe^{-t^2}dt=1\cdot e^{-x^2}- 0 \cdot 1 + \int_0^x0 dt=e^{-x^2}+const$
Now I'm not sure , whether just to quare the whole or to use product and chain rule,like:
$\frac{d}{dx}f(x)=\frac{d}{dx}(\int_0^xe^{-t^2}dt)^2=\frac{d}{dx}(\int_0^xe^{-t^2}dt\int_0^xe^{-t^2}dt)$