Reproducing kernel method for PDE constrained optimization