Skip to main content
8-Gravel
September 10, 2023
Solved

partial derivative of a function with vector argument

  • September 10, 2023
  • 2 replies
  • 2006 views

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

 

 

Best answer by Werner_E

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

 

 

 

2 replies

23-Emerald I
September 10, 2023

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 . .  .

23-Emerald IV
September 10, 2023

Have you checked the gradient operator?

 

Success!

Luc

Werner_E25-Diamond IAnswer
25-Diamond I
September 10, 2023

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

 

 

 

hegel8-GravelAuthor
8-Gravel
September 11, 2023

wonderful, thank you a lot