# Convenient Order of Integration $\underset{R}{\int\int}x\cos(xy)\cos^{2}(\pi x)dA$

over the region $R=[0,1/2]\times[0,\pi]$.

The problem is supposed to show that changing the order of integration can make the problem really easy or really hard. $\int_{0}^{1/2}\int_{0}^{\pi}x\cos(xy)\cos^{2}(\pi x)dydx$ is easy to solve. $\int_{0}^{\pi}\int_{0}^{1/2}x\cos(xy)\cos^{2}(\pi x)dxdy$ is hard to solve.

However, I don’t think the second integral should be impossible to solve. It’s been so long since I’ve really dug into integration, and we tried in class and couldn’t find a quick way to solve the second integral. Any ideas?

For those who know calculus but not Multivariable Calculus, the hard part of the second integral is simply being asked to solve: $\int_{0}^{1/2}x\cos(cx)\cos^{2}(\pi x)dx$, where $c$ is simply a constant.

1. Michael Lugo says:
2. samjshah says:
@Michael: Ah, yes, at first I didn’t get what you meant, but then I realized you meant use $\cos(a)\cos(b)=\frac{1}{2}(\cos(a+b)+\cos(a-b))$ a couple times. I spent forever doing this, and it does seem to simplify things a bit. You also have to then use integration by parts to deal with $\int x\cos(kx) dx$. Then I stopped, but maybe I’ll finish it up later tonight to see if it does work out nicely.
3. Me says: $\cos(cx)\cos^2(\pi x) = \frac{1}{2} \cos(cx) [1 + \cos(2\pi x)] = \frac{1}{2} \cos(cx) + \frac{1}{4} [ \cos( (c - 2\pi) x) + \cos( (c+2\pi)x )]$. Now you get three integrands of the type $x \cos(ax)$ and use integration by parts (write out the general case and plug it in).