Yesterday, at work while calculating the most optimal parameters for a data structure, I arrived at this equation.

xe^{−x} + (1 − e^{−x}) ln (1 − e^{−x}) = 0

This is a little clumsy to deal with. So, I cleaned it up by
representing e^{−x} as t. With e^{−x} = t, we get

−t ln t + (1 − t) ln (1 − t) = 0

⇒ t ln t = (1 − t) ln (1 − t)

Obviously, t = 1 − t is one solution. Thus, t = ½. Are there more solutions? The answer turns out to be 'no'.

y = −t ln t + (1 − t) ln (1 − t)

x is real in this problem and so is t. ln t is undefined for t ≤ 0. Similarly, ln (1 − t) is undefined for t ≥ 0. So, we need to consider the open interval (0, 1) to see if there are any other solutions for t. Let us rewrite the equation in a neater form and see if we can somehow eliminate the possibility of other solutions in the open interval (0, 1).

t ln t = (1 − t) ln (1 − t)

⇒ ln t^{t} = ln (1 − t)^{(1 − t)}

⇒ t^{t} = (1 − t)^{(1 − t)}

For 0 < t < ½, t < (1 − t) ⇒ t^{t} < (1 −
t)^{t}.

For ½ < t < 1, t > (1 − t) ⇒ t^{t} > (1 −
t)^{t}.

So, we see that in the open interval (0, 1), except for ½ there is no
other value for t such that t^{t} = (1 − t)^{t}. Hence,
the solution to the equation is

t = ½

⇒ e^{−x} = ½

⇒ −x = ln ½

⇒ x = ln 2

y = xe

^{−x}+ (1 − e

^{−x}) ln (1 − e

^{−x})

Two years ago, I once had to solve the following equation.

ln x − x^{0.03} = 0

There is no simple way to solve this equation. I had to resort to using
the Lambert
W function to solve this. To use this function, we need to bring our
equation to w(x) e^{w(x)} = k form where w(x) is a function of
x. The solution of w(x) e^{w(x)} = k is w(x) = W(k). Let us try
it.

ln x − x^{0.03} = 0

⇒ ln x = e^{0.03 ln x}

⇒ ln x ⋅ e^{−0.03 ln x} = 1

⇒ −0.03 ln x ⋅ e^{−0.03 ln x} = −0.03

So, if we have brought the equation in the w(x) e^{w(x)} = k
form with w(x) = −0.03 ln x and k = −0.03. Therefore, the solution is

−0.03 ln x = W(−0.03)

⇒ x = e^{W(−0.03) ⁄ 0.03}

y = ln x − x

^{0.03}

W(k) = k − k^{2} + ^{3}⁄_{2} ⋅ k^{3}
− ^{8}⁄_{3} ⋅ k^{4} +
^{125}⁄_{4} ⋅ k^{5} + …

Using this function, we get

x = e^{−0.03094 ⁄ 0.03} = 2.805 approximately

## 2 comments

## Anonymous said:

just curious to know about this "at work while calculating the most optimal parameters."

## Susam Pal said:

I am afraid, I can't discuss the details of my work here.