Something very mysterious and unexplained happened in my calculus II class which is that the method of integration by substitution was presented in the language of differentials (which from my modest exposure to higher level math need to be defined and they haven't yet been).
While I understand that any function of the form $$\int f'(g(x)g'(x)$$ can be integrated as $f(g(x))$, I do not understand how substitution is used when the expression in the integral does not match the schema of $f'(g(x))g'(x)$.
The most readily available example (when I was researching this topic) I found here (Integration of sqrt Sin x dx) where they used $t^2 = \sin x$ as a substitution in $\int \sqrt{\sin(x)}$. Then they obtained that $dx = \frac{2t}{\sqrt{1-t^4}}$. I would think that this substitution cannot be made as there would need to be a $2t = 2\sqrt{\sin x}$ term in the original expression, corresponding to g'. It seems that the original expression can be algebraically manipulated so that even if a g' factor doesn't appear explicitly, it is effectively there. Why is this true: in my mind it is not consistent with the chain rule and I cannot find the intuition to justify it.