Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I thought about that but I haven't had the time yet to do these computations, I'm temporarily obligated to other stuff at the moment. But I do suspect if $B$ is one-dimensional, then $W(\bullet, \bullet, \bullet, \nabla h) = 0$.
@WillieWong thanks! But it's been a long day for me and I'm still having some trouble putting your arguments together. It's probably obvious but I don't see why the level sets being totally umbilical in addition to the gradient vector field being geodesic implies the base is one-dimensional. I did try looking up the references in that link but it hasn't helped me.
Correcting my previous comments: the scalar curvature is indeed constant and equal to $n(n+1)a$. But the Ricci tensor of $g$ is given by: $$ \mathrm{Ric}(g) = \bigl(n\,a - \tfrac{1}{2}\,b\,(n-1) \, u^{-n-1}\bigr)\,g + \frac{(n^2{-}1)b\,\mathrm{d}u^2}{2\bigl(b\,u^2+k\,u^{n+1}-a\,u^{n+3}\bigr)}, $$ So there was only a minor typo in the original answer, and indeed $g$ is Einstein if, and only if, $b = 0$.
Could you perhaps have made a typo when defining $g$? I calculated the scalar curvature of a metric $$g = \frac{\mathrm{d}u^2}{(f(u))^2} + u^2 h$$ and found it to be equal to $$\text{Scal}_{g} = \frac{n f'}{fu} - \frac{n f f'}{u} + \frac{n(n-1)}{u^2}\left(k - \frac{1}{f^2} \right) $$ Setting $f = \sqrt{k - au^2 + bu^{1-n}}$ as in your example, I found that $\text{Scal}_g$ is not constant.