I'm trying to read a book on classical mechanics, and I'm having a hard time trying to know what exactly is a virtual displacement, sometimes called a variation. In the Lagrangian "formalism" the differential forms $dx$ are changed by "virtual displacements" and noted by $\delta x$. As far as I understand the unique difference between $dx$ and $\delta x$ is that $\delta x$ doesn't depends on time, that is, $\delta x$ is a purely spatial differential form.
However in a book of classical mechanics I see that $\delta \dot q$ can be "integrated" respect to $dt$ to give $\delta q$, what makes no sense if $\delta q$ will be a differential form. So, I would like to know a precise and very formal definition of some expression like $\delta x$. I tried to find such formal (mathematically rigorous) definition in many books of mechanics or differential geometry but I could not find one, so I would appreciate some reference or explanation.
I found an answer that fit my doubts. If we have a manifold $M\times \mathbb{R}$ and a coordinate system $\varphi :=(q_1(t),\ldots ,q_n(t),\dot q_1(t),\ldots ,\dot q_n(t),t)$ then we can set $\delta p:=i^*dp$ where $i:M\times \{t_0\}\to M\times \mathbb{R}$ for every coordinate $p$. This is what I assumed from first place. However in a book I see written something like
$$ \int_{t_1}^{t_2}\frac{\partial L}{\partial \dot q_k}\delta \dot q_k\,d t=-\int_{t_1}^{t_2}\delta q_k \frac{d}{d t}\left(\frac{\partial L}{\partial \dot q_k}\right)\,d t\tag1 $$
This confused me a lot, however if we think as $\delta p$ as above then we dont need to introduce an extraneous $d t$ in the integral, because we will have $\delta \dot q=\ddot q\,d t$ and we just can write $$ \int_{t_1}^{t_2}\frac{\partial L}{\partial \dot q_k}\delta \dot q_k=-\int_{t_1}^{t_2}\frac{d}{d t}\left(\frac{\partial L}{\partial \dot q_k}\right)\delta q_k\tag2 $$
assuming that the $dt$ in the expression $\delta \dot q=\ddot q\,d t$ is the differential form on the cotangent bundle in the domain of $\psi :\mathbb{R}\to M\times \{t_0\}$, where $\psi :=(q_1(t),\ldots ,q_n(t),\dot q_1(t),\ldots ,\dot q_n(t),t_0)$. By now this is the best theoretical setting that I've found to understand the notion of "virtual displacement" given in books of classical dynamics.
This is almost the same idea shown here.