AdrianK

5 Reputation

One Badge

7 years, 134 days

MaplePrimes Activity


These are questions asked by AdrianK

Hello everybody

I am currently having trouble 'manually simplifying' an equation that I differentiated using maple. Basically, the equation that I get involves hessian-matrices. Since the resulting equation is rather long, I would like to replace every such matrix by a sign, say H.
This is easy to do for non-matrix equations, i.e.

subs(sin(x)sin(y) = z, sin(x)sin(y) + xy)

will give me z + xy, which looks a bit easier.

However, I couldn't figure out how to do a similar thing with matrices. For example, the following code

subs(Matrix(3, 3, [[x, y, z], [y, z, x], [z, x, y]]) = A, Matrix(3, 3, [[x, y, z], [y, z, x], [z, x, y]])+B)

 will not work.
I already thought about converting the matrices first into lists (because for some reason it works for lists). However, I would also like to do the same as above for for functions of matrices, i.e. set F(A) = G, where A is a matrix (this also fails, probably for the same reason).

Also, the same thing seems to fail for vectors and general arrays, so I guess the actual problem might be the array type.

I also tried alternative ways, such as eval or algsubs, but the later even gives an error since it cannot handle matrices at all.

This feels a bit like a noob question, but I spent almost 2 days now searching for an answer or a workaround, so my apologies if I missed something trivial.

All the best
Adrian

 

 

Page 1 of 1