I really want to have a generalised differentiation method for functions 
whose output is a vector. This is really important in practice.
For exemple:
f(v) = h*v
b(v, w) = f(v) * cos(w) + d - sqrt(d**2 - f(v)**2 * sin(w)**2)
F(x, y, theta, v, w, a) = (x + b(v,w) * cos(theta), y + b(v,w) * sin(theta), 
theta + arcsin(sin(w) * f(v)/d), v + h*a)


 I can do first order differentiation naturally and keep the type of 
symbolic expression:
jacobian(F, (x,y,theta,v,w,a))

 which the output is still a symbolic expression.

But I cannot do
F.hessian()

since F is not a scalar valued function.

I cannot do this
G(x, y, theta, v, w, a) = (F[i].hessian() for i in range(4))

TypeError: unable to convert <generator object <genexpr> at 0x6fdc93dab40> to a 
symbolic expression


because the parser this these parentheses are a generator.

Of course I can do this
G(x, y, theta, v, w, a) = [F[i].hessian() for i in range(4)]
But it will lose all the good properties of symbolic expressions which are 
differentiable:
jacobian(G,(x, y, theta, v, w, a))
will give all zeros since the output is a list.

Last of all, I can however solve this problem by doing some ugly 
transformations and combine with np functions. But it will really be a big 
improvement if I can just press a button like
diff(F,2)
and even 3!


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to