Skip to content

solve() breaks substitute_function() #17504

Open
@sagetrac-wonder

Description

@sagetrac-wonder

Seems like this should work differently:

$ sage
┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 6.4.1, Release Date: 2014-11-23                       │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
sage: z = sage.symbolic.function_factory.function('z',nargs=1)
sage: z_eq = ( z(x) == x/(1-x) )
sage: z_eq.substitute_function( z, (x^2).function(x) )
x^2 == -x/(x - 1)
sage: x_expr = solve( z_eq, x )[0].rhs()
sage: x_expr
z(x)/(z(x) + 1)
sage: x_expr.substitute_function( z, (x^2).function(x) )
z(x)/(z(x) + 1)

I believe it should replace z(x) with x^2 in the last result.

CC: @sagetrac-jakobkroeker

Component: symbolics

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

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