I want to know if the function $f(x) = \sum\limits_{i = 1}^N\sqrt{x_i+a_i}$ is convex or concave. $x \in \mathbb R_n$
Here, $a_i$ are real numbers, and hence $f$ may not be defined on all of $\mathbb R^n$.
I tried to compute the Hessian and I think the entries other than the diagonal zero out, and the diagonal entries that remain are $$H_{ii} = \dfrac{-1}{4(x + a_i)^{\frac{3}{2}}}$$ So this suggests that since the diagonal matrix is negative definite, the function is concave.
Is this method correct? Was there a quicker/easier way to check convexity/concavity?
You need to be careful about the domain of the function, but other than that, what you've written is fine on the points where this is well-defined (you need each $x_i\geq -a_i$). Other than this, you can also use the fact that the sum of concave functions is concave, applied to each $x\mapsto \sqrt{x_i+a_i}$. These are all individually concave as the composition of an affine function ($x\mapsto x_i+a_i$) with the squareroot function, which is well-known to be concave using the second derivative.