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.Sun, 25 Oct 2020 22:43:47 +0100Evaluate partial derivativehttps://ask.sagemath.org/question/54029/evaluate-partial-derivative/I have a function `B(x,y)` and I have an expression `f` in which this function appears.
B(x, y) = function('B')(x, y)
f = B(v_m, v)*theta/(B(v_m,v) + theta)
g = f.diff(v_m)
I now have an expression, `g`, which involves the partial derivative of `B` w.r.t `v_m` , and I would like to evaluate this entire expression, including the partial derivative, at `v_m == v`.
I can do `g.substitute(v_m == v)` or `at(g, v_m == v)` but both of these just change the expression to give me the partial derivative of `B` with respect to `v`, which is not what I want.
Do I need to explicitly define that the partial derivative is a function somehow? I would like to be able to use this expression I have containing the partial derivative and evaluate it as if it is a function, where the output contains the value of the derivative of `B` w.r.t. `v_m`, evaluated at the input, in the context of the rest of the expression evaluated at that input.
In other words, in the latex representation, I'd like the notation to preserve the expression of the partial derivative and then have the vertical bar on the right hand side to indicate it's being evaluated at a particular point, or in this case, another variable. Here is the latex representation that I'm looking for, for the part of the expression involving the partial derivative:
$$
\\frac{\\partial}{\\partial v_{m}}B\\left(v_{m}, v\\right) \\Bigr\\rvert_{v_m = v}
$$jgrohSun, 25 Oct 2020 22:43:47 +0100https://ask.sagemath.org/question/54029/Matrix/Tensor derivative for Stress Tensorhttps://ask.sagemath.org/question/8119/matrixtensor-derivative-for-stress-tensor/I need to do define/calculate the following stress tensor in an elegant way:
$T_{i,j} := -p \delta_{i,j} + \eta (\partial_i v_j + \partial_j v_i)$
where i,j can be x,y,z and
$\partial_i v_j := \frac{\partial v_j}{\partial i}$
I've found the sage-function kronecker_delta for the first term, but I am having problems with the two partial derivatives.
Thanks in advance!packomanWed, 18 May 2011 17:20:46 +0200https://ask.sagemath.org/question/8119/Matrix equations and derivativeshttps://ask.sagemath.org/question/10759/matrix-equations-and-derivatives/Hello!
I am completely new to Sage and Python.
In order to get knowledge about Sage I'd like to find a way to express an equations like these
http://stats.stackexchange.com/questions/14827/how-to-calculate-derivative-of-the-contractive-auto-encoder-regularization-term
User with nickname fabee had posted derivatives of contractive autoencoder regularizer, and I want to reproduce these results in Sage. It's a big challenge for Sage newbies like me.
A few first attempts do not succeed so can you show me the way to do this task?
newbieThu, 21 Nov 2013 08:25:00 +0100https://ask.sagemath.org/question/10759/