Comment #10 on issue 2624 by [email protected]: Sympy 0.7.1 can't integrate Gaussians
http://code.google.com/p/sympy/issues/detail?id=2624

The ideal solution would be to figure out ways to make it simpler
in the algorithm itself.

I agree, but I don't see how to. integrate(exp(-(x-1)**2), (x, -oo, oo)) comes out nice because the input is nice. [As you saw above, there the integral is split into two exp(-x**2) integrals, which both come out neat]. On the other hand integrate(exp(2*x - x**2 - 1), (x, -oo, oo)) does not suggest anything sensible, so it is just split at zero. We happen to be able to do the integral, but I don't know how one could recognise in advance that the answer is going to be so neat.

Tom what exactly is the functionality in gsoc-3 that isn't in gsoc-2?

Mostly polishing:

- some bug fixes
- improved heuristics (i.e. we can do more integrals, and do them faster)
- some performance improvements
- lerch transcendent, polylog etc; and recognition of those in hyperexpand()
- exponential integrals (recognised in both meijerint and hyperexpand)

Tom would have to answer if gsoc-3 can be ready by the 23rd

Ready for show-off certainly. Ready for review as well, I think. Reviewed seems unlikely to me :-).

2) What has to be done to handle the integral from
http://www-m3.ma.tum.de/bornemann/Numerikstreifzug/Chapter9/MeijerG.pdf?

Nothing:

In [3]: alpha = Symbol('alpha', positive=True)

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

[This is not quite the same answer as in the paper, but they agree numerically.]

To be fair:

- I just fixed a bug (which, incidentially, I had noticed *yesterday* last thing before end of work, and before seeing your comment) - if you run it through integrate(), it's slow, even with meijerg=True. The reason is that for integrals over finite intervals we first try to compute an antiderivative [since most often meijerg does not work in that case]. And meijerint_indefinite tries hard to find an antiderivative, but does not succeed.


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

Reply via email to