có x+y=2021=>y=2021-x
=>x.y=x(2021-x)=2021x-\(x^2\)
=>P=2021x-\(x^2\)
=> -P=\(x^2-2021x\)\(=x^2-2.\dfrac{2021}{2}.x+\left(\dfrac{2021}{2}\right)^2-\left(\dfrac{2021}{2}\right)^2\)=\(\left(x-\dfrac{2021}{2}\right)^2-\left(\dfrac{2021}{2}\right)^2\)
lại có x,y nguyên dương=>x,y\(\ge\)1
có x+y=2021=>x,y\(\le\)2020
=>\(x\le2020\)
=>\(x-\dfrac{2021}{2}\le2020-\dfrac{2021}{2}\)
<=>\(\left(x-\dfrac{2021}{2}\right)^2\le\left(\dfrac{2019}{2}\right)^2\)
=>\(\left(x-\dfrac{2021}{2}\right)^2-\left(\dfrac{2021}{2}\right)^2\le\)\(\left(\dfrac{2019}{2}\right)^2-\left(\dfrac{2021}{2}\right)^2=-2020\)
<=>\(-P\le-2020< =>P\ge2020\)
dấu = xảy ra \(\Leftrightarrow\left\{{}\begin{matrix}x=2020\\x=1\end{matrix}\right.\)
vậy MIN P=2020 khi x=2020 hoặc x=1
bổ sung đoạn cuối dấu với x=2020 thì y=1
với x=1 thì y =2020