derivative of multivariate equation with nested sum
Hello,
I often have to deal with functions like the one below, take derivatives and so on. I would really like to know if I could use a CAS like SAGE to do this tedious and error prone calculations but I couldn't find a similar kind of function in the docs and tutorials.
My questions are:
- how can I write this function in SAGE ?
for x∈Rp;v∈Rp×k
y(x,v):=p∑i=1p∑j>ik∑f=1vi,fvj,fxixj=p∑i=1p∑j>i⟨v:,i,v;,j⟩xixj
- calculate the partial derivatives ∂y(x,v)∂vi,j ?
- or the the derivative with respect to the column-vector ∂y(x,v)∂v:,i ?
Or is there a better way to work with this kind of function in SAGE? (the function above is only an example)
Thanks