chakravala / Reduce.jl

Symbolic parser for Julia language term rewriting using REDUCE algebra

Home Page:http://www.reduce-algebra.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expression differentiation with constants

tmamedzadeh opened this issue · comments

Is it possible to differentiate and expression C*(x+y) by x, showing that C is a constant?

Do you mean like this?

julia> using Reduce
Reduce (Free CSL version, revision 4590), 11-May-18 ...

julia> Algebra.df( :(c*(x+y)), :x)
:c

note that REDUCE is not set to be case sensitive, so C will be returned as c.

How did it recognize that c is constant but y is variable?

It is treated as partial differentiation, i.e. x is declared as the variable and the others are treated constant.