I know this is a basic substitution question but I haven't been able to figure it out. I often use trigonometric substitutions for integrands involving expressions such as $a^2-x^2$ and others. I have learnt to solve these by using the substitution, $x=a\,sin(u)$ and then the identity $cos^2(u)=1-sin^2(u)$.
However, I can't work out why I can use this substitution. How can the substitution $a\,sin(u)$ represent any possible real value of $x$, if $a$ is some given constant. For example, given $3^2-x^2$ I will use the substitution $x=3 \, sin(u)$ to represent the real number $x$. But, surely this means the number $x$ is limited to be $x \in [-a,a]$ rather than to be $x \in (- \infty, \infty)$?
I'm sure this is a very basic question and I must have missed something very obuvious. Any help would be much appreciated! Many thanks :)