Subject: definition of nonscalar and jacobian matrices
From: Mario Villanueva
Date: Wed, 23 May 2012 19:48:01 +0100
I am working with some tedious series and I wanted to check in a CAS, I
have previously used Mathematica but now I am working under Linux so I
wanted to try Maxima.
The problem is this, I have an ODE defined as \dot{x}(t)=f(x(t)), In
general I am only working with the right hand side f(x(t)). I have
defined f to have dependancy on x and x on t, I have also defined that
the derivative of x with respect to t is f.
Now I need to define a Matrix M(t) = A^{-1}*\frac{\partial f}{\partial
x}*A, where A is an invertible matrix and \frac{\partial f}{\partial x}
is the Jacobian matrix of f with respect to vector x.
Basically I need to get (d^i/dx^i) for i=1,...,n.
This is what I have so far,
declare([f,x,M,A],nonscalar); declare(t,scalar);
depends(f,x,x,t,M,t);
gradef(x,t,f);
M:A^^(-1).(diff(f,x)).A;
M; diff(M,t); diff(M,t,2); diff(M,t,3); diff(M,t,4); diff(M,t,5);
This is giving for the first derivative of M(t):
f*('diff(f,x,2)) A^^(-1) . A
So my guess is that it is not detecting the "vector" nature of
(\partial/partial x)f, also subsequent evaluations of the derivative are
expressing things like f^2, where I should have f.f^(transpose). I'm
sure there is something wrong with either the way I am doing things or
the way Im trying to Use mathematica. Another Question is: Does Maxima
uses df/dx and \partial f/\partial x interchangeably?.
Cheers,
Mario.