4

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.

  • 1
    There are numerical methods to solve this equation, but you can not solve it algebraically.

    You might look at the numerical Lambert-W-function or other approximations like Newtons method.

    – Cornman Apr 13 '19 at 22:52
  • @Cornman Thank you, numerical methods definitely seem like a way to go. For some reason I was confused because trying a "NSolve" in Mathematica wasn't giving me an answer, but now I see that you can get an answer using "FindRoot." Newton–Raphson matches my answer in just a few iterations. I'm having a harder time figuring out how the Lambert W function could be used in my case, does anyone have any tips on that? – SneezyTheDwarf Apr 13 '19 at 23:23
  • 1
    I would recommend you to open a thread on the question on the Lambert-W-function. Unfortunatly I have never used it myself, so I am not sure, if it works here, since it requires a specific form. Namely $f(x)e^{f(x)}=y$. – Cornman Apr 13 '19 at 23:38

2 Answers2

5

$$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}$$

E.H.E
  • 23,590
  • 1
    Awesome! Definitely seems to work. I never would have realized the relation coth(x/2)=(e^x+1)/(e^x-1). I'm trying to wrap my head around how you go from x=4tanh(x/2) to knowing you can iterate to the solution with x_(i+1)=4tanh(x_i/2). Care to add any insight on that? You'll have to pardon me if that's a dumb question, I haven't taken math in a while. – SneezyTheDwarf Apr 13 '19 at 23:11
  • 3
    This is a general method for numerically solving equations of the form $x=g(x)$ known as fixed point iteration. See e.g. http://wwwf.imperial.ac.uk/metric/metric_public/numerical_methods/iteration/fixed_point_iteration.html, or search online for "fixed point iteration". – Minus One-Twelfth Apr 13 '19 at 23:14
  • 1
    As $4\tanh{(\frac{x}2)}$ is increasing for positive $x$ by repeatedly evaluating the function the value of $x$ will increase until a stationary point is reached - the solution to $x=\tanh{(\frac{x}2)}$ – Peter Foreman Apr 13 '19 at 23:15
  • 1
    @SneezyTheDwarf see the comment of Minus One-Twelfth – E.H.E Apr 13 '19 at 23:20
3

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$.