In my exercise, K is a field of characteristic p, and $K \subset L$ is a finite extension. $ x \in L$ and I must prove that $K[x^p] = K[x]$ if and only if x's minimal polynomial is separable.
However I "managed to prove" that $K(x^p) = K(x)$ is always true , but I don't see where is the flaw.
My proof: $f(x^p) = f(x)^p$ for $f \in K[X]$ (characteristic p) so f(x) = 0 if and only if $f(x^p)=0$ and x and $x^p$ have the same minimal polynomials.
Since $K(x^p) \subset K(x)$ and since they have the same dimension (degree of their shared minimal polynomial) they are equal.
What is wrong? Thanks!