You can either rewrite as a first-order system or use TSSetI2Function (see
examples) with TSALPHA2.
https://urldefense.us/v3/__https://petsc.org/release/manualpages/TS/TSSetI2Function/*tsseti2function__;Iw!!G_uCfscf7eWS!a0HRe5m1TFfnxS6ZDGPkzSdsxgzubcDgMzFOPD-04IN5oE7gYM8QZnR9wcBCLVAWC47fej6mbRTAV
For a second-order differential problem defined as
M u_tt + C u_t + K u = F(t)
what would be the steps to solve this problem using TS?
P.S.: I already have the matrices M, C, and K implemented as Mat objects.