If you set alpha as positive the arguments reduce.

These come from Tom Bachmann's GSoC project. The docstrings of those
functions explain what they are. Basically, in order to get correct
results, we have to keep track of complex numbers on the domain of the
complex logarithm, rather than just the complex plane.

Unfortunately, there has been no work done on simplifying these
conditions that are returned by the algorithm, even though in many
(most?) cases they can be simplified a lot.

There is als a conds flag that you can pass to integrate as
'piecewise', 'separate', or 'none'.

Aaron Meurer

On Fri, Sep 5, 2014 at 10:43 AM, Ondřej Čertík <[email protected]> wrote:
> Hi,
>
> I needed these two integrals for my work:
>
> In [23]: integrate(erf(alpha*r)*exp(-alpha**2 * r**2), (r, 0, oo))
> Out[23]:
> ⎧          ___
> ⎪        ╲╱ π               │                 ⎛          2      ⎞│   π
> ⎪        ─────          for │periodic_argument⎝polar_lift (α), ∞⎠│ ≤ ─
> ⎪         4⋅α                                                        2
> ⎪
> ⎪∞
> ⎨⌠
> ⎪⎮    2  2
> ⎪⎮  -α ⋅r
> ⎪⎮ ℯ      ⋅erf(α⋅r) dr                    otherwise
> ⎪⌡
> ⎪0
> ⎩
>
> In [24]: integrate(erf(alpha*r)*exp(-alpha**2 * r**2)*r, (r, 0, oo))
> Out[24]:
> ⎧           ___
> ⎪         ╲╱ 2                ⎛│                 ⎛          2      ⎞│   π   │
> ⎪         ─────           for ⎜│periodic_argument⎝polar_lift (α), ∞⎠│ ≤ ─ ∧ │p
> ⎪             2               ⎝                                         2
> ⎪          4⋅α
> ⎪
> ⎨∞
> ⎪⌠
> ⎪⎮      2  2
> ⎪⎮    -α ⋅r
> ⎪⎮ r⋅ℯ      ⋅erf(α⋅r) dr
> ⎪⌡
> ⎩0
>
>
>                 ⎛          2      ⎞│   π⎞   │                 ⎛          2
> eriodic_argument⎝polar_lift (α), ∞⎠│ < ─⎟ ∨ │periodic_argument⎝polar_lift (α),
>                                        2⎠
>
>
>
>
>
>
>             otherwise
>
>
>
>
>   ⎞│   π
>  ∞⎠│ < ─
>        2
>
>
>
>
> What does periodic_argument and polar_lift mean? It seems really
> complicated. For comparison, Mathematica returns:
>
> In [1]: Integrate[Erf[alpha*r]*Exp[-alpha^2*r^2], {r, 0, Infinity}]
>
> Out [1]: ConditionalExpression[Sqrt[\[Pi]]/(4 alpha),
>  Re[alpha^2] > 0 && Re[alpha] > 0]
>
> In [2]: Integrate[Erf[alpha*r]*Exp[-alpha^2*r^2]*r, {r, 0, Infinity}]
>
> Out [2]: ConditionalExpression[1/(2 Sqrt[2] alpha^2),
>  Re[alpha^2] > 0 && Re[alpha] > 0]
>
> Which is much simpler. So I think we should return something similar.
>
> Ondrej
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sympy/CADDwiVD%3DVsR5rcqDx%3D4w%3D0gYAXpx0ZT8NbiGc0Kta5xOk_%2Btew%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6JWMMGL0PNgUTnj7f5oWn_3eCJ%3D321F81WPA2FoF3VOqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to