We study a second-order variational problem on the group of diffeomorphisms of the interval [0, 1] endowed with a right-invariant Sobolev metric of order 2, which consists in the minimization of the acceleration. We compute the relaxation of the problem which involves the so-called Fisher-Rao functional a convex functional on the space of measures. This relaxation enables the derivation of several optimality conditions and, in particular, a sufficient condition which guarantees that a given path of the initial problem is also a minimizer of the relaxed one. This sufficient condition is related to the existence of a solution to a Riccati equation involving the path acceleration.