The singular-value decomposition of the first-order difference matrix