This question was left as an assignment in my class of commutative algebra but I was not able to completely solve it.
Prove that $I = (x^2, xy)= (x) \cap (x^2,y) = (x) \cap (x^2,xy,y^n)$ for any $n \geq 1$.
Attempt: I have proved that $I = (x^2, xy)= (x) \cap (x^2,y) $ but I am not able to prove that I also equals $(x) \cap (x^2,xy,y^n)$.
In this case I have proved it that $ ( x) \cap (x^2, xy,y^n) = (x) \cap (x^2 , y^n)$ for any $n\geq 1$ but I am not sure how should I prove that it equals $(x^2, xy)$.
Can you please help me with this?
For $n\geq1$ we have $x^2\in(x)$ and $x^2\in (x^2,xy,y^n)$, hence $x^2\in (x)\cap(x^2,xy,y^n)$.
Similarly, we have $xy\in(x)$ and $xy\in (x^2,xy,y^n)$, hence $xy\in (x)\cap(x^2,xy,y^n)$.
Thus $$I\subseteq (x)\cap (x^2,xy,y^n).\qquad\qquad (1)$$
Conversely $(x^2,xy,y^n)\subseteq (x^2,y)$, so $$(x)\cap(x^2,xy,y^n)\subseteq (x)\cap(x^2,y)=I.\qquad\qquad (2)$$
The last equality here is the one you have already shown.
Combining $(1)$ and $(2)$ we get: $$(x)\cap(x^2,xy,y^n)=I,\qquad\qquad (2)$$ as required.