Comment #11 on issue 2624 by ness...@googlemail.com: Sympy 0.7.1 can't integrate Gaussians
http://code.google.com/p/sympy/issues/detail?id=2624

I should mention that, of course, we can do all the steps of the paper by hand:

In [6]: mellin_transform((2-x)**alpha*Heaviside(2-x), x, s)
Out[6]:
⎛ α + s                            ⎞
⎜2     ⋅Γ(s)⋅Γ(α + 1)              ⎟
⎜────────────────────, (0, ∞), True⎟
⎝    Γ(α + s + 1)                  ⎠

In [7]: mellin_transform(sin(alpha/x), x, s)
Out[7]:
⎛ -s - 1   ⎽⎽⎽  s  ⎛  s   1⎞               ⎞
⎜2      ⋅╲╱ π ⋅α ⋅Γ⎜- ─ + ─⎟               ⎟
⎜                  ⎝  2   2⎠               ⎟
⎜───────────────────────────, (-1, 1), True⎟
⎜           ⎛s    ⎞                        ⎟
⎜          Γ⎜─ + 1⎟                        ⎟
⎝           ⎝2    ⎠                        ⎠

In [8]: inverse_mellin_transform(_6[0], s, x, _6[1], as_meijerg=True)
Out[8]:
 α          ╭─╮0, 1 ⎛1     │ 2⎞
2 ⋅Γ(α + 1)⋅│╶┐     ⎜      │ ─⎟
            ╰─╯1, 1 ⎝   -α │ x⎠

In [9]: inverse_mellin_transform(_7[0], s, x, _7[1], as_meijerg=True)
Out[9]:
              ⎛       │   2 ⎞
  ⎽⎽⎽ ╭─╮1, 0 ⎜       │  α  ⎟
╲╱ π ⋅│╶┐     ⎜       │ ────⎟
      ╰─╯0, 2 ⎜1/2  0 │    2⎟
              ⎝       │ 4⋅x ⎠

In [10]: integrate(_8*_9, (x, 0, oo))
Out[10]:
                         ⎛           α   1  α     │  2⎞
  ⎽⎽⎽            ╭─╮3, 0 ⎜           ─ + ─, ─ + 1 │ α ⎟
╲╱ π ⋅α⋅Γ(α + 1)⋅│╶┐     ⎜           2   2  2     │ ──⎟
                 ╰─╯2, 4 ⎜                        │ 16⎟
                         ⎝0, 0, 1/2      -1/2     │   ⎠
───────────────────────────────────────────────────────
                           4

The only differences are that (1) meijerint_definite uses a table of mellin transforms instead of the mellin_transform() function (at least initially) - but this table is of course where mellin_transform() gets its results from in the end, and (2) that the algorithm adds in the Heaviside function for you (which I did by hand in the very first line).

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to