[sage-support] Higher order differentiation for multi-dimensional function

2019-04-06 Thread Olivier de Jussieu
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  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.


[sage-support] Re: How to graph on Sage

2019-04-06 Thread kcrisman



This kind of question translates to "I'm too lazy to search, so do my 
> homework for me", and deserves a big fat RTFM , 
> possibly also possibly pointing to a good book 
> .
>

That's as may be, but I'll note as a data point that at least on 
Stackoverflow they are actively asking people to temper frustration with 
the umpteenth same question with some grace by having notes such as "___ is 
a new contributor. Be nice ..."   

Pointing to good books is a great idea, that link is a good one; I wonder 
if we can have a "pinned post" here that points to the documentation 
(which, granted, isn't always easy to slog through) and several different 
language free-as-in-beer books.  Anyone know how to do that?  Not that 
every new user will read a pinned post ...

-- 
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.