Using Total Variation Denoising to Clean Accelerometer Data
Apart from Total Variation Denoising you could try a first much simpler approach: a median-filter. You just move a window along your data and replace the current input value by the median of all data in the window. You just have to optimize the window length (by experimenting).

By the way, the equations you copied into your question are for 2-dimensional data, but your data are 1-D.