I am working on a problem, where I have to show that the sum of functions of the form:
$$ f_i(x)=\left( \left\lVert x-a_i \right\rVert - l_i \right)^2, a_i\in\mathbb{R^3}, l_i\in\mathbb{R} $$
is not convex. I have shown that a single $f$ is not convex, but how do I show that some sum of them is also not convex? Note, when I say sum I mean adding only, so no $f-f=0$. It's also the euclidean norm. Since it is not differentiable at $x=a$ I can't use any of the convex things that rely on differentiability, so I don't know what to look for.
I don't believe there are any general conditions to tell if the sum of $n$ non-convex functions is convex outside of using the definitions of convexity to show it directly. It's very dependent on your functions.
Fortunately, you're just trying to show that the sum of $f$ isn't necessarily always convex (assuming you wrote out your problem correctly, since $f_i$ is convex if you let $l_i \leq 0$).
You said you were able to prove for a single component $f_i$ that it's not necessarily convex. Under what specific conditions is $f_i$ non-convex? You should be able to extract those specific conditions that make it non-convex and construct some example $f_2$ to fit those same conditions.
I'd recommend you graph a few examples in the $\mathbb{R^2}$ case to see how the function looks if you perturb various inputs $\boldsymbol{a}_i$ and $l_i$.
$\textbf{Big Hint/Answer:}$
$f_i$ is non-convex if $l_i > 0$. If you pick $\boldsymbol{x} = \boldsymbol{a}_i$, it turns out to be a local maximum $l_i^2$, which is the portion that breaks convexity. We can then pick 2 points on this concave portion, and show convexity doesn't hold. Let's say $\|\frac{1}{2}\boldsymbol{a}_i\| < l_i$ (technically, we'd have to actually pick some general fraction of $\boldsymbol{a}_i$ such that its norm is less than $l_i$, but for convenience, let's say $\frac{1}{2}$ works). Then, evaluate $\boldsymbol{x} = \frac{1}{2}\boldsymbol{a}_i$ and $\boldsymbol{x} = \frac{3}{2}\boldsymbol{a}_i$, which is less than that local maximum because $\|\boldsymbol{x} - \boldsymbol{a}_i\|_2 \geq 0$ and $l_i > 0$. We can then plug this into the definition of convexity.
By the definition of convexity, pick $\lambda = 0.5$, and the 2 points to test to be $\boldsymbol{x} = \frac{1}{2}\boldsymbol{a}_i$ and $\boldsymbol{x} = \frac{3}{2}\boldsymbol{a}_i$ -- convexity doesn't hold. Then you just need to construct functions where picking $\boldsymbol{x}$ still ensures this issue with the local maximum. E.g., play around with writing $\boldsymbol{a}_2$ as a perturbation of $\boldsymbol{a}_1$, $\boldsymbol{a}_2 = \boldsymbol{a}_1 + \boldsymbol{c}$.