Hello all,

I have a simple question about the capabilities of Sage that I have
not been able to resolve by looking at the documentation.  I often
find myself manipulating somewhat complex functions that take vector
arguments.  I then need to derive gradients, hessians, etc.  I need to
do this with out knowing the dimensions of the vectors.  So for
example, what I would like to do is something like the following.
First, I would define the function f(x)=.5 * x' * A * x + b, perhaps
something like:

A = matrix();
x = vector();
b = vector();
f = function( x'  * A * x + b);

Then, I would like Sage to do the calculus for me, something like,
say:

f.gradient()
sage) 2*A*x
f.hessian()
sage) A

(Of course, I wouldn't bother using a computer algebra system for such
a simple function, but you get the idea.)  My question is: can Sage do
things like this?  I would like to avoid specifying the dimensions of
x, or giving the entries of A when I define the function.

Thanks!
Justin

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to