 Find all real polynomials $P(x)$ of degree $5$ such that $(x-1)^3| P(x)+1$ and $(x+1)^3| P(x)-1$.
1. Given the conditions \((x-1)^3 \mid P(x) + 1\) and \((x+1)^3 \mid P(x) - 1\), we start by expressing \(P(x)\) in terms of polynomials \(A_1(x)\) and \(A_2(x)\):
   \[
   P(x) + 1 = (x-1)^3 A_1(x)
   \]
   \[
   P(x) - 1 = (x+1)^3 A_2(x)
   \]
   where \(A_1(x)\) and \(A_2(x)\) are polynomials of degree 2, i.e., \(A_1(x) = a_1 x^2 + b_1 x + c_1\) and \(A_2(x) = a_2 x^2 + b_2 x + c_2\).

2. Evaluating \(P(x)\) at \(x = 1\) and \(x = -1\):
   \[
   P(1) + 1 = 0 \implies P(1) = -1
   \]
   \[
   P(-1) - 1 = 0 \implies P(-1) = 1
   \]

3. Since \((x-1)^3 \mid P(x) + 1\), we can write:
   \[
   P(x) + 1 = (x-1)^3 (a_1 x^2 + b_1 x + c_1)
   \]
   Similarly, since \((x+1)^3 \mid P(x) - 1\), we can write:
   \[
   P(x) - 1 = (x+1)^3 (a_2 x^2 + b_2 x + c_2)
   \]

4. Equating the polynomials \(P(x)\) from both expressions:
   \[
   (x-1)^3 (a_1 x^2 + b_1 x + c_1) - 1 = (x+1)^3 (a_2 x^2 + b_2 x + c_2) + 1
   \]

5. Expanding both sides and comparing coefficients:
   \[
   (x-1)^3 = x^3 - 3x^2 + 3x - 1
   \]
   \[
   (x+1)^3 = x^3 + 3x^2 + 3x + 1
   \]

6. Expanding \(P(x)\) in terms of \(A_1(x)\) and \(A_2(x)\):
   \[
   P(x) = (x-1)^3 (a_1 x^2 + b_1 x + c_1) - 1
   \]
   \[
   P(x) = (x+1)^3 (a_2 x^2 + b_2 x + c_2) + 1
   \]

7. Equating the coefficients of \(x^5, x^4, x^3, x^2, x, \text{and constant term}\) from both expressions:
   \[
   a_1 = a_2
   \]
   \[
   -3a_1 + b_1 = 3a_2 + b_2
   \]
   \[
   3a_1 - 3b_1 + c_1 = 3a_2 + 3b_2 + c_2
   \]
   \[
   -a_1 + 3b_1 - 3c_1 = a_2 + 3b_2 + 3c_2
   \]
   \[
   3c_1 - b_1 = 3c_2 + b_2
   \]
   \[
   c_1 + c_2 = -2
   \]

8. Solving the system of equations:
   \[
   a_1 = a_2
   \]
   \[
   -3a_1 + b_1 = 3a_2 + b_2 \implies -3a_1 + b_1 = 3a_1 + b_2 \implies b_1 = b_2 + 6a_1
   \]
   \[
   3a_1 - 3b_1 + c_1 = 3a_2 + 3b_2 + c_2 \implies 3a_1 - 3b_1 + c_1 = 3a_1 + 3b_2 + c_2 \implies -3b_1 + c_1 = 3b_2 + c_2
   \]
   \[
   -a_1 + 3b_1 - 3c_1 = a_2 + 3b_2 + 3c_2 \implies -a_1 + 3b_1 - 3c_1 = a_1 + 3b_2 + 3c_2 \implies -2a_1 + 3b_1 - 3c_1 = 3b_2 + 3c_2
   \]
   \[
   3c_1 - b_1 = 3c_2 + b_2
   \]
   \[
   c_1 + c_2 = -2
   \]

9. From the equations, we get:
   \[
   a_1 = a_2
   \]
   \[
   b_1 = -b_2
   \]
   \[
   c_1 = c_2 = -1
   \]

10. Substituting these values back, we find:
   \[
   a_1 = -\frac{3}{8}, b_1 = -\frac{9}{8}, c_1 = -1
   \]

11. Therefore, the polynomial \(P(x)\) is:
   \[
   P(x) = -\frac{1}{8}(3x^2 + 9x + 8)(x-1)^3 - 1
   \]

The final answer is \(\boxed{P(x) = -\frac{1}{8}(3x^2 + 9x + 8)(x-1)^3 - 1}\)