Skip to content

substitute_function() can leave limits unevaluated #17553

@sagetrac-wonder

Description

@sagetrac-wonder

Here is an example:

┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 6.4.1, Release Date: 2014-11-23                       │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
sage: l = limit( function('f')(x), x=1 )
sage: l
limit(f(x), x, 1)
sage: ls = l.substitute_function( function('f'), (1+x).function(x) )
sage: ls
limit(x + 1, x, 1)
sage: simplify(ls)
limit(x + 1, x, 1)
sage: maxima(repr(ls))
2

This is a simplified case of a situation that's been biting me in an expression that's passed to odeint() after being computed: it breaks the integration because it fails to evaluate to a float expression.

Component: symbolics

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

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