Nilpotent elements in the quotient ring of a polynomial ring 
If $F$ is a field and $p(x) \in F[x]$, prove that the ring $R=F[x]/(p(x))$ has no nonzero nilpotent elements iff $p(x)$ is not divisible by the square of any polynomial. 

(==>)
$R$ has no nonzero nilpotent element, but $p(x)$ is divisible by the square of some $g(x)\in F[x], \deg g(x)>0$
Say $p(x)=(g(x))^2h(x)$ for some $h(x)\in F[x]$, then consider $g(x)h(x)\in F[x]$, $0<\deg g(x)h(x)=\deg g(x)+\deg h(x)\le \deg p(x)$, but $(g(x)h(x))^2=g^2(x)h^2(x)=p(x)h(x)=\bar{0}$ in $F[x]/(p(x))$, it is a contradition.
(<==)
$p(x)$ is not divisible by the square of any polynomial, and there is nonzero nilpotent element, say $f(x), (f(x))^n=0$, for some n.
Then, $p(x)|(f(x))^n$ but $p(x)\nmid f(x)$.
Then I don't know how to continue... 
Also, is there any way to proof directly?
 A: Suppose $f(x)+I$ is a nonzero nilpotent element in $F[x]/I$, where $I=(p(x))$. Then, for some $n>1$, $f(x)^n\in I$, that is, $p(x)$ divides $f(x)^n$.
It is not restrictive to assume $p(x)$ is monic.
Let $p(x)=p_1(x)^{m_1}p_2(x)^{m_2}\dots p_k(x)^{m_k}$ be the decomposition of $p$ into (monic) prime powers.
Since $p(x)$ does not divide $f(x)$, there is $j$ such that $p_j(x)^{m_j}$ doesn't divide $f(x)$. However, this polynomial divides $f(x)^n$, hence $p_j(x)$ divides $f(x)$. Therefore $m_j>1$.
Conversely, suppose $q(x)^2$ divides $p(x)$, with non constant $q(x)$. Consider $f(x)=p(x)/q(x)^2$. Then $p(x)=q(x)^2f(x)$, so $p(x)$ divides $(q(x)f(x))^2$ and therefore $q(x)f(x)$ is nilpotent. Let's see it is nonzero in $F[x]/I$, that is, that $p(x)$ doesn't divide $q(x)f(x)$: indeed
$$
q(x)f(x)=p(x)g(x)=f(x)q(x)^2g(x)
$$
implies
$$
q(x)g(x)=1
$$
and $q(x)$ would be constant.
A: Take $p$ a monic non-null polynomial and write its (unique) decomposition as a product of monic irreducible polynomials :
$$p=q_1^{\alpha_1}...q_r^{\alpha_r} $$
Then by the Chinese Remainder theorem :
$$F[x]/(p)\text{ is isomorphic to } F[x]/(q_1^{\alpha_1})\times...\times  F[x]/(q_r^{\alpha_r})$$
Now suppose $\alpha_1=...=\alpha_r=1$ (i.e. $p$ is squarefree) then  
$$F[x]/(p)\text{ is isomorphic to } F[x]/(q_1)\times...\times  F[x]/(q_r)$$
Cannot have non-zero nilpotent elements because it is a product ring of fields : assume $(a_1,...,a_r)^n=0$ in $F[x]/(q_1)\times...\times  F[x]/(q_r)$ then $a_i^n=0$ for each $i$ but you are in a field so $a_i=0$. 
On the other hand suppose $\alpha_1\geq 2$ then :
$$(q_1,0,...,0)\neq 0 \text{ in } F[x]/(q_1^{\alpha_1})\times...\times  F[x]/(q_r^{\alpha_r}) $$
But clearly :
$$(q_1,0,...,0)^{\alpha_1}=(q_1^{\alpha_1},0,...,0)=(0,...,0)\text{ in }F[x]/(q_1^{\alpha_1})\times...\times  F[x]/(q_r^{\alpha_r}) $$
So it has a nilpotent element. For a direct proof you can show that the nilpotent elements of a product of rings is the product of the set of nilpotent elements of each ring.
