Skip to content

Wrong integral of exp(x^3) from 1 to 2. #17968

Closed
@sagetrac-tmonteil

Description

@sagetrac-tmonteil

The following was reported on this ask question:

sage: f(x) = exp(x^3)
sage: f.integrate(x, 1, 2)
-1/3*gamma(1/3, -1) + 1/3*gamma(1/3, -8)
sage: f.integrate(x, 1, 2).n()
-138.557717219510 - 238.442320120796*I

numerical_integral and sympy seem to agree on the result:

sage: numerical_integral(f,1,2)
(275.5109837633117, 3.0587863771115628e-12)
sage: import sympy
sage: f = f._sympy_()
sage: g = f.integrate() ; g
exp(-I*pi/3)*gamma(1/3)*lowergamma(1/3, x**3*exp_polar(I*pi))/(9*gamma(4/3))
sage: h = g.subs(x,2) - g.subs(x,1)
sage: h.n()
275.510983763312 - 1.68744844960818e-21*I

CC: @kcrisman @mforets

Component: symbolics

Author: Marcelo Forets

Branch/Commit: 82161f2

Reviewer: Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/17968

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions