Hello,(adsbygoogle = window.adsbygoogle || []).push({});

I was starting with an equation using hooke's law and with a damping factor appended to it. The equation is to calculate the x,y, and z components of the resulting force, as a vector. The hooke's law portion uses the current position in calculating the force (x, y, and z position components), and the damping part uses the velocity (additional x, y, and z components) in calculating the force.

F(X,V) = -ks(magnitude(X) - r) * (X / magnitude(x)) - b * V

--Here X is the 3 element position vector

--Here V is the 3 element velocity vector

--Here r is the rest length (a constant)

--Here b is a damping constant

--Here magnitude(X) = sqrt(x * x + y * y + z * z)

--Note that magnitude is NOT a constant and must be part of the derivative computation.

I was trying to compute the jacobian matrix resutling from taking the derivative of the force with respect to the position (I am ignoring velocity in this first step).

Thus I will have a 3 X 3 resulting matrix of partial derivatives, where each Force x/y/z component corresponds to a row in the matrix and where each position x/y/z component corresponds to a column in the matrix.

I'm sure there are several resources on the web that give the solution for this and several tutorials that walk through it, but I need to learn to do this without being given the exact answer.

Obviously, it gets tricky above because of the magnitude - you would need the quotient, product, and chain rules from calculus.

I was trying to use these derivative rules to calculate each element of the 9X9 matrix for the derivative of force with respect to position, one by one. However, each calculation was taking about 2 pages (I was substituting findings), and there would be 18 total pages.

I think there are ways to apply derivative rules to vectors directly and better techniques to find Jacobian matrices than what I'm doing. Does anyone know of some good resources that explain this? Most of the derivative rule resources I've found only talk about derivatives for 1-D functions or partial derivatives that are not applied to vectors, and the resources about Jacobians usually talk about the forms easily found in wikipedia without providing much insight into an efficient method for solving them. I may just have looked in the wrong places.

The goal of this exercise is to provide insight into implicit methods for integration that can be applied to a particle system implemented in C++ (the above example is for one particle). These methods require finding Jacobians.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Question on how to efficiently compute a jacobian

Loading...

Similar Threads - Question efficiently compute | Date |
---|---|

B Function rules question | Saturday at 9:49 AM |

B Question about a limit definition | Feb 27, 2018 |

A Angular Moment Operator Vector Identity Question | Feb 10, 2018 |

I A question regarding Logistic population model | Feb 1, 2018 |

How to calculate efficiency of Newton's Method | Feb 18, 2015 |

**Physics Forums - The Fusion of Science and Community**