Skip to content

Assumptions on symbols not preserved with some unevaluated integrals #22763

@rwst

Description

@rwst

In a fresh Sage, assumptions on symbols within expressions are preserved when Maxima returns the same expression in an unevaluated integral. But in this case the domain/flag information of m is somehow cleared/deleted:

sage: _ = var('m')
sage: (x^m / sqrt(2+3*x)).integral(x)
integrate(x^m/sqrt(3*x + 2), x)
sage: _= var('m', domain='integer')
sage: (x^m / sqrt(2+3*x)).integral(x)
integrate(x^m/sqrt(3*x + 2), x)
sage: _.operands()[0].operands()[1]
x^m
sage: _.operands()[1].is_integer()
False

assume(m, 'integer') cannot restore the flag of m in the returned integral.

The problem does not occur without the first two lines. Maybe the first creation of m does somehow irrevocably set something in Maxima (or Sage's module for backtranslation)?

CC: @nbruin

Component: symbolics

Author: Ralf Stephan

Branch/Commit: u/rws/assumptions_on_symbols_not_preserved_with_some_unevaluated_integrals @ 39567f4

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions