Optimization of distributed systems in Lebesgue space