Q:

Math, how do we know if a substitution is true?

For instance, in calculus we often do u-substitutions.  Quite often, we do trignometric substitutions to solve integrals.  For instance, if we have the following relation
$y=\sqrt{1-x^2}$
And we substitute $x = \sin u$, for $x \in [-1, 1]$; how do we know that our substitution is correct? If I graph $\sin u$ and $x$, it is clear these functions are very different.
How is there any relation at all? Why are we allowed to do substitutions like this?

A:

Suppose we need to calculate the Riemann integral
$$I=\int_{a}^{b}f(x)dx$$
where $f\in{\cal{R}}[a,b]$, id est, Riemann integrable on $[a,b].$
and there is a function $\phi(t)$ which is well defined on $[\alpha,\beta]$ such that:
1). $\phi([\alpha,\beta])=[a,b]$
2). $\phi(t)$ is always monotonic for all $t\in[\alpha,\beta]$
3). $\phi'(t)\in\cal{R}[\alpha,\beta]$
Hence we can substitute $x$ with $\phi(t)$ and the integral can be calculated as follows:
$$I=\int_{a}^{b}f(x)dx=\int_{\alpha}^{\beta}(f\circ\phi)(t)\phi'(t)dt$$
Only when three two requisites are met can we substitute $x$ with $\phi(t)$.The first two requisites make sure that  $\phi:t\rightarrow x$ is one-on-one mapping, and the third guarantees the Riemann integrability of the new function $(f\circ\phi)(t)\phi'(t)$.

A:

In the case of $u$-substitution you are setting $\sin(u)$ equal to $x$, forcing it to be true. The graph of $\sin(u)$ and $x$ look different because you aren't really graphing $\sin(u)$, you are graphing $\sin(x)$ instead (It is the $x$-axis). $\sin(x)=x$ is clearly a false identity. If you want to graph $\sin(u)$ on an $x$-axis, you can substitute '$u$' with $\arcsin(x)$, and then clearly the graph of $\sin(\arcsin(x))$ is just $x$ (For $[-1,1]$ at least). In this case, by defining $u$ to follow the relationship of $\sin(u)=x$, you can also substitute the $dx$ and make an integral easier to integrate. As for "how do we know that our substitution is correct?", the equal sign in this case does not signify "Are these things equal" as in solving systems of equations, but rather the equal sign signifies "I am defining $u$ such that this equation is true". In programming you can differentiate between the two types of equality with := (definition) and == (asking if they are equal).

