Elliptic partial differential equation and optimal control