Skip to main content
8-Gravel
Sep 10, 2023 3:54 PM UTC
Solved

partial derivative of a function with vector argument

hegel_0-1694360824920.png

I can define this function and it works. What I cannot do is the partial derivative with respect to some of the independent variables, written as a component of a vector. Any suggestions?. 

I want to do the derivative with respect to

hegel_3-1694361074631.png

 

and he writes me this

 

hegel_1-1694360931616.png

 

 

Werner_E
Werner_EAnswer
25-Diamond I
Sep 10, 2023 7:28 PM UTC

Unfortunately the Nabla operator is of no help here. It can only be used for scalar valued functions like

Werner_E_0-1694373917299.png

but it fails here as the function given by @hegel  returns a 2x2 matrix:

Werner_E_2-1694373997760.png

 

It is a great pity and a major shortcoming that Prime is generally not very good at dealing with vector functions and thus the partial derivative according to a vector component is not possible.

A clumsy workaround could be this (assuming that the input function f() is for good reason defined as a vector function and not as a function with three separate arguments and also assuming that the partial derivatives should be assigned to vector functions as well):

Werner_E_3-1694374054505.png

Prime 9 worksheet attached

 

 

 

4 replies

23-Emerald I
Sep 10, 2023 5:19 PM UTC

Prime can do it BUT it's not pretty, and it's not elegant.

 

The derivative function won't let me use an index subscript.  If you define a function of three variables you can beat it to death!

 

There used to be a gradient operator . .  .

Translate
23-Emerald V
Sep 10, 2023 5:53 PM UTC

Have you checked the gradient operator?

 

Success!

Luc

Translate
Werner_E
Werner_E25-Diamond IAnswer
25-Diamond I
Sep 10, 2023 7:28 PM UTC

Unfortunately the Nabla operator is of no help here. It can only be used for scalar valued functions like

Werner_E_0-1694373917299.png

but it fails here as the function given by @hegel  returns a 2x2 matrix:

Werner_E_2-1694373997760.png

 

It is a great pity and a major shortcoming that Prime is generally not very good at dealing with vector functions and thus the partial derivative according to a vector component is not possible.

A clumsy workaround could be this (assuming that the input function f() is for good reason defined as a vector function and not as a function with three separate arguments and also assuming that the partial derivatives should be assigned to vector functions as well):

Werner_E_3-1694374054505.png

Prime 9 worksheet attached

 

 

 

Translate
hegel8-GravelAuthor
8-Gravel
Sep 11, 2023 11:47 AM UTC

wonderful, thank you a lot

Translate