I've been trying to perform differentiation with respect to a vector,
using, for example:
(%i1) make3vec(vec) := vec :: makelist(vec[i],i,1,3);
(%o1) make3vec(vec):=vec::makelist(vec[i],i,1,3)
(%i2) map(make3vec,[v]);
(%o2) [[v[1],v[2],v[3]]]
(%i3) T:v . transpose(v);
(%o3) v[3]^2+v[2]^2+v[1]^2
(%i4) diff(T,v);
Non-variable 2nd argument to diff:[v[1],v[2],v[3]] -- an error. To
debug this try debugmode(true);
However, if I differentiate with respect to a single element of the
vector it works fine, eg:
(%i5) diff(T,v[2]);
(%o5) 2*v[2]
Any suggestions on how to have Maxima perform the differentiation with
respect to a vector rather than a scalar?
Thanks in advance.