Is there a way to solve $x\left(\frac{e^x+1}{e^x-1}\right)=4$ for x besides just plugging numbers in?

89 Views Asked by At

This comes into play in the equation for the shift in Cosmic Microwave Background (CMB) photon frequency due to inverse Compton scattering:

$\frac{\Delta T}{T_{CMB}} = y \left( x\left(\frac{e^x+1}{e^x-1}\right)-4 \right)$

Where $y$ is essentially the integral of electron pressure, and $x$ is a scaled frequency. To find the null frequency, where the CMB temperature doesn't change, you need to solve for $\Delta T = 0$, and therefore you get what's in the title:

$x\left(\frac{e^x+1}{e^x-1}\right)=4$

I know by plotting the left hand side and then just plugging in numbers that the answer is $x = 3.830016097$ but I was wondering if there was any other way to solve for x.

2

There are 2 best solutions below

4
On

$$x\left(\frac{e^x+1}{e^x-1}\right)=4$$ $$x\coth\frac{x}{2}=4$$ $$x=4\tanh\frac{x}{2}$$ it is easy to get the solution by iteration $$x_{i+1}=4\tanh\frac{x_i}{2}$$

0
On

As said in comments, you can rewrite the equation as $$e^{-x}=-\frac{x-4}{x+4}$$ the solution of which being given in terms of the generalized Lambert function.

From a formal point of view, this is nice but not very practical and numerical method such as Newton will be extremely powerful.

Notice that, since you use Mathematica, you could perform a series expansion to get $$x\left(\frac{e^x+1}{e^x-1}\right)=2+\frac{x^2}{6}-\frac{x^4}{360}+\frac{x^6}{15120}-\frac{x^8}{604800}+\frac{x^{10}}{ 23950080}+O\left(x^{12}\right)$$ Then, use series reversion to get $$x=t+\frac{t^3}{120}+\frac{t^5}{22400}-\frac{t^7}{2688000}-\frac{163 t^9}{19869696000}+O\left(t^{11}\right)$$ where $t=\sqrt{6(y-2)}$. Making $y=4$ would give $$x=\frac{9534829 \sqrt{3}}{4312000}\approx 3.82996 $$ while the exact solution is $3.83002$.