[PDF] III17 The Lambert W Function - Princeton University



Previous PDF Next PDF







Introduction to the R Language - Functions

The scoping rules for R are the main feature that make it di erent from the original S language The scoping rules determine how a value is associated with a free variable in a function R uses lexical scoping or static scoping A common alternative is dynamic scoping Related to the scoping rules is how R uses the search list to bind a value to



Writing R Functions - CMU Statistics

Programming in R is organized around functions You all know what a mathemat-ical function is, like logx or (z) or sin : it is a rule which takes some inputs and delivers a definite output A function in R, like a mathematical function, takes zero or more inputs, also called arguments, and returns an output The output is arrived



Apply functions with purrr : : CHEAT SHEET

purrr::map_lgl( x, f, Apply f element-wise to x, return a logical vector n_iris > transmute(n = map_lgl(data, is matrix)) purrr::map_int( x, f, Apply f



Package ‘futureapply’ - The Comprehensive R Archive Network

future apply future apply: Apply Function to Elements in Parallel using Futures Description The future apply packages provides parallel implementations of common "apply" functions pro-vided by base R The parallel processing is performed via the future ecosystem, which provides



list of some useful R functions - Columbia University

integrate() - adaptive quadrature over a nite or in nite interval 4 Plotting plot() - generic R object plotting par() - set or query graphical parameters



A ``Level-Zero Tutorial for Getting Started with R

a “level-zero" tutorial for getting started with r 2 This tutorial will use screenshots from the Mac version, but other than appearance, everything should be similar in Windows Opening R for the First Time When you open R, the main window that opens is the R console, shown in Figure 2 A second window, for a script editor, may also open



∫bf (x) ∫Af (x - ConsultGLP

Now, let’s see how we can use R language to plot a density function Define a vector x over the domain We can then apply the distribution’s density function to x and then plot the result The code sniper plots the standard normal distribution: > x plot(x,dnorm(x)) >



Package ‘xts’ - R

Apply a function to the data of an existing xts plot object and plot the result FUN should have arguments x or R for the data of the existing xts plot object to be passed to All other additional arguments for FUN are passed through Usage addPanel(FUN, main = "", on = NA, type = "l", col = NULL, lty = 1, lwd = 1, pch = 1, ) Arguments



Introduction to the eventstudies package in R

Introduction to the eventstudies package in R Ajay Shah Sargam Jain June 1, 2020 1 The standard event study in nance In this section, we look at using the ‘eventstudies’ package for the purpose of doing the standard event study using daily returns data in nancial economics This is a workhorse application of event studies



III17 The Lambert W Function - Princeton University

thereof Images of Wk(reiθ)for various k, r, and θare shown in figure 2 In contrast to more commonly encountered multi-branched functions, such as the inverse sine or cosine, the branches of Ware not linearly related However, by rephrasing things slightly, in terms of the unwinding number K(z):= z−ln(ez) 2πi and the related single

[PDF] croquis france potentialités et contraintes

[PDF] néon configuration électronique

[PDF] ion carbone formule

[PDF] le territoire français des milieux aménagés des milieux ? ménager

[PDF] ion sulfite

[PDF] exercice enthalpie libre et potentiel chimique

[PDF] palme funeraire

[PDF] ion sodium nombre de charges positives du noyau

[PDF] exercice potentiel chimique

[PDF] td potentiel chimique

[PDF] composition de l'atome d'oxygène

[PDF] exercices corrigés sur les équilibres chimiques pdf

[PDF] humidité du sol calcul

[PDF] potentiel matriciel du sol définition

[PDF] teneur en eau sol

III.17. The LambertWFunction151

faster than shorter ones, Zabusky and Kruskal simu- lated the collision of two waves in a nonlinear crys- tal lattice and observed that each retains its shape and speed after collision. Interacting solitary waves merely experience a phase shift, advancing the faster wave and retarding the slower one. In analogy with colliding par- ticles, they coined the word "solitons" to describe these elastically colliding waves.

To model water waves that are weakly nonlinear,

weakly dispersive, and weakly two-dimensional, with all three effects being comparable, Kadomtsev and Petviashvili (KP) derived a two-dimensional version of (2) in 1970: (u t +6uu x +u xxx x +3σ 2 u yy =0,(6) whereσ 2 =±1 and they-axis is perpendicular to the direction of propagation of the wave (along thex-axis).

The KdV and KP equations, and thenonlinear

iu t +u xx +κ|u| 2 u=0 (7) (whereκis a constant andu(x,t)is a complex-valued function), are famous examples of so-called completely integrable nonlinear PDEs. This means that they can be solved with the inverse scattering transform, a nonlinear analogue of the Fourier transform. The inverse scattering transform is not applied to (2) directly but to an auxiliary system of linear PDEs, xx 1 6

αu)ψ=0,(8)

t 1 2 αu x

ψ+αuψ

x +4ψ xxx =0,(9) which is called theLax pairfor the KdV equation. Equa- functionψ, a constant eigenvalueλ, and a potential

αu)/

6. Equation (9) governs the time evolution ofψ.

The two equations are compatible, i.e.,ψ

xxt txx if and only ifu(x,t)satisfies (2). For givenu(x,0) decaying sufficiently fast as|x|→∞, the inverse scat- tering transform solves (8) and (9) and finally deter- minesu(x,t).

4 Properties and Applications

Scientists remain intrigued by the rich mathemati- cal structure of completely integrable nonlinear PDEs. These PDEs can be written as infinite-dimensional bi- Hamiltonian systems and have additional, remarkable features. For example, they have an associated Lax pair, they can be written in Hirota"s bilinear form, they admit

property. They have an infinite number of conservedquantities, infinitely many higher-order symmetries,

and an infinite number of soliton solutions. As well as being applicable to shallow-water waves, the KdV equation is ubiquitous in applied science. It describes, for example, ion-acoustic waves in a plasma, elastic waves in a rod, and internal waves in the atmo- sphere or ocean. The KP equation models, for exam- ple, water waves, acoustic waves, and magnetoelastic waves in anti-ferromagnetic materials. The nonlinear dispersive wave packets in physical systems, e.g., light pulses in optical fibers, surface waves in deep water, Langmuir waves in a plasma, and high-frequency vibra- tions in a crystal lattice. Equation (7) with an extra lin- ear termV(x)uto account for the external potential V(x)also arises in the study of Bose-Einstein conden- sates, where it is referred to as the time-dependent

Gross-Pitaevskii equation.

Further Reading

Ablowitz, M. J. 2011.Nonlinear Dispersive Waves: Asymp- totic Analysis and Solitons . Cambridge: Cambridge Univer- sity Press. Ablowitz, M. J., and P. A. Clarkson. 1991.Solitons, Nonlinear Evolution Equations and Inverse Scattering. Cambridge:

Cambridge University Press.

Kasman, A. 2010.Glimpses of Soliton Theory. Providence,

RI: American Mathematical Society.

Osborne, A. R. 2010.Nonlinear Ocean Waves and the Inverse

Scattering Transform

. Burlington, MA: Academic Press.

III.17 The LambertWFunction

Robert M. Corless and David J. Jeffrey

1 Definition and Basic Properties

For a given complex numberz, the equation

we w =z has a countably infinite number of solutions, which are denoted byW k (z)for integersk. Each choice ofkspeci- fies abranchof the LambertWfunction. By convention, only the branchesk=0 (called theprincipalbranch) andk=-1 are real-valued for anyz; the range of every other branch excludes the real axis, although the range ofW 1 (z)includes(-∞,-1/e]in its closure. OnlyW 0 (z) contains positive values in its range (see figure 1). When z=-1/e (the only nonzero branch point), there is a double rootw=-1 of the basic equationwe w =z.

The conventional choice of branches assigns

W 0 1 e )=W 1 1 e

152III. Equations, Laws, and Functions of Applied Mathematics

1 zW W 0 W 1 -e -1 -4-3-2-1 -11 2 3 Figure 1Real branches of the LambertWfunction. The solid line is the principal branchW 0 ; the dashed line isW 1 which is the only other branch that takes real values. The small filled circle at the branch point corresponds to the one in figure 2. and implies thatW 1 1 e-iε 2 )=-1+O(ε)is arbitrar- ily close to-1 because the conventional branch choice means that the point-1 is on the border between these three branches. Each branch is a single-valued com- plex function, analytic away from the branch point and branch cuts. The set of all branches is often referred to, loosely, as the LambertW"function"; but of courseWis multival- ued. Depending on context, the symbolW(z)can refer to the principal branch ( k=0) or to some unspecified branch. Numerical computation of any branch ofWis typically carried out by Newton"s method or a variant thereof. Images ofW k (re iθ )for variousk,r, andθare shown in figure 2.

In contrast to more commonly encountered multi-

branched functions, such as the inverse sine or cosine, the branches ofWare not linearly related. However, by rephrasing things slightly, in terms of theunwinding number

K(z):=z-ln(e

z 2 πi and the relatedsingle-valuedfunction

ω(z):=W

K(z) e z which is called theWrightωfunction, we do have the somewhat simple relationship between branches that W k (z)=ω(ln k z), where ln k zdenotes lnz+2πikand 3 2 1 0 -3 -2 -1

3210-3 -2 -1

Im (W k (z Re (W k (z ) ) Figure 2Images of circles and rays in thez-plane under the mapsz→W k (z) . The circle with radius e 1 maps to a curve that goes through the branch point, as does the ray along the negative real axis. This graph was produced in Maple by numerical evaluation ofω(x+iy)=W K(iy) e x+iy )first for a selection of fixedxand varyingy, and then for a selection of fixedyand varyingx. These two sets produce orthogonal curves as images of horizontal and vertical lines inxandyunderωor, equivalently, images of circles with constantr=e x and rays with constantθ=yunderW. lnzis the principal branch of the logarithm, having

π The Wrightωfunction helps to solve the equation y+lny=z. We have that, ifz?=t±iπfort<-1, theny=ω(z).Ifz=t-iπfort<-1, then there is no solution to the equation; ifz=t+iπfort<-1, then there are two solutions:ω(z)andω(z-2πi).

1.1 Derivatives

Implicit differentiation yields

W (z)=e W(z)

1+W(z))

as long asW(z)?=-1. The derivative can be simplified to therationaldifferential equation dW dz=Wz(1+W) if, in addition,z?=0. Higher derivatives follow natu-

III.17. The LambertWFunction153

1.2 Integrals

Integrals containingW(x)can often be performed ana- lytically by the change of variablew=W(x), used in an inverse fashion:x=we w . Thus,? sinW(x)dx=? 1+w)e w sinwdw, and integration using usual methods gives 1 2 1+w)e w sinw- 1 2 we w cosw, which eventually gives

