  We consider quasi-linear, Hamiltonian perturbations of the cubic
Schr\"odinger and of the cubic (derivative) Klein-Gordon equations on the $d$
dimensional torus. If $\varepsilon\ll1$ is the size of the initial datum, we
prove that the lifespan of solutions is strictly larger than the local
existence time $\varepsilon^{-2}$. More precisely, concerning the Schr\"odinger
equation we show that the lifespan is at least of order $O(\varepsilon^{-4})$,
in the Klein-Gordon case, we prove that the solutions exist at least for a time
of order $O(\varepsilon^{-{8/3}^{-}})$ as soon as $d\geq3$. Regarding the
Klein-Gordon equation, our result presents novelties also in the case of
semi-linear perturbations: we show that the lifespan is at least of order
$O(\varepsilon^{-{10/3}^-})$, improving, for cubic non-linearities and
$d\geq4$, the general results in [17,24].
