#20566: add qags option for numerical_integral
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.2
      Component:  numerical          |   Resolution:
       Keywords:  days73             |    Merged in:
        Authors:  Vincent Delecroix  |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/vdelecroix/20566                 |  49de99d93b4ef4a774eb58b951d86954865c1ae7
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Description changed by vdelecroix:

Old description:

> Some singular integral fails with the default gsl adaptive algorithm
> {{{
> sage: F=sqrt((-x + 1.81759643554688)/((x - 1.0)*x))
> sage: numerical_integral(F,1,1.81759)
> (inf, nan)
> }}}
> Hopefully gsl have an adaptive method in presence of singularities
>
>     https://www.gnu.org/software/gsl/manual/html_node/QAGS-adaptive-
> integration-with-singularities.html
>
> Which just add the option to `numerical_integral`. With the branch
> applied
> {{{
> sage: numerical_integral(F,1,1.81759, algorithm='qags')
> (1.1817104227640198, 3.516975723982796e-07)
> }}}

New description:

 Some singular integral fails with the default gsl adaptive algorithm
 {{{
 sage: F = sqrt((-x + 1.81759643554688)/((x - 1.0)*x))
 sage: numerical_integral(F,1,1.81759)
 (inf, nan)
 }}}
 Hopefully gsl have an adaptive method in presence of singularities

     https://www.gnu.org/software/gsl/manual/html_node/QAGS-adaptive-
 integration-with-singularities.html

 The branch simply adds the option `algorithm='qags'` to
 `numerical_integral`. And with the branch applied the above example runs
 smoothly:
 {{{
 sage: numerical_integral(F,1,1.81759, algorithm='qags')
 (1.1817104227640198, 3.516975723982796e-07)
 }}}

--

--
Ticket URL: <http://trac.sagemath.org/ticket/20566#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to