2sinW(x)dx=?

x+x W(x)? sinW(x) -xcosW(x)+C. More interestingly, there are manydefiniteintegrals for W(z), including one for the principal branch that is due to Poisson and is listed in the famous table of integrals by D. Bierens de Haan. The following integral, which is of relatively recent construction and which is valid forznot in(-∞,-1/e], can be computed with spectral accuracy by the trapezoidal rule: W(z) z=12π?

1-vcotv)

2 +v 2 z+vcscve vcotv dv.

1.3 Series and Generating Functions

Euler was the first to notice, using a series due to Lam- bert, that what we now call the LambertWfunction has a convergent series expansion aroundz=0:

W(z)=?

n?1 n) n 1 n !z n

Euler knew that this series converges for-1/e

?z? 1 e. The nearest singularity is the branch pointz= 1 e.

Wcan also be expanded in series about the branch

point. The series at the branch point can be expressed most cleanly using thetree functionT(z)=-W(-z) rather thanWorω, but keeping withWwe have W 0 e 1 z 2 2 n?0 1 n a n z n W 1 e 1 z 2 2 n?0 a n z n where thea n are given bya 0 =a 1 =1 and a n =1 (n+1)a 1 a n 1 n 1 k 2 ka k a n 1 k These give an interesting variation onstirling"s for- mula[IV.7§3] for the asymptotics ofn!. Euler"s integral n 0 t n e t dtis split at the maximum of the integrand (t=n), and each integral is transformed using the substitu- tionst=-nW k e 1 z 2 2 , wherek=0 is used for t ?nandk=-1 otherwise. The integrands then simplify tot n e t =n n e n e nz 2 2 and the differentials dtare obtained as series from the above expansions.

Term-by-term integration leads to

n !≂n n 1 e n k?0 2 k+1)a 2 k 1 ?2 n? k 1 2

Γ(k+

1 2 whereΓis the gamma function. Asymptotic series forz→∞have been known since de Bruijn"s work in the 1960s. He also proved that the asymptotic series are actually convergent for large enoughz. The series begin as follows:W k (z)≂ln k (z)- ln ln k (z))+o(lnln k z). Somewhat surprisingly, these series can be reversed to give a simple (though appar- ently useless) expansion for the logarithm in terms of compositions ofW: lnz=W(z)+W(W(z))+W(W(W(z)))+··· +W (N) (z)+lnW (N) (z) for a suitably restricted domain inz. The series obtained by omitting the term lnW (N) (z)is not con- vergent asN→∞, but for fixedNif we letz→∞ the approximation improves, although only tediously slowly.

2 Applications

BecauseWis a so-called implicitly elementary func- tion, meaning it is defined as an implicit solution of an equation containing only elementary functions, it can be considered an "answer" rather than a question. That it solves a simple rational differential equation means that it occurs in a wide range of mathematical models. Out of many applications, we mention just two favorites.

First, a serious application.Woccurs in a chemi-

cal kinetics model of how the human eye adapts to darkness after exposure to bright light: a phenomenon known as bleaching. The model differential equation is d dtO p (t)=K m O p (t)

τ(K

mquotesdbs_dbs16.pdfusesText_22