Mainly, what you think of as x[a] is not a field (it has support over
a 1-dimensional submanifold of your manifold) and it's also not
actually a vector (it is a collection of coordinates in some chart).
So DefTensor[ x[a], ... ] is actually not the right mathematical
structure for your question.
Some of the right structures do exist in xAct, but it doesn't look
like the play well with VarD.
The correct structure would be to have a one-dimensional manifold
(call it T since it measures coordinate time or proper time along the
world line) and a mapping gamma: T -> M which gives the trajectory of
the world line gamma in M. Using DefMapping[ gamma, {T, M} ] you
automatically get the tensor Tangentgamma[-A, a] where A is an index
in T. Then the appropriate Lagrangian is
L = Sqrt[ -g[-a,-b] (ddt[A] Tangentgamma[-A,a]) (ddt[B] Tangentgamma[-B,a]) ]
where ddt[A] is a vector on T.
However, there isn't really any more progress that can be made with
xAct, since it's not set up to do variational derivatives where what
you are varying is a *map*. (Or at least ... I don't see a way to get
it to do what you want).
Cheers
Leo
As already pointed out by Edu and Leo, xTensor is not well oriented
towards this problem because xTensor works with fields on the whole
manifold, and not with values of that field at a given point. And that is
what you need, fields at the particle point. The technical name of this is
"field along a map" (the embedding map mentioned by Leo), and xTensor does
not support those natively.
However, with enough tweaking xTensor can do anything. I attach a notebook
in which the geodesic equation is derived. Essentially the idea is to
teach xTensor what variational derivatives are with a parametric
derivative and what the parametric derivative of the metric is. Note that
I use OverDot instead of ParamD for simplicity.
Cheers,
Jose.