Non-trivial solution for $2*a^k = b^k + c^k$ I have a data set where I want its median to be the arithmetic average of maximum and minimum by multiplying every value with a factor $k$ and then applying the exponential function. This leads to the following equation:
$$e^{k*median} = (e^{k*min} + e^{k*max})/2$$
and thus
$$2*{e^{median}}^k = {e^{max}}^k + {e^{min}}^k$$
or more general
$$2*a^k = b^k + c^k$$
Is it possible to determine a non-trivial solution ($k \not= 0$) algebraically? Or are there at least always converging approximation algorithms I could possibly use?
 A: Unfortunately, there's no obvious way to solve for $k$ to obtain an exact answer. However, an iterated solution can be found, and a limit expression obtained.
I assume that, due to the setup, you have that $0<b<a<c$ (where $b=e^{min}$ and $c=e^{max}$). Let's rescale the problem to simplify the numbers. If we divide through by $a^k$, then we get
$$
2 = B^k + C^k
$$
Where $B=b/a$ and $C=c/a$. We also have that $0<B\leq1$ and $C\geq1$. Now, we get our first estimate for $k$ by assuming that $B=0$. This gives
$$
2 = C^{k_1}
$$
Which is trivially solved to get $k_1=\frac{\ln 2}{\ln C}$. Now, we seek a better approximation. So we substitute $k_1$ into the index for $B$, and solve again. That is, we solve
$$
2 = B^{k_1}+C^{k_2}
$$
for $k_2$. So
$$
k_2 = \frac{\ln (2-B^{k_1})}{\ln C}
$$
We can repeat this indefinitely, to give
$$
k_{n+1} = \frac{\ln (2-B^{k_n})}{\ln C}
$$
Note that this may converge to the trivial solution. In this case, switch the roles of $B$ and $C$. In fact, you can determine which direction to take by looking at the product $BC$. If $BC=1$, then you can write
$$
2 = B^k + (1/B)^k\\
0 = B^{2k} - 2 B^k + 1\\
(B^k-1)^2=0\\
B^k = 1\\
k = 0
$$
If $BC>1$, then use $k_0 = \frac{\ln 2}{\ln B}$ and $k_{n+1} = \frac{\ln (2-C^{k_n})}{\ln B}$. If $BC<1$, then use $k_0 = \frac{\ln 2}{\ln C}$ and $k_{n+1} = \frac{\ln (2-B^{k_n})}{\ln C}$. In either case, iterate until it has converged enough to satisfy you.
There is a faster way, though. Letting $f(x)=2-B^x-C^x$, you can use Newton's method to converge faster, using the formula
$$
k_{n+1} = k_n + \frac{2-B^{k_n}-C^{k_n}}{B^{k_n}\ln B + C^{k_n}\ln C}
$$
