How to compute curvature? 
Consider neighbourhood $U$ in $\mathbb{R}^2$, with the following metric $g=dx^2 + f(x,y)\,dy^2$, where $f$ is positive. I have to prove that Riemannian curvature equals to
$$
-\frac{f_{yy}''}{f}, 
$$

but I am getting very different answer.
Here is my attempt: the segment parallel to $X$-axis is geodesic and field $\frac{\partial}{\partial y}$ is a Jacobi field alongside this curve. Then we could compute sectional curvature using Jacobi field equation. I think parametrization $\gamma (t) = (t, \mathrm{const})$ is geodesic.
Let $Y(t)$ be $\frac{\partial}{\partial y}$ along $\gamma$ and $X(t) = \gamma'(t)$, then
$$
\operatorname{Sec} = \frac{(R(Y,X)\,X,Y)}{ |X\wedge Y|^2} = -\frac{(Y,\,Y'')}{|X\wedge Y|^2}. 
$$
(I denote $V' = \frac{\nabla}{dt}V$)
Now let's compute $(Y'',\, Y)$
\begin{align} 
\textstyle
(Y'',\, Y) &= \tfrac{d}{dt} (Y',\,Y) - (Y',\,Y') \\[2pt]
(Y',\, Y) &= \tfrac{1}{2} \tfrac{d}{dt} (Y,\, Y) 
= \tfrac{1}{2} \tfrac{d}{dt} f =  \tfrac{1}{2} f_x' \\[2pt]
(Y',\, X) &= \tfrac{d}{dt} (Y,\, X) - (Y,\, X') = 0 
\end{align}
So $Y' = \frac{1}{2} f_x' Y, \, (Y',Y') = (\frac{1}{2}f_x')^2 f$ and
$$
\textstyle
(Y'',\, Y) = \frac{d}{dt} \bigl(\frac{1}{2} f_x' f\bigr) 
- \bigl(\frac{1}{2}f_x'\bigr)^2 f 
= \frac{1}{2} \bigl(f''_{xx} f + f_x'^2\bigr) 
- \bigl(\frac{1}{2}f_x'\bigr)^2 f 
$$
I think, that I am doing something wrong with this, maybe parametrization of the segment parallel to x is not geodesic or something else.
Thank you in advance!
 A: I'm going to just go back to first principles here. I will use the metric
$$g = dx^2 + f^2\,dy^2.$$
Then $dx, f\,dy$ is an orthonormal coframe, and the associated orthonormal frame is $e_1=\partial/\partial x$, $e_2=\frac1f\,\partial/\partial y$. You can check by computing the connection $1$-form (or the Christoffel symbols) that $e_2$ is actually parallel along $\gamma$. (This is not surprising: $\gamma$ is a geodesic, and $e_2$ has constant length and makes a constant angle with $\gamma$.)
Your Jacobi field $Y=\frac{\partial}{\partial y} = fe_2$. Thus $\frac{\nabla Y}{dt} = Y' = f'e_2 + f \frac{\nabla e_2}{dt} = f'e_2$, and, likewise, $Y'' = f''e_2$. The Jacobi equation now gives us $Y'' + KY = 0$, which translates to $(f''+Kf)e_2=0$. In other words, $K = -f''/f = -f_{xx}/f$, as I suggested the problem should have stated in the first place.
Now, to untangle your approach. Indeed, $(Y',Y) = \frac12(f^2)' = ff'$. $(Y'',Y) = (Y',Y)' - (Y',Y') = (ff')'- (f')^2 = ff''$, and, since $|X\wedge Y|^2 = |X|^2|Y|^2 = f^2$, we are done. I can't follow what you've done in your computations. It looks like you made a linear algebra error here: You should have concluded from $(Y',Y)=ff'$ that $Y'=(Y',Y)\frac Y{|Y|^2} = (f'/f)Y$.
