File:Diagram of the real branches of the Lambert W function.png
Summary
Description |
English: The two real branches and of the Lambert W function. Deutsch: Die zwei reellen Zweige und der Lambert W function. |
Date | |
Source | Own work |
Author | Stephan Kulla (User:Stephan Kulla) |
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution 3.0 Unported license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
Source code
Category:PNG created with Matplotlib#Diagram%20of%20the%20real%20branches%20of%20the%20Lambert%20W%20function.pngThis diagram was created with NumPy and matplotlib.
import pylab
from scipy.special import lambertw
from numpy import e, arange, append
pylab.axhline(color="black")
pylab.axvline(color="black")
pylab.grid()
# plot first branch of lambert w function
domain1 = arange(-1/e+0.0000001, 3.001, 0.01)
pylab.plot(domain1, lambertw(domain1, 0), color="blue")
pylab.text(0.2,0.4,"$W_0$", color="blue")
# plot second branch of lambert w function
domain2 = arange(-1/e+0.0000001, -0.02, 0.0001)
pylab.plot(domain2, lambertw(domain2, -1), color="green")
pylab.text(-0.3,-4.5,"$W_{-1}$", color="green")
pylab.savefig("lambertw.png")