Let
where does not depend on . Note that .
Result: The error is minimized (in the least-squares sense) by simply matching the first terms in the desired impulse response.
Optimal least-squares FIR filter:
Also optimal under any norm with any error weighting: