0

This is my first post, so go easy on me if I've made some mistakes. I'm also not a mathematician, but rather an experimental physicist.

Basically, I have a problem where I need to take the mean of a function given by a sum of two terms, $f(x) = A(x) + B(x)$, and I'm wondering if it makes sense to first take the mean of each term and then sum them, $ \left\langle A(x) \right\rangle + \left\langle B(x) \right\rangle$, or whether I have to take the mean of the entire function, $ \left\langle f(x) \right\rangle$. I get two different results, so I'm guessing one is correct and the other isn't, but I don't understand why that is.

The problem is that the $A(x)$-term does not converge when I try and take the arithmetic mean, so I have to take the harmonic mean of that term instead:

$$ f(x) = \Bigl[ \cos^2 \Bigl( \frac{\pi x}{L}-\frac{\pi}{2} \Bigr) \Bigr]^{-1} + B(x)$$

The second term, $B(x)$, can in principle be any function, so it could be that in certain cases I won't be able to take the arithmetic mean of that term; however, in my case it's simply a constant, $B$:

$$ f(x) = \Bigl[ \cos^2 \Bigl( \frac{\pi x}{L}-\frac{\pi}{2} \Bigr) \Bigr]^{-1} + B$$

When I now take the arithmetic mean of $f(x)$ I get,

$$ \left\langle f \right\rangle = \frac {1}{L^{-1} \int_0^L f^{-1} dx}$$

$$ \left\langle f \right\rangle = \Bigl( \frac{1}{2}-\frac{1}{B} \Bigr)^{-1}$$

However, had I taken the mean of each term and then added them together, $ \left\langle A(x) \right\rangle + \left\langle B(x) \right\rangle$, I will get,

$$ \left\langle A(x) \right\rangle + \left\langle B(x) \right\rangle = 2 + B $$

I'm a bit confused about that. As far as what I understand for means, I should be able to do both and get the same result, no? So why is,

$$ \left\langle f \right\rangle \neq \left\langle A(x) \right\rangle + \left\langle B(x) \right\rangle$$

Am I doing something wrong here? Or is this a property of harmonic means?

Any help would be much appreciated,

Jason

  • 2
    If both $A(x)$ and $B(x)$ have finite arithmetic means $\langle A(x)\rangle$ and $\langle B(x)\rangle$ then you can say $\langle A(x)+B(x)\rangle = \langle A(x)\rangle + \langle B(x)\rangle$. In this sense the arithmetic mean of the sum is equal to the sum of the arithmetic means. It is usually false that the harmonic mean of the sum is equal to the sum of the harmonic means, even if one of the terms is a non-zero constant. – Henry Apr 10 '20 at 13:43
  • @Henry Thank you for the answer! That makes me feel better. Would it then still be a correct approach to sum the means? If they are not equal, which approach is more correct? – Jason Rohr Apr 10 '20 at 14:01
  • If "the $A(x)$-term does not converge" when you try and take the arithmetic mean then I would say you are stuck. Dealing with such infinities is an example of where mathematics and modern physics diverge – Henry Apr 10 '20 at 14:05
  • @Henry But the harmonic mean of $A(x)$ alone is used in physics, and I'm currently showing that the expression where I add the constant $B$ to $f$, I can expand on that theory and describe a more general case. The analytical result fits with my numerical calculations. Are you saying that harmonic means are not strictly physical? If that's the case can I treat it as a good approximation? – Jason Rohr Apr 10 '20 at 14:11

1 Answers1

0

Let's take a simple example to show that the harmonic means do not work this way.

Suppose we have $A$ taking equally common distinct positive values $a_1$ and $a_2$ with arithmetic mean $\frac{a_1+a_2}{2}$ and harmonic mean $\frac{2a_1a_2}{a_1+a_2}$, and $B$ being the positive constant $b$.

Now consider the difference between sum of the harmonic means of $A$ and $B$ and the harmonic mean of the sum of $A$ and $B$. This is $$\left(\frac{2a_1a_2}{a_1+a_2} +b\right) - \frac{2(a_1+b)(a_2+b)}{(a_1+b)+(a_2+b)} \\= -\frac{(a_1-a_2)^2b}{(a_1+a_2)(a_1+a_2+2b)}$$ which is negative rather than $0$.

Henry
  • 157,058