ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 30 Dec 2013 13:36:27 +0100derivative of multivariate equation with nested sumhttps://ask.sagemath.org/question/10869/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\in \mathbf{R}^p; v \in \mathbf{R}^{p \times k}$
$$y(x, v) := \sum^p_{i=1} \sum^p_{j>i} \sum_{f=1}^k v_{i,f} v_{j,f} x_i x_j =
\sum^p_{i=1} \sum^p_{j>i} \langle v_{:,i}, v_{;,j} \rangle x_i x_j$$
* calculate the partial derivatives $\frac{\partial y(x,v)}{\partial v_{i,j}}$ ?
* or the the derivative with respect to the column-vector $\frac{\partial y(x,v)}{\partial v_{:, i} }$ ?
Or is there a better way to work with this kind of function in SAGE? (the function above is only an example)
ThanksibayerMon, 30 Dec 2013 13:36:27 +0100https://ask.sagemath.org/question/10869/