I am confused with the definition of a primary ideal. The definition states that if $R$ is a commutative ring then $I$ is called a primary ideal of $R$ is the following condition holds. If $xy\in I$ then either $x\in I$ or $y^n\in I$ for some $n$. My confusion lies in the following case. Suppose we have that $xy\in I$ but both $x$ and $y$ are not in $I$ and further $y^n \notin R\ \forall n$. Then by definition we have that $I$ is not primary. However if there exists $k$ such that $x^k\in R$ then the element $yx$ does not lead us to a contradiction. But since our ring is commutative $yx=xy$. So what I don't understand is the following this definition might show me that an ideal turns out to be primary depending on how I write the elements (i.e $xy$ or $yx$) which simply doesn't make sense. So what am I saying wrong here?
Thanks in advance.