If $L/K$ is a finite separable extension and $P \in K[X], Q \in L[X]$, then $P = Q^n \Rightarrow Q \in K[X]$ Problem statement:
Let $L$ be a finite separable extension of $K$, $P \in K[X]$.
Then, show that $P = Q^n$ with $Q\in L[X] \Rightarrow Q \in K[X]$.
$P,Q$ are unitary.

I think I've shown the result in the case when the field characteristic is $0$ or $p\nmid n$ without using finite separability (I just expand, use the fact that $P\in K[X]$ and use induction from high degree coefficient to lower degree coefficients)
However, I'm having issues when $p^r|n$ ($r$ maximal for this propriety). In this case, I've been able to show that the $p^r$th powers of the coefficients of $Q$ are in $K$.
How can I show that if $x\in L$, $x^{p^r}\in K \Rightarrow x \in K$?
I think I have to use finite separability (else it would be useless), which hints at the primitive element theorem. This theorem states essentially that $L=K[\alpha]$ for some $\alpha \in L$ algebraic on $K$.
So this allows me to write $x=R(\alpha)$ where $R \in K[X]$. This reduces the problem to:
$R(\alpha)^{p^r}\in K \Rightarrow R$ is a constant polynomial (mod. the minimal polynomial of $\alpha)$
Any idea how I could show this? I know that $R(\alpha)^{p^r}=R'(\alpha^{p^r})$ where $R'$ is $R$ with coefficients raised to the $p^r$ if it helps
 A: *

*In characteristic $0$ factorize $P=\prod_j f_j^{e_j}$ the $f_j\in K[x]$ are  the monic minimal polynomials of distinct separable elements $\alpha_j$ and $e_j$ is the mulitplicity of $\alpha_j$ in $P$, since $P= Q^n$ then $n|e_j$ and $Q=\prod_j f_j^{e_j/n}\in K[x]$.

*In characteristic $p$,  $n= p^d m,p\nmid m$. If $d\ne 0$ then $P= R(x^{p^d})=(R^{1/p^d}(x))^{p^d}$ 
($t\mapsto t^{1/p^d}$ is an automorphism of $\overline{K}$ and $R^{1/p^d}$ means applying it to the coefficients of $R$) 
where $R\in K[x]$ and $R^{1/p^d}(x)$ is in $K^{1/p^d}$ which is a purely inseparable extension of $K$, since $P=Q^n$ then $R^{1/p^d}(x)=Q^m$ so that $R^{1/p^d}\in K^{1/p^d}\cap L$ and since $L/K$ is separable then $K^{1/p^d}\cap L=K$. Thus $R^{1/p^d}(x)\in K$ and replacing $P$ by $R^{1/p^d}$ we are in the case
$p\nmid n$. Factoring $P= \prod_j f_j^{e_j}$ the $f_j\in K[x]$ are minimal polynomials of distinct algebraic elements $\alpha_j$, if $n\nmid e_j$ then the multiplicity of $\alpha_j$ in its minimal polynomial contains a prime factor of $n/e_j$ which is a contradiction because the multiplicity of non-separable elements in their minimal polynomial are powers of $p$.

Thus $n| e_j$ and $Q=\prod_j f_j^{e_j/n}\in K[x]$.



*

*If $f\in K[x]$ is monic irreducible and non-separable then $f'= 0$ (since otherwise $\gcd(f,f')|f$) thus $f=g(x^p)$ where $g\in K[x]$ is irreducible, doing so again with $g$ we get $f=G(x^{p^d})$ where $G\in K[x]$ is irreducible and $G\ne h(x^p)$ thus $G'\ne 0$ thus $G$ is separable, and hence the multiplicity of $f$'s root in their minimal polynomial is $p^d$.

