JuliaPy / SymPy.jl

Julia interface to SymPy via PyCall
http://juliapy.github.io/SymPy.jl/
MIT License
268 stars 62 forks source link

issue with substitution #489

Closed jverzani closed 1 year ago

jverzani commented 1 year ago

This doesn't substitute properly:

f(x,y) = sin(y-x)
df = sympy.diff(f(x,y),x)   # it outputs `- cos(x-y)`: correct
df(PI/2,y)   # it output `-sin(y)`: correct
df(x,PI/2)

Whereas df(x=>x, y=>y) does.

Also, we should(?) have df(x=x, y=y) work

jverzani commented 1 year ago

Woops, too fast df(x=x,y=y) is not to be supported, as the symbol :x (in the keyword argument) need not map to the variable x due to possible assumptions.