What causes SMPS voltage ripple?
I suspect the equation is a second order (since the derivative of the
  capacitors voltage depends on the derivative of the inductor current)


This is fundamental to understanding the ripple voltage. The inductor and capacitor form a 2nd order low-pass filter with an input that can be assumed to be a square wave of variable duty cycle to accomodate load and incoming supply variations.

Given that the inductor and capacitor have a natural resonance significantly below the switching frequency (maybe at one tenth) you can expect that the 1st fundamental of the square wave to be attenuated by 40 dB because a 2nd order low-pass filter attenuates at 40 dB per decade.

So if the square wave (switching waveform) was 12 volts p-p then the fundamental would be reduced by 40 dB to 120 mV p-p and the harmonics reduced even more.

If the switching frequency is 100 times the LC natural frequency then the 12 volts p-p is attenuated by 80 dB to 1.2 mV p-p. However, there is a trade-off - to obtain maximum dynamic control when dealing with load current variations, it is desirable to have the LC natural frequency as high as possible so it's a compromise.

With capacitive ESR the attenuation of the LC filter will not continue at 40 dB/decade but will eventually turn into 20 dB/decade as the LC becomes an LR single order low-pass filter.