Find the largest $a$ for which there exists a polynomial
$$P(x) =a x^4 +bx^3 +cx^2 +dx +e$$
with real coefficients which satisfies $0\leq P(x) \leq 1$ for $-1 \leq x \leq 1.$
1. We start by considering the polynomial \( P(x) = ax^4 + bx^3 + cx^2 + dx + e \) with real coefficients that satisfies \( 0 \leq P(x) \leq 1 \) for \( -1 \leq x \leq 1 \).

2. We decompose \( P(x) \) into its even and odd parts:
   \[
   P(x) = P_1(x) + P_2(x)
   \]
   where \( P_1(x) = ax^4 + cx^2 + e \) is an even function and \( P_2(x) = bx^3 + dx \) is an odd function.

3. For any \( x_1 \in [-1, 1] \), we have:
   \[
   0 \leq P(x_1) = P_1(x_1) + P_2(x_1)
   \]
   and
   \[
   0 \leq P(-x_1) = P_1(x_1) - P_2(x_1)
   \]

4. This implies:
   \[
   P_1(x_1) \geq \max\{-P_2(x_1), P_2(x_1)\} = |P_2(x_1)| \geq 0
   \]
   The equality occurs when \( P(x_1) = P(-x_1) = 0 \) and \( P_2(x_1) = 0 \).

5. Similarly, we have:
   \[
   1 \geq P(x_1) = P_1(x_1) + P_2(x_1)
   \]
   and
   \[
   1 \geq P(-x_1) = P_1(x_1) - P_2(x_1)
   \]

6. This implies:
   \[
   P_1(x_1) \leq \min\{1 - P_2(x_1), 1 + P_2(x_1)\} = 1 - |P_2(x_1)| \leq 1
   \]
   The equality occurs when \( P(x_1) = P(-x_1) = 1 \) and \( P_2(x_1) = 0 \).

7. Therefore, \( P_1(x) \in [0, 1] \) for all \( x \in [-1, 1] \). Since \( P_2(x) = 0 \) for all \( x \) where \( P(x) = 0 \) or \( P(x) = 1 \), we can simplify by taking \( P_2(x) = 0 \) for all \( x \in [-1, 1] \). This implies \( b = d = 0 \) and \( P(x) = P_1(x) \).

8. With the notation \( y = x^2 \in [0, 1] \), we obtain:
   \[
   P(x) = ax^4 + cx^2 + e = ay^2 + cy + e = Q(y) \in [0, 1] \text{ for all } y \in [0, 1]
   \]

9. We now search for the possible values of \( a > 0 \). The quadratic function \( f(y) = ay^2 + cy + e \) attains its minimum at \( y_m = -\frac{c}{2a} \). It is strictly decreasing on \( (-\infty, y_m] \) and strictly increasing on \( [y_m, +\infty) \).

10. **Case 1**: \( y_m \leq 0 \Rightarrow c \geq 0 \). \( Q(y) \) is strictly increasing on \( [0, 1] \). Therefore:
    \[
    Q(0) = e \geq 0
    \]
    and
    \[
    Q(1) = a + c + e \leq 1 \Rightarrow a \leq 1
    \]

11. **Case 2**: \( y_m \in (0, 1) \). We have:
    \[
    Q(y) = a(y - y_m)^2 + e - \frac{c^2}{4a}
    \]
    The minimum value is:
    \[
    \min_{y \in [0, 1]} Q(y) = Q(y_m) = e - \frac{c^2}{4a} \geq 0
    \]
    The maximum value is:
    \[
    1 \geq \max_{y \in [0, 1]} Q(y) = \max\{Q(0), Q(1)\} \geq \frac{a}{4} + e - \frac{c^2}{4a} \geq \frac{a}{4} \Rightarrow a \leq 4
    \]
    The equality occurs for \( y_m = \frac{1}{2} \) and \( e - \frac{c^2}{4a} = 0 \). This implies \( a = 4 \), \( c = -4 \), and \( e = 1 \). In this case:
    \[
    Q(y) = 4y^2 - 4y + 1 \Rightarrow P(x) = 4x^4 - 4x^2 + 1
    \]

12. **Case 3**: \( y_m \geq 1 \Rightarrow c \leq -2a \). \( Q(y) \) is strictly decreasing on \( [0, 1] \). Therefore:
    \[
    Q(0) = e \leq 1
    \]
    and
    \[
    Q(1) = a + c + e \geq 0 \Rightarrow a \leq 1
    \]

13. Hence, the maximum value of \( a \) for which there exists a polynomial with real coefficients \( P(x) = ax^4 + bx^3 + cx^2 + dx + e \) such that \( P(x) \in [0, 1] \) for all \( x \in [-1, 1] \) is \( a = 4 \). The polynomial \( P(x) = 4x^4 - 4x^2 + 1 \) satisfies the conditions.

The final answer is \( \boxed{4} \).