vector derivatives
- To: mathgroup at smc.vnet.net
- Subject: [mg70289] vector derivatives
- From: "rych" <rychphd at gmail.com>
- Date: Thu, 12 Oct 2006 05:36:46 -0400 (EDT)
I have (n) particles {ri} (ri- radius-vectors) with pairwise interaction potential (u) depending on the distance only (|rij|=|ri-rj|) (in d=3 Euclidean space). I'd like Mathematica to find the force, f_i and higher partial derivatives of the potential energy U: U = 0.5 \sum_i,j u(|rij|) -fk= \nabla_k U= \sum_j u`(|rkj|) rkj/|rkj| \nabla . \nablaU = \sum_i,j u``(|rij|)+(d-1)u`(|rij|)/|rij| and so on. And I'd like to have the results in that compact form. I start writing an exersise like this in Mathematica, - not pretty at all and the output is far from what I want. r1 = {a1, b1, c1}; r2 = {a2, b2, c2}; l[r12_List] := Sqrt[r12 . r12] u[r1_List, r2_List] := l[r1 - r2]^n D[l[r1 - r2], r1] D[u[r1, r2], r1] What is the proper way of doing such a task in Mathematica (and in mathematics)? If the Tensorial package is the way to go, I don't mind learning it, metric tensors, differential forms and such. Thanks Igor
- Follow-Ups:
- Re: vector derivatives
- From: "Chris Chiasson" <chris@chiasson.name>
- Re: vector derivatives
- From: Christopher Arthur <caa0012@unt.edu>
- Re: vector derivatives