Find the functions $f: \mathbb{R} \to (0, \infty)$ which satisfy $$2^{-x-y} \le \frac{f(x)f(y)}{(x^2+1)(y^2+1)} \le \frac{f(x+y)}{(x+y)^2+1},$$ for all $x,y \in \mathbb{R}.$
1. **Define a new function \( g(x) \):**
   Let \( g(x) = \frac{2^x}{x^2 + 1} f(x) \). The given inequality can be rewritten in terms of \( g(x) \) as follows:
   \[
   2^{-x-y} \le \frac{f(x) f(y)}{(x^2 + 1)(y^2 + 1)} \le \frac{f(x+y)}{(x+y)^2 + 1}
   \]
   Substituting \( f(x) = \frac{g(x) (x^2 + 1)}{2^x} \) into the inequality, we get:
   \[
   2^{-x-y} \le \frac{\left(\frac{g(x) (x^2 + 1)}{2^x}\right) \left(\frac{g(y) (y^2 + 1)}{2^y}\right)}{(x^2 + 1)(y^2 + 1)} \le \frac{\frac{g(x+y) ((x+y)^2 + 1)}{2^{x+y}}}{(x+y)^2 + 1}
   \]
   Simplifying, we obtain:
   \[
   1 \le g(x) g(y) \le g(x+y)
   \]

2. **Analyze the properties of \( g(x) \):**
   From the inequality \( 1 \le g(x) g(y) \le g(x+y) \), we can deduce the following:
   - \( g(x) \ge 1 \) for all \( x \in \mathbb{R} \).
   - Setting \( x = y = 0 \), we get \( 1 \le g(0) g(0) \le g(0) \), which implies \( g(0) = 1 \).
   - Setting \( y = -x \), we get \( 1 \le g(x) g(-x) \le g(0) = 1 \), which implies \( g(x) g(-x) = 1 \). Therefore, \( g(-x) = \frac{1}{g(x)} \).

3. **Show that \( g(x) \) is multiplicative:**
   - Let \( y \to y - x \), then \( g(y) \le g(y - x) g(x) \). Setting \( y = x \), we get \( g(x) \le g(0) g(x) = g(x) \), which is always true.
   - Let \( y \to y + x \), then \( g(x + y) = g(x) g(y) \).

4. **Show that \( g(x) \) is increasing:**
   - Let \( y = \epsilon > 0 \), then \( g(\epsilon) = \frac{g(x + \epsilon)}{g(x)} \ge 1 \), which implies \( g \) is increasing.

5. **Determine the form of \( g(x) \):**
   - For \( x < 0 \), since \( g(x) \le g(0) = 1 \), we have \( g(x) = 1 \).
   - For \( x \ge 0 \), since \( g(x) \) is increasing and \( g(0) = 1 \), we have \( g(x) = 1 \).

6. **Conclude the form of \( f(x) \):**
   - Since \( g(x) = 1 \) for all \( x \in \mathbb{R} \), we have:
     \[
     \frac{2^x}{x^2 + 1} f(x) = 1 \implies f(x) = \frac{x^2 + 1}{2^x}
     \]

The final answer is \( \boxed{ f(x) = \frac{x^2 + 1}{2^x} } \).