What is Ext in the case of polynomial ring? Let $R=k[x_1,x_2]$ where $k$ is a field and consider the $R$-module $M=R/(x_1,x_2) \cong k$. What is $\text{Ext}^n_R(M,M)$?
I am also wondering if the result can be generalized to find $\text{Ext}^n_R(M,M)$ if $R=k[x_1,...,x_n]$ and $M=R/(x_1,...,x_n)$?
 A: When $R = k[x,y]$ and $I = (x,y)$, there's a simple free resolution of $R/I = k$ as a $R$-module, given by the Koszul complex:
$$0 \to R \xrightarrow{d_2} R^2 \xrightarrow{d_1} R \to k \to 0,$$
where $d_2(P) = (xP,yP)$ and $d_1(P,Q) = -yP + xQ$. You can then use it to compute the Ext functor, which is the cohomology of the following cochain complex:
$$0 \gets \hom_R(R,k) \xleftarrow{d^2} \hom_R(R^2,k) \xleftarrow{d^1} \hom_R(R,k) \gets 0,$$
where $d^1(f)(P,Q) = f(-yP+xQ)$ and $d^2(g)(P) = g(xP,yP)$. One can use the isomorphisms
$$\hom_R(R,k) \cong k, \quad f \mapsto f(1) \\
\hom_R(R^2,k) \cong k^2, \quad f \mapsto (f(1,0), f(0,1))$$
to simplify the complex. It becomes
$0 \gets k \xleftarrow{d^2} k^2 \xleftarrow{d^1} k \gets 0$
and both differentials are zero. It follows that:
$$\operatorname{Ext}^n_{k[x,y]}(k,k) = \begin{cases}
k & n = 0 \\
k^2 & n = 1 \\
k & n = 2 \\
0 & n \ge 3
\end{cases}.$$
When you have more variables, there is still a Koszul complex. In general, for an element $z \in R$, denote the Koszul chain complex $K_z = (0 \to R \xrightarrow{z \cdot} R \to 0)$. Then when $R = k[x_1, \dots, x_n]$, you can consider the tensor product of the chain complexes $$K_{x_1} \otimes \dots \otimes K_{x_n},$$
and this gives a free resolution of $k$ as a $R$-module. You can find an example of computation here (for the case $n=2$), in higher dimensions it's not much more difficult. Beware of the signs involved in the definition of the tensor product! This lets you compute $\operatorname{Ext}^n_R(k,k)$ as above.
