Let $a$ be a given real number. Find all functions $f : R \to  R$ such that $(x+y)(f(x)-f(y))=a(x-y)f(x+y)$ holds for all $x,y \in  R$. 

(Walther Janous, Austria)
1. **Let \( P(x, y) \) denote the given assertion:**
   \[
   (x+y)(f(x)-f(y)) = a(x-y)f(x+y)
   \]
   for all \( x, y \in \mathbb{R} \).

2. **Evaluate \( P(x+1, x-1) \):**
   \[
   (x+1 + x-1)(f(x+1) - f(x-1)) = a((x+1) - (x-1))f((x+1) + (x-1))
   \]
   Simplifying, we get:
   \[
   2x(f(x+1) - f(x-1)) = 2af(2x)
   \]
   \[
   x(f(x+1) - f(x-1)) = af(2x)
   \]

3. **Evaluate \( P(x+1, -x) \):**
   \[
   (x+1 - x)(f(x+1) - f(-x)) = a((x+1) - (-x))f((x+1) + (-x))
   \]
   Simplifying, we get:
   \[
   (1)(f(x+1) - f(-x)) = a(2x+1)f(1)
   \]
   \[
   f(x+1) - f(-x) = a(2x+1)f(1)
   \]

4. **Evaluate \( P(-x, x-1) \):**
   \[
   (-x + (x-1))(f(-x) - f(x-1)) = a((-x) - (x-1))f((-x) + (x-1))
   \]
   Simplifying, we get:
   \[
   (-1)(f(-x) - f(x-1)) = a(-2x+1)f(-1)
   \]
   \[
   f(-x) - f(x-1) = a(2x-1)f(-1)
   \]

5. **Sum the results from steps 3 and 4:**
   \[
   f(x+1) - f(x-1) = a(2x+1)f(1) + a(2x-1)f(-1)
   \]

6. **Substitute this into the equation from step 2:**
   \[
   x(f(x+1) - f(x-1)) = af(2x)
   \]
   \[
   x(a(2x+1)f(1) + a(2x-1)f(-1)) = af(2x)
   \]
   \[
   a x((2x+1)f(1) + (2x-1)f(-1)) = af(2x)
   \]
   Assuming \( a \neq 0 \), we can divide both sides by \( a \):
   \[
   x((2x+1)f(1) + (2x-1)f(-1)) = f(2x)
   \]

7. **Assume \( f(x) = \alpha x^2 + \beta x \) and verify:**
   \[
   f(2x) = \alpha (2x)^2 + \beta (2x) = 4\alpha x^2 + 2\beta x
   \]
   \[
   x((2x+1)f(1) + (2x-1)f(-1)) = x((2x+1)(\alpha + \beta) + (2x-1)(\alpha - \beta))
   \]
   \[
   = x(2x\alpha + \alpha + 2x\beta + \beta + 2x\alpha - \alpha - 2x\beta + \beta)
   \]
   \[
   = x(4x\alpha + 2\beta)
   \]
   \[
   = 4\alpha x^2 + 2\beta x
   \]
   This matches \( f(2x) \), so \( f(x) = \alpha x^2 + \beta x \) is a solution.

8. **Consider the case \( a = 1 \):**
   Any quadratic function \( f(x) = \alpha x^2 + \beta x \) works.

9. **Consider the case \( a \neq 0, 1 \):**
   \[
   (\alpha(x+y) + \beta)(1-a) = 0
   \]
   Since \( a \neq 1 \), it must hold that \( \alpha(x+y) + \beta = 0 \). This is impossible if \( \alpha \neq 0 \) and \( \beta \neq 0 \). Thus, \( f = 0 \) is the only possibility.

10. **Consider the case \( a = 0 \):**
    \[
    (x+y)(f(x) - f(y)) = 0
    \]
    This implies \( f(x) = f(y) \) for all \( x, y \in \mathbb{R} \), so \( f \) is constant.

The final answer is \( \boxed{ f(x) = \alpha x^2 + \beta x } \) for \( a = 1 \), \( f(x) = 0 \) for \( a \neq 0, 1 \), and \( f \) is constant for \( a = 0 \).