Skip to content

Commit

Permalink
Merge pull request #1 from raoulb/error_meijerg
Browse files Browse the repository at this point in the history
Make erfc and erfi functions available to MeijerG integration code
  • Loading branch information
vramana committed Dec 30, 2012
2 parents 38999aa + 96e6082 commit e3c6b46
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sympy/integrals/meijerint.py
Expand Up @@ -81,7 +81,7 @@ def eval(cls, arg):

# Section 8.4.2
from sympy import (gamma, pi, cos, exp, re, sin, sqrt, sinh, cosh,
factorial, log, erf, polar_lift)
factorial, log, erf, erfc, erfi, polar_lift)
# TODO this needs more polar_lift (c/f entry for exp)
add(Heaviside(t - b)*(t - b)**(a - 1), [a], [], [], [0], t/b,
gamma(a)*b**(a - 1), And(b > 0))
Expand Down Expand Up @@ -190,9 +190,12 @@ def make_log3(subs):
add(expint(a, t), [], [a], [a - 1, 0], [], t)

# Section 8.4.14
# TODO erfc
add(erf(t), [1], [], [S(1)/2], [0], t**2, 1/sqrt(pi))
# TODO exp(-x)*erf(I*x) does not work
add(erfc(t), [], [1], [0, S(1)/2], [], t**2, 1/sqrt(pi))
# This formula for erfi(z) yields a wrong(?) minus sign
#add(erfi(t), [1], [], [S(1)/2], [0], -t**2, I/sqrt(pi))
add(erfi(t), [S(1)/2], [], [0], [-S(1)/2], -t**2, t/sqrt(pi))

# Fresnel Integrals
add(fresnels(t), [1], [], [S(3)/4], [0, S(1)/4], pi**2*t**4/16, S(1)/2)
Expand Down

0 comments on commit e3c6b46

Please sign in to comment.