How to isolate $x$ in $a^x + b^x = c$? (For use in medical statistics)

336 Views Asked by At

I've broken a somewhat complex calculation down to the following mathematical equation to be solved:

$a^x + b^x = c$

How do I find $x$ when $a, b$ and $c$ are given as parameters?

I.e., if $a=3$, $b=4$ and $c=25$, then the solution is $x=2$.

(The question has nothing to do with geometry - this is just the simplest example I can come up with.)

Background

For specifying a person's overweight/underweight, the term Z-score is used and the Z-score is calculated based on the person's BMI, sex and age. For each sex and age interval, the constants $\lambda$, $\mu$ and $\sigma$ are given.

I have the formula $Z = \frac{(\frac{B}{ \mu})^\lambda -1}{\lambda\sigma}$, where $B$ is the person's BMI, for calculating the Z-score. Also, I have a set of $B$-values for a specific age and sex, for $Z \in \{-2, -1, 0, 1, 2\}$. For $Z=n$, let's call the $B$ data set $B_n$.

My task is, based on the above knowledge, to calculate $\mu$, $\sigma$ and $\lambda$ for a specific sex and age, so I can calculate the Z-score for a specific BMI, based on sex and age.

It is obvious that $\mu = B_0$. Moreover, using the Z-formula on $B_1$, I get $\sigma = \frac{(\frac{B_1}{B_0})^\lambda -1}{\lambda}$.

Using the Z-formula on $B_1$ and $B_{-1}$, I get $(\frac{B_{-1}}{B_0})^\lambda + (\frac{B_{1}}{B_0})^\lambda = 2$.

So, pretty simple, I just need to find how to isolate $x$ in the equation $a^x + b^x = c$...

2

There are 2 best solutions below

1
On

There is almost surely no closed form expression, but a qualitative approach is possible.

If $b=a$, there is clearly a solution. Let us assume $\dfrac{b}{a}>1$, WLOG.

Taking the natural logarithm of both sides of the given equation:

$$\operatorname{ln}(a^x (1+\left(\tfrac{b}{a}\right)^x)=\operatorname{ln}(c)$$

$$\operatorname{ln}(a^x)+\operatorname{ln}(1+\left(\tfrac{b}{a}\right)^x)=\operatorname{ln}(c)$$

$$-x\operatorname{ln}(a)+\operatorname{ln}(c)=\operatorname{ln}(1+\left(\tfrac{b}{a}\right)^x)$$

which represents the equation verified by the abscissas of the possible intersection point(s) of the straight line (L) (magenta on the figure) and curve (C) (red on the figure) with resp. equations:

$$\begin{cases}y&=&-x\operatorname{ln}(a)+\operatorname{ln}(c)\\ y&=&\operatorname{ln}(1+\left(\tfrac{b}{a}\right)^x)\end{cases}$$

Please note that the second curve has a slant asymptote with equation $y=x \ln(b/a)$.

Therefore, 3 cases can occur with 0, 1 or 2 roots,

according to the resp. values of $a,b,c$. One cannot have more than two roots because curve (C) can be shown to be convex, and a straight line cannot intersect a convex curve in more than two points.

enter image description here

Fig. 1: The given case $a=3;b=4;c=25$ with a unique root at $x=2$.

enter image description here

Fig. 1: The case $a=0.5;b=2;c=2.5$ with two roots $x=-1$ and $x=1$.

0
On

1)

For your mathematical problem, $a,b,c,x\in\mathbb{R}$ is sufficient.

2)

$$a^x+b^x=c$$

Substitute $x=\frac{\ln(t)}{\ln(a)}$:

$$a^{\frac{\ln(t)}{\ln(a)}}+b^{\frac{\ln(t)}{\ln(a)}}=c$$

$$t+t^{\frac{\ln(b)}{\ln(a)}}=c$$

Substitute $\frac{\ln(b)}{\ln(a)}=\alpha$:

$$t+t^\alpha=c$$

For rational $\alpha$, this equation is related to an algebraic equation and we can use the known solution formulas and methods for algebraic equations. For certain $a,\beta$ and $b=a^\beta$ (WolframAlpha), $\alpha$ is rational.
For rational $\alpha\neq 0,1$, the equation is related to a trinomial equation.
For real or complex $\alpha\neq 0,1$, the equation is in a form similar to a trinomial equation. A closed-form solution can be obtained using confluent Fox-Wright Function $\ _1\Psi_1$ therefore.
$\ $

Szabó, P. G.: On the roots of the trinomial equation. Centr. Eur. J. Operat. Res. 18 (2010) (1) 97-104

Belkić, D.: All the trinomial roots, their powers and logarithms from the Lambert series, Bell polynomials and Fox–Wright function: illustration for genome multiplicity in survival of irradiated cells. J. Math. Chem. 57 (2019) 59-106

3)

If $a,b,c,x\in\mathbb{N}$, your equation is a Diophantine equation.