When a graded ring is Cohen-Macaulay? I am trying to solve exercise 19.10 from Eisenbud's Commutative Algebra. 

I want to show that if $R=k[x_0,...,x_n]/I$ is a graded ring, then $R$ is Cohen-Macaulay iff $R_{\mathfrak p}$ is Cohen-Macaulay, where $\mathfrak p=(x_0,...,x_n)$. 

The hint is to use the graded Auslander-Buchsbaum formula. 
I believe currently I am able to prove if $R_P$ is Cohen-Macaulay ring, then codim($p$)=depth($p$), but I do not know how to proceed. Is it enough to prove this homogeneous maximal ideal satisfies Cohen-Macaulay condition? If it is not, could someone give some hint? Thanks!
 A: Use the hint given by the book. 

Suppose $R_M$ is CM, and want to prove that $R$ is CM. (Here $M=(x_0,\dots,x_n)/I$.)

Let $P$ be a prime ideal of $R$. We want to show that $R_P$ is Cohen-Macaulay.
If $P$ is graded then $P\subseteq M$ and $R_P=(R_M)_{PR_M}$ is Cohen-Macaulay.
Now suppose that $P$ is not graded.
Set $S=k[x_0,\dots,x_n]$, $\mathfrak m=(x_0,\dots,x_n)$, and write $P=\mathfrak p/I$, where $\mathfrak p$ is a prime ideal of $S$ containing $I$. Notice that $R_P=S_{\mathfrak p}/I_{\mathfrak p}$.
One knows that $S_{\mathfrak p}$ is a regular local ring, and $R_P$ is a local $S_{\mathfrak p}$-algebra which is finitely generated as an $S_{\mathfrak p}$-module. Then $R_P$ is CM iff $\operatorname{pd}_{S_{\mathfrak p}}R_P=\operatorname{ht}I_{\mathfrak p}$ (see Corollary 19.15). Analogously, $R_M$ is CM iff $\operatorname{pd}_{S_{\mathfrak m}}R_M=\operatorname{ht}I_{\mathfrak m}$.
But $\operatorname{pd}_{S_{\mathfrak m}}R_M=\operatorname{pd}_{S}R$ (why?), and $\operatorname{pd}_{S_{\mathfrak p}}R_P\le\operatorname{pd}_{S}R$, so $\operatorname{pd}_{S_{\mathfrak p}}R_P\le\operatorname{ht}I$.
On the other side, from the Auslander-Buchsbaum formula we get  $$\operatorname{pd}_{S_{\mathfrak p}}R_P=\operatorname{depth}S_{\mathfrak p}-\operatorname{depth}_{S_{\mathfrak p}}R_P=\operatorname{ht}\mathfrak p-\operatorname{depth}_{S_{\mathfrak p}}R_P\ge\operatorname{ht}I,$$ and we are done.
A: This is consequence of

Bruns-Herzog, Exercise 2.1.27 (c): Let $R$ be a Noetherian graded ring and $M$ a finite graded R-module. Suppose in addition that $(R,m)$  is $^*$local. Then $M$ is Cohen-Macaulay if and only if $M_m$ is.

Assuming that we know proofs of former parts, this part can be easily proved:
Let $p$ be a graded prime ideal. Then $p\subseteq m.$ Hence $M_p=(M_m)_{pR_m}$ is Cohen-Macaulay. So $M$ is Cohen-Macaulay, by part (b):(ii)$\to$ (i).
