Suppose we are given an integral of the form $\int f(x) dx$ with $f(x)$ defined on $[a;b]$.
We can then use inverse substitution using a function $g(t)$ defined over an interval $[\alpha;\beta]$ such that $g(\alpha) = a$ and $g(\beta) = b$. Also it makes the substitutation easier if $g(t)$ is one-to-one such that $g(t)^{-1}$ exists.
Then $\int f(x) dx = F(x) = \int f(g(t))g^{'}(t) dt = F(g(t))$. So we have $F(g(t))$ as an anti-derivative of $f(x)$ with respect to the change of variable $x$ to $g(t)$. Since $g(t)$ is continous it has image $g([\alpha;\beta]) = [a;b]$, so we can evaluate $F(g(t))$ for any two points in the original interval $[a;b]$ to get values for $F(x)$ by using appropriate values for $t \in [\alpha;\beta]$, so indeed $F(g(t))$ is an anti-derivative of $F(x)$ with respect to the variable $x = g(t)$.
Now since we are dealing with an indefinite integral we must return the the original variable. We want an integral with $x$ instead of $t$, so we use the identity $x = g(t)$. In other words we are returning the original interval $[a;b]$. Then setting $g(t) = a/2$ yields $t = g^{-1}(a/2)$ so removal of terms involving $g(t)$ and $t$ in our integral $F(g(t))$ are trivial.
Please correct me if I am wrong about any of this.
In the case of trig substitution of the form $x = \sin(\theta)$ substitution back the the original integral involving $x$ is easy when terms are involving $\theta$ are trivial. However terms like $\cot(\theta)$ becomes much more difficult. I understand that using trig identities allow us to express $\cot(\theta)$ in terms of $x$, however I don't see why we can draw a right triangle with $\theta$ as the angle and then just divide two sides to get $\cot(\theta)$ in terms of $x$. Could someone explain why this is possible and right to do ?
Thanks
Below I have attached an image for reference:
In this case we know that $sin(\theta) = x/3$. Why does this imply we can draw a triangle with side $\sqrt{9 - x^2}$ ? I see for any value of $\theta$, $x$ must be in proportion for the identity $sin(\theta) = x/3$ to be true.