Solve $ \int_0^{\sqrt{\pi / 2}}\left(\int_x^{\sqrt{\pi / 2} }\sin(y^2) dy \right)dx$ I'm trying to solve this:
$$ 
\int_0^{\large\sqrt{\frac{\pi}{2}}}\left(\int_x^{\large\sqrt{\frac{\pi}{2}}}\, \sin y^2\, dy \right)dx
$$
But I'm having trouble with finding an primitive to $\sin(y^2)$. I got the tips to invert the order of the integrals but I fail to do that. (My try was to simply replace $x$ with $y$ and do the calculations). How to solve this?
 A: The region of integration $x<y<\sqrt{\frac{\pi}{2}}$ and $0<x<\sqrt{\frac{\pi}{2}}$ is corresponding to $0<x<y$ and $0<x<\sqrt{\frac{\pi}{2}}$, therefore
\begin{equation}
\int_0^{\large\sqrt{\frac{\pi}{2}}}\int_x^{\large\sqrt{\frac{\pi}{2}}}\, \sin y^2\, dy\ dx=\int_0^{\large\sqrt{\frac{\pi}{2}}} \sin y^2\int_0^y\, dx\ dy=\int_0^{\large\sqrt{\frac{\pi}{2}}} y\, \sin y^2\, dy
\end{equation}
Now set $u=y^2$.
A: Hint: What is the area of integration? You're integrating over the triangle bounded by the lines $y=0$, $x=\sqrt{\pi/2}$ and $y=x$. Try to reformulate the same integral with the integration order changed for the same triangle.
A: $\int_0^{\sqrt{\frac{\pi}{2}}}\int_x^{\sqrt{\frac{\pi}{2}}}\sin(y^2)~dy~dx$
$=\left[x\int_x^{\sqrt{\frac{\pi}{2}}}\sin(y^2)~dy\right]_0^{\sqrt{\frac{\pi}{2}}}-\int_0^{\sqrt{\frac{\pi}{2}}}x~d\left(\int_x^{\sqrt{\frac{\pi}{2}}}\sin(y^2)~dy\right)$
$=\left[x\int_x^{\sqrt{\frac{\pi}{2}}}\sum\limits_{n=0}^\infty\dfrac{(-1)^ny^{4n+2}}{(2n+1)!}dy\right]_0^{\sqrt{\frac{\pi}{2}}}+\int_0^{\sqrt{\frac{\pi}{2}}}x\sin(x^2)~dx$
$=\left[x\left[\sum\limits_{n=0}^\infty\dfrac{(-1)^ny^{4n+3}}{(2n+1)!(4n+3)}\right]_x^{\sqrt{\frac{\pi}{2}}}\right]_0^{\sqrt{\frac{\pi}{2}}}+\int_0^{\sqrt{\frac{\pi}{2}}}\dfrac{\sin(x^2)}{2}d(x^2)$
$=\left[x\left(\sum\limits_{n=0}^\infty\dfrac{(-1)^n\pi^{2n+\frac{3}{2}}}{2^{2n+\frac{3}{2}}(2n+1)!(4n+3)}-\sum\limits_{n=0}^\infty\dfrac{(-1)^nx^{4n+3}}{(2n+1)!(4n+3)}\right)\right]_0^{\sqrt{\frac{\pi}{2}}}-\left[\dfrac{\cos(x^2)}{2}\right]_0^{\sqrt{\frac{\pi}{2}}})$
$=\dfrac{1}{2}$
