= Solution
The <Leibniz integral rule> accounts for both the moving upper endpoint and the integrand's dependence on $a$:
$$
\boxed{I'(a)=f(a,a)+\int_0^a\frac{\partial f}{\partial a}(x,a)\,dx}.
$$
For the specified integrand this gives $I'(a)=e^{-a^2}-\int_0^ax e^{-ax}\,dx$. When $a\ne0$, <integration by parts> gives
$$
\int_0^ax e^{-ax}\,dx=-e^{-a^2}+\frac{1-e^{-a^2}}{a^2},
$$
so
$$
\boxed{I'(a)=2e^{-a^2}-\frac{1-e^{-a^2}}{a^2}\quad(a\ne0)}.
$$
For the requested independent check, direct integration gives $I(a)=(1-e^{-a^2})/a$ at $a\ne0$. Its <derivative> is $[2a^2e^{-a^2}-(1-e^{-a^2})]/a^2$, agreeing with the result above. At zero the apparent singularity is removable: $I(a)=a-a^3/2+O(a^5)$, so $\boxed{I(0)=0,\ I'(0)=1}$.
Back to article page