Method on @sym: expint (x)
Method on @sym: expint (n, x)

Symbolic generalized exponential integral (expint) function.

Integral definition:

syms x
E1 = expint (x)
  ⇒ E1 = (sym) E₁(x)
rewrite (E1, 'Integral')
  ⇒ (sym)
      ∞
      ⌠
      ⎮  -t⋅x
      ⎮ ℯ
      ⎮ ───── dt
      ⎮   t
      ⌡
      1

This can also be written (using the substitution u = t⋅x) as:

      ∞
      ⌠
      ⎮  -u
      ⎮ ℯ
      ⎮ ─── du
      ⎮  u
      ⌡
      x

With two arguments, we have:

E2 = expint(2, x)
  ⇒ E2 = (sym) E₂(x)

In general:

syms n x
En = expint(n, x)
  ⇒ En = (sym) Eₙ(x)
rewrite (En, 'Integral')
  ⇒ (sym)
      ∞
      ⌠
      ⎮  -n  -t⋅x
      ⎮ t  ⋅ℯ     dt
      ⌡
      1

Other example:

syms n x
En = expint(n, x);
diff(En, x)
  ⇒ (sym) -expint(n - 1, x)

See also: expint, @sym/ei.

Package: symbolic