Trig substituion: what is the flaw in my logic?

Hi all,

I have a general question about trig substitution. My calculus book says if you ever have an expression dealing with Sqrt(a^2 - x^2), you let x =a Sin(theta), and from a constructing your triangle, you get that Cos(theta) = Sqrt(a^2 - x^2). Why is WRONG to switch Sine and Cosine here? For example, you could x be the adjacent side, Sqrt(a^2-x^2) be the opposite side, and a be the hyp, and you get:

x = a Cos(theta)

Sqrt(1-x^2) = a Sin(Theta).

And the triangle is still correct. But I tried working a problem this way and got the wrong answer. What is the deal?

Also, at the end of the integral, when you solve for Theta in terms of x, does it matter whether you use Arctan, Arcsin, or Arccos?

Thanks,

Tyler