I am trying to use SymEngine with arrays of expressions. See example below
using SymEngine
@vars x
diff( [cos(x), sin(x)], x)
ERROR: MethodError: no method matching diff(::Array{Basic,1}, ::Basic)
Even more important is to be able to generate a gradient matrix by differentiating each element of a vector expression with each symbolic variable.
@vars a b
expr = [ a^2+2*b^2, -a*b]
f = diff(expr, [a,b])
# expected result 2×2 matrix: [ 2a -b; 4a -a]