I wanted to find the approximate average of all real points in $(x)^{x}$ from $[-4,-2]$. This means I am ignoring all real inputs that give a complex output and need average to be a real number.
To first solve this I found the following defined sets of $x^x$ when $x<0$. $$x=-\frac{2m}{2k+1}|m,k\in\mathbb{Z}$$
$$x=-\frac{2m+1}{2k+1}|m,k\in\mathbb{Z}$$
Each of the sets coincides with another equation so I got the following peice-wise definition. $$x^x=\begin{cases} (-x)^x & x=\left\{ -{2m\over 2k+1}\ |\ m, k \in \Bbb Z\right\}\\ -\left(-x\right)^{x} & x=\left\{ -{2m+1\over 2k+1}\ |\ m, k \in \Bbb Z\right\}\ \\ \text{undefined} & x\neq\left\{ -{2m\over 2k+1}\bigcup-{2m+1\over 2k+1}\ |\ m, k \in \Bbb Z\right\} \end{cases} $$
Then I took the limit definition of an integral along with $\frac{1}{b-a}$ to determine the average. $$\frac{1}{b-a}\lim_{n\to\infty}\sum_{i=1}^{n}{f\left(a+\left(\frac{b-a}{n}\right)i\right)}\left(\frac{b-a}{n}\right)=\frac{1}{b-a}\int_{a}^{b}f(x)$$ where $f(x)=x^x$
(Note that it is possible to skip $x$-values that given an undefined output in an interval. An example is $\{-12/3,-11/3,-10/3,-9/3,-8/3,-7/3,-6/3\}$)
When $n\in\left\{\left.{4n+2}\right| n \in \mathbb{Z} \right\}$ there are numbers whose outputs coincide with $(-x)^{x}$ and numbers whose outputs coincide with $-(-x)^{x}$. So I took the probabilty of having numbers whose ouputs coincide with ($(-x)^x$ vs a numbers whose outputs coincide with $-(-x)^{x}$ in $[-4,-2]$. I got $\frac{1}{2}$ for both of them.
Thus I found when $n \in \left\{\left.{4n+2}\right| n \in \mathbb{Z} \right\}$ as $n\to\infty$
$$\frac{1}{(-2)-(-4)}\lim_{n\to\infty}\sum_{i=1}^{n}{f\left(-4+\left(\frac{2}{n}\right)i\right)}\left(\frac{2}{n}\right)=\frac{1}{2}\left(\frac{1}{2}\int_{-4}^{-2}{(-x)}^{x}+\frac{1}{2}\int_{-4}^{-2}-{\left(-x\right)}^{x}\right)=0$$
But when $n$ is odd, all numbers in the interval have outputs coinciding only with $(-x)^{x}$. So when $n$ is odd integer and $n\to\infty$
$$\frac{1}{-2+4}\lim_{n\to\infty}\sum_{i=1}^{n}{f\left(-4+\left(\frac{2}{n}\right)i\right)}\left(\frac{2}{n}\right)=\frac{1}{2}\int_{-4}^{-2}{\left(-x\right)}^{x}\approx.062152$$
I have two different numbers depending on which $n$value I choose. So does this mean the average does not exist? If not how could one find the average?
What other methods can be used to find a real number average?
EDIT Analyzing this I believe that one should choose specific $n's$ despite a limit having to accept all $n's$
I presume that an interval of reimmmen sum interval should be as dense as possible and represent all defined numbers. This leads me to believe the average is 0.
Since this goes against the definition of a limit, I think the definition of a reimmen sum should be slightly altered for dense defined inputs with undefined outputs.
For example I believe intervals with numerator increase of $1$ in $\{-12/3,-11/3,-10/3,-9/3,-8/3,-7/3,-6/3\}$ can would give an accurate average compared to an numerator increase of $2$ in $\{-12/3,-10/3,-8/3,-6/3\}$.
When there is numerator increase of $1$ I end up with zero. Since it represents inputs whose output coincide with both $(-x)^x$ and $-(-x)^{x}$ the average should be zero.
Perhaps my reasoning is correct but I would like to find out if this is the case.
There is at least one sense in which you might say the "average" value of $f(x) = x^x$ on $[-4,-2]$ is zero.
Before getting to that, however, I'd like to document some of the ways not to approach this problem. For various reasons, I think trying to apply integration is a non-starter. The function as we understand it here is defined only on a countable number of points (rational exponents) and undefined on an uncountable number of points in the interval. This makes it impossible to apply the definition of Riemannian integration (in any form I've ever seen it), and the Lebesgue integral of any function over a countable set of points is zero by definition regardless of the function values, so it tells us nothing about the average value of the function.
In addition to not having a good domain for integration, within that domain you have function values that are greater than $1/256$ interleaved densely with function values that are less than $-1/256$. So any time you use one of those values as the height of a rectangle "approximating" the function, it's completely unrepresentative of infinitely many function values in the interval. If you attempt to define an integral using only Riemann sums of $n$ rectangles with uniform widths (which is not a legitimate use of Riemann sums in the first place), as $n$ goes to infinity, each time $n$ increases you'll have some number of intervals on which that interval's part of its "Riemann" rectangle "flips" across the axis. This process never converges. Worse still, whenever $n$ is divisible by $4$, about half the values of $x^x$ for $x = -4 + j\frac2n$ are not even defined, because after reducing the fraction to lowest terms, the denominator is even.
So basically I would immediately discard any ideas that would define the average in terms of an integral, or anything purporting to be some kind of Riemann sum.
The next best thing would be if we could somehow average the function values as an infinite series. There are only a countable number of $x$ values in the domain of this function, so they can be organized in a series. Unfortunately for this approach, a series using these function values cannot be absolutely convergent. Even after we divide each partial sum by the number of terms, it's still possible to "converge" to any sum you want by choosing the order in which the terms are added.
One thing we can do is (somewhat arbitrarily) decide that we're interested in some particularly "regular" subsequences of the function values, for example, for some integer $k$, take $x^x$ where $x$ ranges over all multiples of the fraction $\frac{1}{2k+1}$ within the interval $[-4,-2]$. Take the average of these values, and then see what happens to that average as $k$ goes to infinity; that is, for $f(x) = x^x$, define $$ \mu = \lim_{k\to\infty} \frac{1}{4k+3} \sum_{j=0}^{4k+2} f \left(-4 + \frac{j}{2k+1} \right) $$ and call $\mu$ defined in this way a kind of "average".
(Note: Despite its resemblance to Riemann sums that are sometimes used when computing Riemann integrals, this is not the derivation of an integral. It is simply an arithmetic mean of a set of values of $f(x)$ for $x \in [-4,-2]$. To actually have a Riemann integral, you have to consider all partitions of the interval into "almost disjoint" subintervals, including many for which it is not possible to construct a Riemann sum over regularly spaced values of $x$ like these. And let's not forget that rigorous definitions of Riemann integration typically assume a function that is defined on a compact interval, not a function that is undefined on a dense subset of points in that interval.)
The value of this "average" is zero. Here's how we can know that:
For any integer $k$, we can separate the aforementioned sum into four parts: the first term, the last term, the "odd" terms in between, and the "even" terms in between: \begin{split} \sum_{j=0}^{4k+2} f \left(-4 + \frac{j}{2k+1} \right) = f(-4) &+ \sum_{j=0}^{2k} f \left(-4 + \frac{2j+1}{2k+1} \right) \\ &+ \sum_{j=1}^{2k} f \left(-4 + \frac{2j}{2k+1} \right) + f(-2). \end{split}
Define a function $g$ by $g(x) = x^{-x}$. If $x = -\frac pq$, then for $p$ even and $q$ odd, $$f(x) = \left(-\frac pq\right)^{-p/q} = \left(\frac pq\right)^{-p/q} = g(-x),$$ but for $p$ and $q$ both odd, $$f(x) = \left(-\frac pq\right)^{-p/q} = -\left(\frac pq\right)^{-p/q} = -g(-x).$$ So we can rewrite the sum as \begin{split} \sum_{j=0}^{4k+2} f \left(-4 + \frac{j}{2k+1} \right) = g(4) &- \sum_{j=0}^{2k} g \left(4 - \frac{2j+1}{2k+1} \right) \\ &+ \sum_{j=1}^{2k} g \left(4 - \frac{2j}{2k+1} \right) + g(2) \\ = g(2) &- \sum_{j=0}^{2k} g \left(2 + \frac{2j+1}{2k+1} \right) \\ &+ \sum_{j=1}^{2k} g \left(2 + \frac{2j}{2k+1} \right) + g(4). \end{split}
Since $g$ is a decreasing function over $[2,4]$, $$ g \left(2 + \frac{2j-1}{2k+1} \right) > g \left(2 + \frac{2j}{2k+1} \right) > g \left(2 + \frac{2j+1}{2k+1} \right), $$ so we add the term $g(2)$ to the sum of the "even" terms and compare them to the sum of the "odd" terms, we find that $$ g(2) + \sum_{j=1}^{2k} g \left(2 + \frac{2j}{2k+1} \right) > \sum_{j=0}^{2k} g \left(2 + \frac{2j+1}{2k+1} \right), $$ but if we instead add the sum of the "even" terms to $g(4)$, we find that $$ \sum_{j=0}^{2k} g \left(2 + \frac{2j+1}{2k+1} \right) > \sum_{j=1}^{2k} g \left(2 + \frac{2j}{2k+1} \right) + g(4). $$ We can conclude that $$ -g(2) < \sum_{j=1}^{2k} g \left(2 + \frac{2j}{2k+1} \right) - \sum_{j=0}^{2k} g \left(2 + \frac{2j+1}{2k+1} \right) < -g(4). $$ and therefore $$ \frac{1}{256} = (g(2) + g(4)) - g(2) < \sum_{j=0}^{4k+2} f \left(-4 + \frac{j}{2k+1} \right) < (g(2) + g(4)) - g(4) = \frac14. $$ Since the sum is bounded for any $k$, $$ \mu = \lim_{k\to\infty} \frac{1}{4k+3} \sum_{j=0}^{4k+2} f \left(-4 + \frac{j}{2k+1} \right) = 0 $$
Now, to make this just a little more interesting, instead of taking just the multiples of $\frac{1}{2k+1}$, suppose we consider all multiples of any fraction $\frac{1}{2t+1}$ for any integer $t \leq k$, but count each such rational number only once. That is, instead of throwing away all the multiples of $\frac13$ and replacing them with multiples of $\frac15$, then throwing them away and replacing them with multiples of $\frac17$, we let the smaller fractions "fill in" the gaps between the larger ones without throwing anything away. So at $k=3$ we have terms in the sum for all multiples of $\frac13$, $\frac15$, and $\frac17$ in the interval $[-4,-2]$, but the values $f(-4)$, $f(-3)$, and $f(-2)$ are all counted only once in the sum. For $k=4$ we add terms for all the multiples of $\frac19$ except the multiples of $\frac13$, since we already have those; and so forth.
This would be a relatively satisfying limit to evaluate. I suspect that the limit of the sum as $k$ goes to infinity is still zero, although I do not have a proof at this time. (Each new batch of terms resembles one of the $\frac{1}{2k+1}$ sums from the proof above, but it has "holes" that are not accounted for in that proof; otherwise this new limit would be practically a corollary of the previous one.)