R: Einstein Functions

einsteinF {pracma} | R Documentation

## Einstein Functions

### Description

Einstein functions.

### Usage

    einsteinF(d, x)

### Arguments

`x` | numeric or complex vector.
`d` | parameter to select one of the Einstein functions E1, E2, E3, E4.

### Details

The Einstein functions are sometimes used for the Planck-Einstein oscillator in one degree of freedom.

The functions are defined as:

E1(x) = \frac{x^2 e^x}{(e^x - 1)^2}

E2(x) = \frac{x}{e^x - 1}

E3(x) = ln(1 - e^{-x})

E4(x) = \frac{x}{e^x - 1} - ln(1 - e^{-x})

`E1` has an inflection point as `x=2.34694130...`.

### Value

Numeric/complex scalar or vector.

### Examples

    ## Not run:
    x1 <- seq(-4, 4, length.out = 101)
    y1 <- einsteinF(1, x1)
    plot(x1, y1, type = "l", col = "red",
                 xlab = "", ylab = "", main = "Einstein Function E1(x)")
    grid()

    y2 <- einsteinF(2, x1)
    plot(x1, y2, type = "l", col = "red",
                 xlab = "", ylab = "", main = "Einstein Function E2(x)")
    grid()

    x3 <- seq(0, 5, length.out = 101)
    y3 <- einsteinF(3, x3)
    plot(x3, y3, type = "l", col = "red",
                 xlab = "", ylab = "", main = "Einstein Function E3(x)")
    grid()

    y4 <- einsteinF(4, x3)
    plot(x3, y4, type = "l", col = "red",
                 xlab = "", ylab = "", main = "Einstein Function E4(x)")
    grid()
    ## End(Not run)

[Package pracma version 2.0.4 Index]