= Solution
Let $F(a)$ be the given <integral>. Its integrand extends continuously to $x=0$, with value $a$. The <Leibniz integral rule> includes both the moving upper endpoint and the <derivative> of the integrand. For $a\ne0$ it gives
$$
F'(a)=2a\frac{\sin(a\cdot a^2)}{a^2}+\int_0^{a^2}\cos(ax)\,dx=\frac{2\sin(a^3)}a+\frac{\sin(a^3)}a.
$$
Consequently
$$
\boxed{F'(a)=\begin{cases}3\sin(a^3)/a,&a\ne0,\\0,&a=0.\end{cases}}
$$
The zero case follows directly from $F(a)=a^3+O(a^9)$ near zero: expand $\sin(ax)/x=a+O(a^3x^2)$ and integrate up to $a^2$. Equivalently, the <change of variables> $t=ax$ gives $F(a)=\int_0^{a^3}(\sin t)/t\,dt$, whose <derivative> is the same expression, interpreted continuously at zero. This substitution works for negative $a$ as an oriented <integral> too.
Back to article page