# integration with trig function

I am trying to do some practice problem to which there aren't any posted solutions and since I am stuck I thought I should ask for help.

$$\iint_R\cos\left(\frac\pi 2x^2\right)\,dx\,dy,$$ where $R$ is the triangle enclosed by the line $y=x$, the vertical line $x=1$ and the $x$-axis.

How I set this integral up is:

$$\int_0^1\int_y^1\cos\left(\frac\pi 2x^2\right)\,dx\,dy,$$

dy upper limit -> 1 dy lower limit -> 0

then once I integrated with respect to $x$ I got $\cfrac{\sin\left(\frac\pi 2x^2\right)}{\pi x}$ which gets messy once you plug in upper and lower limit of $x$. The part I am stuck at is how to proceed with integrating with respect to $y$...

-

Hint: Integrate first with respect to $y$. Nothing much happens: when you do the usual substitution of endpoints, you get $x\cos\left(\dfrac{\pi x^2}{2}\right)$.
Then integrate with respect to $x$. There is an obvious substitution $u=\dfrac{\pi x^2}{2}$.
Yes, your integration of $\cos(\pi x^2/2)$ was not right. You can check by differentiating. In fact the integration of $\cos(\pi x^2/2)$ is "impossible" (in terms of elementary functions). But you will I hope find the integration of $x\cos(\pi x^2/2)$ easy, letting $u$ be as suggested in the answer. – André Nicolas Dec 7 '12 at 0:31