Consider the following Lagrangian:
$$L = \sqrt{g_{ij}\dot{X^i} \dot{X^j}}$$
Note that in the above Lagrangian we have taken the Einstein Summation convention and the metric $g_{ij}$ is a function of the coordinates $X^i$.
I need help in understanding how to deduce $\frac{\partial L}{\partial \dot{X^k}}$.
If someone could explain the following steps my textbook take I would greatly appreciate it. I am specifically stuck on why the Kronecker delta symbol appears and how the solution proceeds with using it so an explanation would be really helpful:
$\frac{\partial L}{\partial \dot{X^k}} = \frac{1}{2L}g_{ij}(\delta^i_k \ \dot{X^j} + \ \dot{X^i} \delta^j_k ) = \frac{1}{L}g_{ki} \dot{X^i}$
We denote $X_k \equiv x_k$ for brevity. Then, $$L = \sqrt{g_{ij}\dot{x}_i\dot{x}_j}$$ We have $$\frac{\partial{L}}{\partial\dot{x}_k}=\frac{1}{2L}\frac{\partial}{\partial\dot{x}_k}\left(g_{ij}\dot{x}_i\dot{x}_j\right)=\frac{1}{2L}\left(g_{ij}\dot{x}_j\frac{\partial\dot{x}_i}{\partial\dot{x}_k}+g_{ij}\dot{x}_i\frac{\partial\dot{x}_j}{\partial\dot{x}_k}\right)\tag{1}$$ We also have $$\frac{\partial\dot{x}_i}{\partial\dot{x}_j}=\delta_{ij}$$ since $\dot{x}_i$ and $\dot{x}_j$ are independent for $i\ne j$. With this simplification, $(1)$ becomes $$\begin{align}\frac{\partial{L}}{\partial\dot{x}_k}=\frac{1}{2L}\left(g_{ij}\dot{x}_j\frac{\partial\dot{x}_i}{\partial\dot{x}_k}+g_{ij}\dot{x}_i\frac{\partial\dot{x}_j}{\partial\dot{x}_k}\right) &= \frac{1}{2L}\left(g_{ij}\dot{x}_j\delta_{ik}+g_{ij}\dot{x}_i\delta_{jk}\right)\\ &=\frac{1}{2L}\left(g_{kj}\dot{x}_j+g_{ik}\dot{x}_i\right) \\ &=\frac{1}{L}g_{ij}\dot{x}_i\end{align}$$ We have also used the fact that $g_{ij}$ is symmetric in $i$ and $j$ and that $g_{ij}$ is a function of the coordinates $x_k$ only.
PS: Raised and lowered indices have not been used to avoid confusion.