Let $f(x) = x^2-3x$. For what values of $x$ is $f(f(x)) = f(x)$?  Enter all the solutions, separated by commas.
Expanding $f(f(x)) = f(x)$ gives us $$(x^2-3x)^2-3(x^2-3x)=x^2-3x.$$Rather than expanding, we can subtract $x^2-3x$ from both sides to get $$(x^2-3x)^2-4(x^2-3x)=0.$$Factoring out $x^2-3x$ gives $(x^2-3x)(x^2-3x-4)=0$. Factoring each quadratic separately, we get $$x(x-3)(x+1)(x-4)=0.$$Thus the values of $x$ are $\boxed{0, 3, -1, 4}$.
0,3,-1,4
Level 4
Intermediate Algebra
Problem: Let $f(x) = x^2-3x$. For what values of $x$ is $f(f(x)) = f(x)$?  Enter all the solutions, separated by commas.
Solution:<|START_OF_LATENT|><|PRIOR_PREFIX|>To solve the equation f(f(x)) = f(x), we first need to compute f(f(x)). 

Start with f(x) = x^2 - 3x. 

Now, substitute f(x) into itself: 
f(f(x)) = f(x^2 - 3x) = (x^2 - 3x)^2 - 3(x^2 - 3x).

Next, expand (x^2 - 3x)^2:
(x^2 - 3x)^2 = x^4 - 6x^3 + 9x^2.

Now, compute -3(x^2 - 3x):
-3(x^2 - 3x) = -3x^2 + 9x.

Combine these results:
f(f(x)) = x^4 - 6x^3 + 9x^2 - 3x^2 + 9x = x^4 - 6x^3 + 6x^2 + 9x.

Now, set f(f(x)) equal to f(x):
x^4 - 6x^3 + 6x^2 + 9x = x^2 - 3x.

Rearranging gives:
x^4 - 6x^3 + 5x^2 + 12x = 0.

Factor out x:
x(x^3 - 6x^2 + 5x + 12) = 0.

This gives one solution: x = 0.

Next, we need to solve the cubic equation x^3 - 6x^2 + 5x + 12 = 0. 

Use the Rational Root Theorem to test possible rational roots. Testing x = 3:
3^3 - 6(3^2) + 5(3) + 12 = 27 - 54 + 15 + 12 = 0. 

Thus, x = 3 is a root. 

Now, perform synthetic division of x^3 - 6x^2 + 5x + 12 by (x - 3):
The result is x^2 - 3x - 4.

Factor x^2 - 3x - 4:
(x - 4)(x + 1) = 0.

This gives two more solutions: x = 4 and x = -1.

Combining all solutions, we have x = 0, 3, -1, 4. 

Thus, the final answer is 0, 3, -1, 4.<|END_OF_LATENT|> The final answer is $0,3,-1,4$.