Pmin={10,30,40};
Pmax={150,300,400};
a0={5,2,14};
a1={0.1,0.08,0.06};
a2={0.001,0.004,0.0007};
Pzadane=438;
podminkaZatizeni=P1+P2+P3==Pzadane;
podmMin=Thread[{P1,P2,P3}≥Pmin];
podmMax=Thread[{P1,P2,P3}≤Pmax];
pecka={P1,P2,P3};
nakl[i_]:=a0[[i]]+pecka[[i]]*a1[[i]]+((pecka[[i]])^2)*a2[[i]];
naklady=Plus@@nakl/@Range[3];
celkem=Join[{naklady},{podminkaZatizeni},podmMax,podmMin];

NMinimize[{21+0.1` P1+0.001` (P1^2)+0.08` P2+0.004` (P2^2)+0.06` P3+0.0007` (P3^2),P1+P2+P3==Pzadane&&P1≤150&&P2≤300&&P3≤400&&P1≥10&&P2≥30&&P3≥40},{{P1,10,20},{P2,10,20},{P3,10,20}}]