again, there may be a more basic reason i got a negative answer choosing 3pi/2 as the lower limit??,
3pi/2 is a larger angle than the upper limit of pi/2. Integration travels backwards (clockwise) around the circle = negative answer.
initially, x had the limits of 2 and -2, and choosing x/2=sin(theta) within the sqrt(1-(x/2)2).
Then the limits become values for theta satisfying 2/2=sintheta and -2/2=sintheta.
obviously pi/2 and -pi/2 work nicely.
after you convert sqrt(1-sin2) to cos (theta), both limits yield a positive cos.
however, if one again takes the initial 2/2=sintheta and -2/2=sintheta, but this time instead of pi/2 and -pi/2, one chooses 5pi/2 and 3pi/2., you again get a positive (correct) answer at the end.
this was my point. to get a positive (correct) answer, one needs to integrate in the positive direction we set by our coordinate system, counterclockwise in this case.
admittedly, 5pi/2 and 3pi/2 keeps one in quadrants 4 and 1 where cos is positive (after the limits change to 5pi and 3pi of course.)
so, my question is; do we get a positive answer because cos is positive during the range?, or do we get a positive answer because we are integrating counterclockwise, the positive direction of our coordinate system?
my quess is it is both.
your thoughts?
First, as I tried to emphasize initially, you are
not doing a coordinate change, so that is a misleading way to think about it. A substitution is not the same thing. Nothing here is going clockwise or counterclockwise. (If you were changing to polar coordinates, you would be integrating 2 from theta = 0 to pi. That is
not what you are doing when you substitute.)
Second, you
can integrate from a higher number to a lower number and get a positive result. Some substitutions work that way with no problem.
The main point is as I said, that in your substitution you assumed that sqrt(4 - x^2) was positive, so cos(theta) had to be positive
throughout the interval. You therefore must define the substitution so that will be true; choosing -3/2 pi does not accomplish that. This is the most basic way to look at it.
When you do a substitution, you must state exactly what it is. I usually write it in both directions, so that I know not only what x is for a given theta, but also what theta is for a given x:
x = 2 sin(theta)
theta = arcsin(x/2) [i.e. -pi/2 <= theta <= pi/2]
sqrt(4 - x^2) = sqrt(4 - 4 sin^2(theta)) = 2 sqrt(1 - sub^2(theta)) = 2 cos(theta) because theta is in quadrants 1 or 4.
dx = 2 cos(theta) dtheta
limits become:
x=-2 --> theta = arcsin(-1) = -pi/2
x=2 --> theta = arcsin(1) = pi/2
You weren't careful to define the relationship between x and theta fully, so you chose limits that were inconsistent with how you handled the square root.
Regardless of anything else that is happening, this is the "root cause" of the error. (Excuse the pun.)