10000 Handle substitutions of partial sums and products · Issue #18396 · sagemath/sage · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Handle substitutions of partial sums and products #18396
Open
@videlec

Description

@videlec

Sage is not able to identify partial sum in a substitution

sage: var('x,y')
sage: f = x + x^2 + x^4
sage: f.subs(x^2 == y)             # one term is fine
x^4 + x + y
sage: f.subs(x + x^2 == y)         # partial sum does not work
x^4 + x^2 + x
sage: f.subs(x + x^2 + x^4 == y)   # whole sum is fine
y

Similarly with products

sage: f = x * cos(x) * sin(x)
sage: f.subs( cos(x) * sin(x) == y)
x*cos(x)*sin(x)

As mentioned in the doc, this is the same behavior as in Maple but differ from Mathematica. We should be clearer on the semantic of substitute and potentially implement partial sum and product substitutions.

See also #10049 and ​http://ask.sagemath.org/question/25972/substitute-xy-by-u/ (with related ticket #17879)

CC: @orlitzky @mezzarobba

Component: symbolics

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

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

      0