Skip to main content
1-Visitor
April 26, 2022
Question

Symbolic differentiation of complex vector-matrix expressions in Mathcad Prime.

  • April 26, 2022
  • 2 replies
  • 1504 views

How to differentiate complex vector matrix expressions (quadratic forms, parametrically dependent matrices)? In mathematics, this is done by creating rules; I donโ€™t know anything about other software packages.

For example:

Q1=x^T*A*x, and dQ1/dx=???

Q2=x^T*B(x)*x, and dQ2/dx=???

 

x is a vector, and A and B are matrices.


I know how to differentiate this manually, but I need Mathcad to do it automatically.

2 replies

21-Topaz II
April 26, 2022

Hi,

Numerical differentiation you simply use the differentiation operator.  It is that simple.

Capture.JPG

Cheers

Terry

dtn5558881-VisitorAuthor
1-Visitor
April 26, 2022

I forgot to clarify: x is a vector, and A and B are matrices. Sorry

25-Diamond I
April 26, 2022

Maybe the built-in "Jacob" function could be of help

Werner_E_0-1650984694763.png

Mathcad/Prime isn't really good at vector functions and I found no way to avoid having to write the vector [x0 x1 x2] in the explicit way in the definition of f(x).