The function f:R⇒R satisfies xf(x)+f(1-x)=x^3-x for all real x. Find f(x).

xf(x) + f(1-x) = x(x-1)(x+1)

(1-x)f(1-x) + f(1-(1-x)) = (1-x)((1-x)-1)(1-x+1)

multiply the first by (1-x):

x(1-x)f(x) + (1-x)f(1-x) = x(x-1)(x+1)(1-x)
f(x) + (1-x)f(1-x) = (1-x)(-x)(2-x)

subtract to get

(x(1-x)-1)f(x) = (x(x-1)(x+1)(1-x))-((1-x)(-x)(2-x))

f(x) = -x(1-x)(x^2-x+1)/(x^2-x+1) = -x(1-x)

check:

xf(x) + f(1-x)
= x(-x(1-x)) - (1-x)(x)
= -x^2+x^3-x+x^2
= x^3-x

To find the function f(x), we will first substitute specific values of x and simplify the equation to obtain a pattern. Let's start with some simple values:

For x = 0:
0f(0) + f(1) = 0^3 - 0
f(0) + f(1) = 0
f(1) = -f(0)

For x = 1:
1f(1) + f(1 - 1) = 1^3 - 1
f(1) + f(0) = 0
-f(0) + f(0) = 0
0 = 0

From the above equations, we can observe that f(1) = -f(0) and f(0) = 0. Now, let's consider x = -1:

-1f(-1) + f(1 - (-1)) = (-1)^3 - (-1)
-f(-1) + f(2) = -1 + 1
-f(-1) + f(2) = 0

Now, let's substitute x = 2 into the given equation:

2f(2) + f(1 - 2) = 2^3 - 2
2f(2) + f(-1) = 8 - 2
2f(2) + (-f(-1)) = 6
2f(2) - f(-1) = 6

We already know that -f(-1) = f(1) = -f(0) = 0. Therefore, the equation becomes:

2f(2) = 6
f(2) = 3

So far, we have determined that f(0) = 0, f(1) = 0, and f(2) = 3.

To generalize the pattern, let's substitute x = n, where n is any integer greater than 2:

nf(n) + f(1 - n) = n^3 - n
nf(n) + f(1 - n) = n(n^2 - 1)

Since we already know that f(1 - n) = f(1) = 0, the equation simplifies to:

nf(n) = n(n^2 - 1)
f(n) = n^2 - 1, for all n greater than or equal to 2.

Now, for values of x less than 0, we can use the equation:

xf(x) + f(1 - x) = x^3 - x

Substitute x = -n, where n is any integer greater than 0:

-nf(-n) + f(1 + n) = (-n)^3 - (-n)
-nf(-n) + f(1 + n) = -n(n^2 + n)

Since we already know that f(1 + n) = f(1) = 0, the equation simplifies to:

-nf(-n) = -n(n^2 + n)
f(-n) = -n^2 - n, for all n greater than 0.

Putting it all together, we have:

f(x) = {
x^2 - 1, for x >= 2
0, for x = 0, x = 1
-x^2 - x, for x > 0
}

So, the function f(x) can be defined as follows:
f(x) = x^2 - 1 for x >= 2
f(x) = 0 for x = 0, x = 1
f(x) = -x^2 - x for x > 0