An exercise on the Einstein tensor from Petersen's Riemannian geometry This comes from Riemannian geometry, Peter Petersen, Exercise 3.4.16.

Consider the $(0,2)$-tensor
$
T = \operatorname{Ric} + b \operatorname{scal} g + cg
$
where $b, c\in \mathbb R$.

*

*Show that $\nabla^* T=0$ if $b=-\frac{1}{2}$.

The tensor $G = \operatorname{Ric} - \frac{1}{2} \operatorname{scal} g +cg$ is known as the  Einstein tensor, and $c$ as the cosmological constant.


*Show that if $c=0$, then $G=0$ in dimension 2.

*When $n>2$ show that if $G=0$, then the metric is an Einstein metric.

*When $n>2$ show that if $G=0$ and $c=0$, then the metric is Ricci flat, i.e. $\operatorname{Ric} \equiv 0$.


For 2, I've done this so far and I just want to make sure it's right:
In dimension 2,
$$
\sec \left(e_1, e_2\right)=R_{1221}=\left\langle\operatorname{Ric}\left(e_1\right), e_1\right\rangle=\left\langle\operatorname{Ric}\left(e_2\right), e_2\right\rangle,
$$
where $e_1, e_2$ orthonormal at a given point $p$ of $M$.
Thus
$$
\begin{gathered}
G\left(e_1\right)=\operatorname{Ric}\left(e_1\right)-\frac{\text { scal }}{2} e_1=R_{1221} e_1-R_{1221} e_1=0, \\
G\left(e_2\right)=\cdots=0 .
\end{gathered}
$$
and for part 4,if $G=0$, then Ric $=\frac{\text { scal }}{2} \cdot I$, taking contractions imply that
$$
\text {scal }=\frac{n}{2} \text { scal, }
$$
thus if $n \geq 3, s c a l=0$, Ric $=\frac{s c a l}{2} \cdot g=0$
I'd appreciate it if you can lmk if I'm on the right track for 2, and 4 and help me with 1 and 3.
 A: $\DeclareMathOperator{\scal}{Scal} \DeclareMathOperator{\ric}{Ric} \DeclareMathOperator{\tr}{trace}$
First of all, what you have done is good.
In the following, I will use this definition of the divergence:

Let $\{e_1,\ldots,e_n\}$ be a local orthonormal frame and $A$ a symmetric $2$-tensor.
Then
$$
\nabla^*A = - \tr (\nabla A)=-\sum_{j=1}^n (\nabla_{e_j}A)(e_j,\cdot).
$$

It is possible that you have the oppositve convention (without the minus sign).
In any case, there is no much difference.
Note that with my definition, we have
\begin{align}
\nabla^*(\scal g) &= -\sum_{j=1}^n \nabla_{e_j}(\scal g) (e_j,\cdot)\\
&= -\sum_{j=1}^n \nabla_{e_j}(\scal) g (e_j,\cdot) + \scal (\underbrace{\nabla_{e_j}g}_{=0})(e_j,\cdot)\\
&=-\sum_{j=1}^nd\scal(e_j)g(e_j,\cdot)\\
&= -d\scal
\end{align}
the last equality being true since $\{g(e_1,\cdot),\ldots,g(e_n,\cdot)\}$ is an orthonormal coframe.
Notice that this is no particularity of $\scal$: the same computations show that $\nabla^* (fg) = -df$ for any smooth function $f$.
More conceptually, this can be recovered by the following:
$$
\nabla^*(fg) = -\tr(\nabla (fg)) = -\tr( df \otimes g + f \otimes \underbrace{\nabla g}_{=0}) = -\tr (df \otimes g)
$$
and the same conclusion holds.
Therefore, we have
$$
\nabla^* T = \nabla^*\ric + b \nabla^*(\scal g) + c \nabla^*g = \nabla^*\ric - b (d\scal).
$$
From this, 1. is equivalent to $\nabla^*\ric = -\frac{1}{2}d\scal$.
This is well known under the name of contracted Bianchi identity.
For 3., if $G=0$, then
$$
\ric = (\frac{1}{2}\scal -c)g,
$$
and tracing this equality yields
$$
\scal = \frac{n}{2}\scal - nc,
$$
that is, since $n>2$:
$$
\scal = \frac{2nc}{n-2}.
$$
It follows that $\scal$ is constant, and coming back to $\ric = (\frac{1}{2}\scal - c)g$, we have that $g$ is Einstein.
