What is this equation $\int f(g(t)) g'(t) dt = \int f(x) dx$ ?
I can understand a equation like $\int_\alpha^{\beta} f(g(t)) g'(t) dt = \int_{a}^{b} f(x) dx$ because both of the left hand side and the right hand side are real numbers.
I am confused.
$\int f(g(t)) g'(t) dt$ is a function whose derivative is $f(g(t)) g'(t)$.
$\int f(x) dx$ is a function whose derivative is $f(x)$.
If we wanna get a function $\int f(g(t)) g'(t) dt$ and $\int f(x) dx$ is easy to integrate, then $F(g(t))$ is what we want, where $F(x)$ is a $\int f(x) dx$.
I can understand this.
If we wanna get a function $\int f(x) dx$ and $\int f(g(t)) g'(t) dt$ is easy to integrate, then $F(g^{-1}(x))$ is what we want, where $F(t)$ is a $\int f(g(t)) g'(t) dt$. But what happens if $g^{-1}(x)$ doesn't exist?
It is more an identity than an equation, and must be accompanied by the substitution in use, $x=g(t)$.
$$\int f(g(t))\,g'(t)\,dt=\int f(g(t))\,dg(t)=\int f(x)\,dx=F(x)=F(g(t))$$
where $F$ is an antiderivative of $f$.
You could also invoke the chain rule directly,
$$\int f(g(t))\,g'(t)\,dt=F(g(t)).$$
The "trick" only works if the values taken by $x$ are the same as those taken by $f(t)$. In particular the endpoints of the integration domain must be matching, and if $g$ is not injective, you may have to decompose the domain in subdomains where it is.