Find all functions $f:\mathbb{N}\to \mathbb{N}$ so that for every natural numbers $m,n$ :$f(n)+2mn+f(m)$ is a perfect square.
1. **Claim**: The only solutions are \( \boxed{f(n) = (n + 2\ell)^2 - 2\ell^2} \) for some integer \(\ell \geq 0\).

2. **Verification**: We need to show that this function works. For any \(m, n \in \mathbb{N}\), we have:
   \[
   f(n) + 2mn + f(m) = (n + 2\ell)^2 - 2\ell^2 + 2mn + (m + 2\ell)^2 - 2\ell^2
   \]
   Simplifying, we get:
   \[
   (n + 2\ell)^2 + 2mn + (m + 2\ell)^2 - 4\ell^2 = n^2 + 4n\ell + 4\ell^2 + 2mn + m^2 + 4m\ell + 4\ell^2 - 4\ell^2
   \]
   \[
   = n^2 + 2mn + m^2 + 4n\ell + 4m\ell + 4\ell^2
   \]
   \[
   = (n + m + 2\ell)^2
   \]
   which is a perfect square. Thus, the function \(f(n) = (n + 2\ell)^2 - 2\ell^2\) works.

3. **Assertion**: Let \(P(a, b)\) denote the assertion \(f(a) + 2ab + f(b) = x^2\).

4. **Step 1**: Consider \(P(a, n+1)\) and \(P(a, n)\):
   \[
   P(a, n+1) \implies f(a) + 2a(n+1) + f(n+1) = x^2
   \]
   \[
   P(a, n) \implies f(a) + 2an + f(n) = y^2
   \]
   Subtracting these, we get:
   \[
   (f(n+1) - f(n)) + 2a = x^2 - y^2
   \]
   \[
   \implies (f(n+1) - f(n)) + 2a = (x - y)(x + y)
   \]
   For \(\pmod{4}\) reasons, \(f(n+1) - f(n)\) must be odd.

5. **Step 2**: Let \(f(2) - f(1) = 2k + 1\). Choose \(a\) such that \(2a + 2k + 1 = p\), where \(p\) is an odd prime.

6. **Step 3**: Consider:
   \[
   f(a) + 4a + f(2) = u^2
   \]
   \[
   f(a) + 2a + f(1) = v^2
   \]
   We must have:
   \[
   u = \frac{p+1}{2}, \quad v = \frac{p-1}{2}
   \]
   Hence:
   \[
   P(a, 2) \implies f(a) + 4a + f(2) = \left(\frac{p+1}{2}\right)^2 = (a + k + 1)^2
   \]
   \[
   \implies f(a) = (a + (k-1))^2 + (k+1)^2 - (k-1)^2 - f(2)
   \]
   \[
   \implies f(a) = (a + b)^2 + c
   \]
   where \(b = k-1\) and \(c = (k+1)^2 - (k-1)^2 - f(2)\).

7. **Step 4**: For infinitely many \(a\), we have:
   \[
   f(a) = (a + b)^2 + c
   \]
   Consider \(P(a, a)\):
   \[
   2((a + b)^2 + c) + 2a^2 = x^2
   \]
   \[
   \implies (2a + b)^2 + (b^2 + 2c) = r^2
   \]
   We claim \(b^2 + 2c = 0\). For large \(a\), \(2a > |b^2 + 2c|\), we can "squeeze" \(r^2\) between two consecutive squares:
   \[
   (2a + b - 1)^2 < r^2 \leq (2a + b)^2
   \]
   \[
   (2a + b)^2 \leq r^2 < (2a + b + 1)^2
   \]
   Hence:
   \[
   (2a + b)^2 = (2a + b)^2 + (b^2 + c) \implies b^2 + c = 0
   \]
   Thus, \(\exists \ell \in \mathbb{Z}\) such that \(b = 2\ell\) and \(c = -2\ell^2\).

8. **Step 5**: For infinitely many \(n \in \mathbb{N}\), we have:
   \[
   f(n) = (n + 2\ell)^2 - 2\ell^2
   \]

9. **Step 6**: Pick an arbitrary \(n\) and \(a\) that satisfies the above relation. Consider \(P(a, n)\):
   \[
   z^2 = f(a) + 2an + f(n) = (a + 2\ell)^2 - 2\ell^2 + 2an + f(n) = (a + n + 2\ell)^2 + s
   \]
   where \(s = f(n) - n^2 - 4n\ell - 2\ell^2\).

10. **Step 7**: For large \(a\), \(2a > |s|\):
    \[
    (a + n + 2\ell)^2 \leq (a + n + 2\ell)^2 + s < (a + n + 2\ell + 1)^2
    \]
    \[
    (a + n + 2\ell - 1)^2 < (a + n + 2\ell)^2 + s \leq (a + n + 2\ell)^2
    \]
    Hence:
    \[
    (a + n + 2\ell)^2 + s = (a + n + 2\ell)^2 \implies s = 0
    \]
    \[
    \implies f(n) = (n + 2\ell)^2 - 2\ell^2
    \]

11. **Step 8**: If \(\ell < 0\), then \(f(-2\ell) \in \mathbb{N}\), so \(-2\ell^2 \in \mathbb{N}\) (contradiction). Hence, \(\ell \geq 0\).

12. **Conclusion**: For all \(n \in \mathbb{N}\), we have:
    \[
    f(n) = (n + 2\ell)^2 - 2\ell^2
    \]
    We are done. \(\blacksquare\)