LambertWDiffeq - crowlogic/arb4j GitHub Wiki

The Lambert W function, also known as the product logarithm, is a function that solves equations of the form:

$z = w \cdot e^w$

where $z$ is a complex number and $w$ is the complex solution. In other words, the Lambert W function, $W(z)$, satisfies the equation:

$W(z) \cdot e^{W(z)} = z$

To relate this to a differential equation, consider the following first-order differential equation:

$y'(x) = \frac{y(x)}{x} \cdot e^{y(x)}$

Here, $y'(x)$ denotes the first derivative of $y(x)$ with respect to $x$. To solve this differential equation using the Lambert W function, let:

$y(x) = W(x \cdot e^x)$

Taking the derivative with respect to $x$, we get:

$y'(x) = W'(x \cdot e^x) \cdot (1 + x)$

Using the property of Lambert W function, $W'(z) = \frac{W(z)}{z \cdot (1 + W(z))}$, we get:

$y'(x) = \frac{W(x \cdot e^x)}{x \cdot (1 + W(x \cdot e^x))} \cdot (1 + x)$

$y'(x) = \frac{y(x)}{x} \cdot e^{y(x)}$

Thus, the given differential equation is solved by the Lambert W function with the solution:

$y(x) = W(x \cdot e^x)$