The short answer is yes, depending upon the functional. I've had Lagrangians that include the second derivative.