# Symbolic Vector Manipulation Software?

1. Mar 5, 2008

### daviddoria

I would like to do something like a derivative with respect to a vector or really anything involving a vector (of known dimension, but unknown values) going in and a vector coming out:

x= 4 by 1 vector
A = 4 by 4 matrix
diff( Transpose(x) * A * x, x)

should return (1/2)*A*x

Is there software that can do this? I am familiar with maple and matlab, but I don't think either of them can do this.

Any suggestions?

Thanks!

David

2. Mar 5, 2008

### trambolin

If A is symmetric it is $2Ax$, otherwise it is $(A+A^T)x$ ! And I don't understand why you can not do with Maple or MATLAB. Do you mean handling vector calculus?

3. Mar 5, 2008

### daviddoria

ahh yea sorry 2Ax or (A+A^T)x is clearly correct.

So that is would I would like to do, either with Maple or Matlab. Does anyone know how?

4. Mar 5, 2008

### trambolin

Do what? The whole Maple is designed for this! Please, take the time for asking one exact question.

5. Mar 5, 2008

### daviddoria

Here is one exact question. I want to do this:

with(LinearAlgebra);
b:=Vector(x,3);
B:=Matrix(A,3,3);
f:=Transpose(b)*B*b;
diff(f,b)

but i get:
Error, (in rtable/Product) invalid arguments
when defining f

6. Mar 6, 2008

### trambolin

Now, I see your point but I can't give you the exact code because I don't have Maple on this computer. But I can tell you that it should be also related with ">>with(VectorCalculus);". Also, it would surprise me if it works without setting the dimension to, say, "m". Sorry for this sloppy answer but I have to access to Maple first to give a correct answer.

7. Jun 21, 2008

### afdotone

trambolin, daviddoria, did you figure out the answer to this question? Thanks!