Only if the OP had said so and he didn't. The use of theta doesn't automatically mean we're using polar coordinates and, deducing from the question, there's no a priori relation between theta and x. In fact, it'd be rather odd to have a problem with x and theta: if we already changed coordinates, what's x doing there? Why wasn't it changed into r cos(theta)? And why does the OP explicitly asks for the integral wrt x if he already changed to polar coordinates? Anyway, that's something for the OP to clear out and not for us, imo. I assumed that theta and x are independient and under this understanding my answer is, I think, correct. If the OP meant something else he should write it down clearly.