Let us rewrite the inequality:
m2+2amn+an2≥m+an.
Bring all terms to one side:
m2+2amn+an2−m−an≥0.
Group terms:
m2−m+2amn+an2−an=(m2−m)+(2amn+an2−an).
Factor a in the last three terms:
(m2−m)+a(2mn+n2−n).
Note that 2mn+n2−n=n(2m+n−1), so:
(m2−m)+an(2m+n−1).
Now, since 0≤a≤1, the minimum occurs at a=0 or a=1.
First, check a=0:
m2−m≥0⟹m(m−1)≥0.
This is true for m≤0 or m≥1.
Now, check a=1:
m2−m+n(2m+n−1)=m2−m+2mn+n2−n.
Group terms:
m2+2mn+n2−m−n=(m+n)2−(m+n).
So, (m+n)2−(m+n)≥0⟹(m+n)(m+n−1)≥0.
This is true for m+n≤0 or m+n≥1.
Now, for 0<a<1, the expression is a convex combination of the two cases above, so the minimum is achieved at the endpoints a=0 or a=1.
Therefore, the inequality holds for all m,n if and only if m(m−1)≥0 and (m+n)(m+n−1)≥0.
But the problem asks for all m,n (no restriction), so let's check the minimum value.
Consider m=0:
02+2a⋅0⋅n+an2≥0+an
an2≥an⟹an(n−1)≥0.
Since a≥0, this is true for n≤0 or n≥1.
But for a=0, the inequality is 0≥0, always true.
For a>0, n(n−1)≥0.
Similarly, for m=1:
1+2an+an2≥1+an
2an+an2≥an
an+an2≥0⟹an(n+1)≥0.
Since a≥0, this is true for n≥0 or n≤−1.
But for a=0, always true.
Therefore, the inequality holds for all m,n if a=0 (trivially), and for a>0, for all m,n if and only if m(m−1)≥0 and (m+n)(m+n−1)≥0.
But the problem says 0≤a≤1 and asks for all m,n.
But for a=0, the inequality is m2≥m, i.e., m(m−1)≥0.
For a=1, the inequality is (m+n)2≥m+n, i.e., (m+n)(m+n−1)≥0.
So, for 0<a<1, the minimum is at a=0 or a=1.
Therefore, the inequality holds for all m,n if and only if m(m−1)≥0 and (m+n)(m+n−1)≥0 for all m,n, which is only possible if m is an integer and m≤0 or m≥1, and m+n≤0 or m+n≥1.
But the problem says "for all integers m and n". Let's check the original expression:
Let us complete the square:
m2+2amn+an2−m−an=m2−m+2amn+an2−an
=m2−m+an2+2amn−an
=m2−m+a(n2+2mn−n)
=m2−m+a((n+m)2−m2−n)
But perhaps a better approach is to consider the expression as a quadratic in m:
m2+2anm+(an2−m−an)
But this is messy.
Alternatively, consider the difference:
Let f(m,n)=m2+2amn+an2−m−an
Set m=k, n arbitrary.
Try m=0:
02+0+an2≥0+an⟹an2≥an⟹n2≥n for a>0.
This is true for n≤0 or n≥1.
Try m=1:
1+2an+an2≥1+an⟹2an+an2≥an⟹an+an2≥0⟹n(n+1)≥0 for a>0.
This is true for n≥0 or n≤−1.
Try n=0:
m2≥m⟹m(m−1)≥0.
So, for m≤0 or m≥1.
Try n=1:
m2+2am+a≥m+a⟹m2+2am≥m⟹m2+(2a−1)m≥0
For a=0, m2−m≥0⟹m≤0 or m≥1.
For a=1, m2+m≥0⟹m(m+1)≥0⟹m≥0 or m≤−1.
So, in all cases, the inequality holds for m≤0 or m≥1, n≤0 or n≥1, and m+n≤0 or m+n≥1.
Equality holds when a=0 and m=0 or m=1, or a=1 and m+n=0 or m+n=1.
In summary:
- The inequality holds for all integers m,n and 0≤a≤1.
- Equality holds if and only if either a=0 and m=0 or m=1, or a=1 and m+n=0 or m+n=1.