Suppose that $R$ is a commutative ring and $I$ is a finitely generated ideal of $R$ such that $I^2=I$. Show that $I=Re$ for some idempotent element $e$.
I think I should use induction on the number of generators of $I$. I have proved that it's true for $n=1$:
Suppose $I=\langle a\rangle$ for some $a \in I$. Since $I^2=I$ we have $\langle a^2\rangle = \langle a\rangle$ and therefore $\exists r \in R: a=ra^2$. Multiplying both sides by $r$ and setting $e=ra$ we see that $e^2=e$ and $I=\langle e\rangle=\langle ra\rangle\subseteq \langle a\rangle =I$. Therefore, $I=Re$.
Now for $n=2$, things look difficult. Suppose $I=\langle a_1,a_2\rangle$.
Again, we have $\langle a_1^2,a_1a_2,a_2^2\rangle=\langle a_1,a_2\rangle$ therefore there exists some coefficients in $R$ such that we have:
$$a_1 = r_{11}a_1^2 + r_{12}a_1a_2 + r_{22}a_2^2$$ $$a_2 = s_{11}a_1^2 + s_{12}a_1a_2 + s_{22}a_2^2$$
After factorization:
$$a_1 = a_1(r_{11}a_1 + r_{12}a_2) + r_{22}a_2^2$$ $$a_2 = s_{11}a_1^2 + (s_{12}a_1 + s_{22}a_2)a_2$$
It isn't easy to see an idempotent element in these relations, let alone finding one that generates $I$.