Second derivative of measured function is PDF of hidden RV

If s is a GP, I’m not sure if there’s a logp available that you could use. With any standard distribution it should be fine. But I’m also not sure if I’m following your steps correctly, so I guess just try it out.

For the integral the discretization and a corresponding (cum)sum are the best candidates I can think of at this point.