Command for vector dot with some power

I'd probably do

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}    
L=\frac{1}{2} m \Dot{\vec{x}}^2     
\end{equation}
\end{document}

enter image description here

because the Lagrange function is a function of the square of the time derivative of x (and not the time derivative of the square of x).


The first or third option below may be close to what you're looking for. Or, switch from Newton-style to Leibniz-style notation for the derivative, as shown by the fourth option (newly fixed to incorporated @marmot's comment). A separate comment: to make the \frac{1}{2} term less visually dominant, consider using \tfrac instead of \frac.

enter image description here

\documentclass{article}
\usepackage{amsmath} % for \tfrac macro and general accent-placement support
\begin{document}
\[
\tfrac{1}{2}m \dot{\vec{x}} ^2     \quad
\tfrac{1}{2}m{\dot{\vec{x}}}^2     \quad
\tfrac{1}{2}m{\dot{\vec{x}}}^{\,2} \quad
\tfrac{1}{2}m\bigl(\tfrac{\mathrm{d}\vec{x}}{\mathrm{d}t}\bigr)^{\!2}
\]
\end{document}