I have the function
$$f(\mathbf{x}) = \sqrt{\frac{1}{n}\sum_{i=1}^n\left(\log_e(x_i+1)-c_i\right)^2}$$
where $c_i$ is a constant, and I want to find $f'(\mathbf{x})$, more explicitly,
$$\frac{\partial f}{\partial x_i}$$
the derivative of $f$ with respect to $x_i$, the $i$'th variable.
I know I'll have to apply the chain rule here, but with the sum and the square root, I am unsure of the correct order of the steps.
$$f(\mathbf{x}) = \sqrt{\sum_i \phi_i(x_i)}$$
Hence using the chain rule $$\frac{\partial f}{\partial x_i}=\frac{1}{2} \frac{\frac{d \phi_i}{d x_i}}{f(\mathbf{x})} = \frac{\log_e(x_i+1)-c_i}{n\left(x_i+1\right)} \frac{1}{f(\mathbf{x})} $$
where $$\phi_i(t) = \frac{\left(\log_e(t+1)-c_i\right)^2}{n}$$