To solve a problem that involves averages, I made up this way to calculate an average:
$$\frac {\sum_i x_i^2} {\sum_i x_i} $$, where$$ x_i > 0.$$
This is equal to a weighted sum, where each weight is the same as the summand.
Is this a known kind of average? Does it have a name?
If so, are there known problems that are solved by it?
Context:
I am averaging a point density along a curve. $x_i$ are the lengths between consecutive points along the curve. Currently I use $$ \frac {\sum_i^n x_i} {n} $$, where $n$ is the number of points - 1.
The problem is if half of the curve is very dense and the other half is not very dense, i still get "very dense" as an average. Using the first formula above gives the intuitive answer of "half way between 'very' and 'not very' dense".
What you have is not exactly the coefficient of variation (as mentioned in a comment) but something vaguely related to it. The figure $\mu = \frac1n \sum x_i$ is the mean of your list of $x_i$ and the figure $\sigma^2 = \frac1n \sum x_i^2 - \mu^2$ is the variance of your list of $x_i$. So we see that \begin{align} \frac1n \sum x_i &= n\mu,\\ \frac1n \sum x_i^2 &= n(\sigma^2 + \mu^2),\\ \end{align} and therefore $$ \frac{\sum x_i^2}{\sum x_i} = \frac{n(\sigma^2 + \mu^2)}{n\mu} = \frac{\sigma^2 + \mu^2}{\mu} = \frac{\sigma^2}{\mu} + \mu. $$
So now we see that what you have is more closely related to the index of dispersion (also known as relative variance), which is defined as $\frac{\sigma^2}{\mu},$ but to be more precise it is the sum of the index of dispersion and the mean.
Now let's try an example. Let's say we have $5$ points along a curve with spacing $2, 2, 2, 2.$ The your formula comes up with a density figure $$ \frac{2^2 + 2^2 + 2^2 + 2^2}{2 + 2 + 2 + 2} = \frac{16}{8} = 2. $$ Now move two points so the spacing is $3,1,1,3.$ Then $$ \frac{3^2 + 1^2 + 1^2 + 3^2}{3 + 1 + 1 + 3} = \frac{20}{8} = 2.5. $$ So the "density" increases. It's true we increased the density in parts where the points got closer, but we decreased it in other places. Should the overall density have changed?
But now consider what happens if we move the endpoints toward the middle to make a shorter curve with spacing $1,1,1,1.$ Then we get the "density" $$ \frac{1^2 + 1^2 + 1^2 + 1^2}{1 + 1 + 1 + 1} = \frac{4}{4} = 1. $$ So by squeezing the points closer together we get half the density. This seems backwards.
I don't really have any further insight into what that has to do with the density of points along a curve, so in the rest of this answer I'm going to address the context of your question instead.
Usually when I'm thinking of the density of points along a curve, I would think in terms of "points per unit length". If it is a real-world problem, for example supporting a long wire on telephone poles, I might consider the "density" measure to be "telephone poles per kilometer," so if the total length of the wire is $3\ \mathrm{km}$ and it is strung over $60$ poles then I have $\frac{60}{3} = 20$ poles per kilometer.
In your case, the length of the "wire" is $\sum x_i.$ The number of "poles" is $n+1.$ So the number of "poles per unit length" is $$ \frac{n+1}{\sum x_i}. \tag{$D_1$} $$
However, I would argue that one of the points should not count, because you needed to put down one point as a starting point before you had any curve at all. If you were to extend the curve by adding another $n$ points at the same density, you'd now have twice as long a curve but $2n+1$ points instead of $n+1,$ and by measuring the density as in formula $(D_1)$ the measured "density" would slightly decrease (because $\frac{2n+1}{n+1} < 2$). So I would propose to use this formula: $$ \frac{n}{\sum x_i}. \tag{$D_2$} $$
Note that this is exactly the reciprocal of the formula $\frac{\sum x_i}{n}$ that you were using previously. Also note that for five points spaced at $2,2,2,2$, formula $(D_2)$ gives the density as $$ \frac{4}{2 + 2 + 2 + 2} = \frac{4}{8} = \frac12, $$ whereas if the points are spaced at $1,1,1,1$ we get $$ \frac{4}{1 + 1 + 1 + 1} = \frac{4}{4} = 1. $$ In short, when we squeeze the same number of points into a curve exactly half as long, we get exactly twice the density, which makes sense to me.