Consider integral $\int_{0}^{\frac{\pi}{2}}\sin x\cos xdx$, I substitute $u=\sin x$, $\frac{du}{dx}=\cos x$, $du=\cos xdx$.
How can we prove last step, multiplying by $dx$. Everywhere I see everyone says it can be justified by differential forms. But how? Where can I read proof and not just sentence that it can be justified by differential forms?
That operation is the exterior derivative.
Essentially, a smooth function can be understood as a zero form. Then you have the exterior derivative which is an operator that takes $k-$forms into $(k+1)-forms$. In local coordinates (to avoid the generality) if $\omega = \sum_I a_Idx_I$ is a $k-$form where $a_I$ are smooth functions on a manifold, then its exterior derivative is $$d\omega = \sum_{j}\sum_I\frac{\partial a_I}{x_j}dx_j \wedge dx_I.$$
In your case, $f$ is a smooth function, hence a $0-$form on $\mathbb{R}$. So, $df = \frac{\partial f}{\partial x}dx$