Derivation of the Epanechnikov kernel

181 Views Asked by At

I am trying to solve the following optimization problem for $K$:

$$\min \int_{-\infty}^{\infty}K^2(u)\text{ d}u$$ subject to the following: $$K \geq 0\text{, } \int_{-\infty}^{\infty}K(u)\text{ d}u = 1\text{, } \int_{-\infty}^{\infty}uK(u)\text{ d}u = 0\text{, } \int_{\infty}^{\infty}u^2K(u)\text{ d}u = a^2 < \infty\text{.}$$

Apparently the solution is $$K(u) = \dfrac{3}{4}(1-u^2)\mathbb{I}_{[-1, 1]}(u)$$ where $\mathbb{I}_{[-1, 1]}(u) = 1$ if $u \in [-1, 1]$ and $\mathbb{I}_{[-1, 1]}(u) = 0$ otherwise.

Also, apparently this is done through Lagrange multipliers. I'm guessing on how to do this, but my guess is that it's some thing like the following: let

$$\varphi(K, \lambda_1, \lambda_2, \lambda_3) = \int_{-\infty}^{\infty}K^2(u)\text{ d}u + \lambda_1\left(\int_{-\infty}^{\infty}K(u)\text{ d}u - 1 \right) + \lambda_2\int_{-\infty}^{\infty}uK(u)\text{ d}u + \lambda_3\left(\int_{\infty}^{\infty}u^2K(u)\text{ d}u - a^2\right)\text{.}$$ Setting the partials $\dfrac{\partial \varphi}{\partial \lambda_k} = 0$ gives the constraints. I'm not sure how to deal with $\dfrac{\partial \varphi}{\partial K}$ (if that's even a thing), since $K$ isn't really a variable in the traditional sense - it's a function. So this implies to me that we need something from the Calculus of Variations, which I don't know much about.