Mikolas
Mikolas

Reputation: 121

Is sympy's simplify to be used on unknown functions?

The following code unexpectedly simplifies f(1)=xf(0) to f(1)=0. Is it because undefined functions are not to be used without further assumptions?

Running this should not change the expression, but it gives Eq(f(1), 0).

from sympy import *

x, y = symbols("x y")
f = Function("f")
print(Eq(f(1), x * f(0)).simplify(rational=True, doit=False))

Upvotes: 0

Views: 63

Answers (0)

Related Questions