Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Higher order derivatives for N -body simulations

1,375 views

Published on

Derivatives of Newtonian gravity.

Published in: Science
  • Be the first to comment

Higher order derivatives for N -body simulations

  1. 1. Higher order derivatives for N-body simulations Keigo Nitadori July 3, 2014 1 Derivatives of power functions Consider y = xn , (1) with time dependent x and y, and constant n. From lny =n lnx, (2) ˙y y =n ˙x x , (3) we have 0 =n ˙xy − x ˙y, 0 =n ¨xy + (n − 1) ˙x ˙y − x ¨y, 0 =n ... xy + (2n − 1) ¨x ˙y + (n − 2) ˙x ¨y − x ... y , 0 =n .... x y + (3n − 1) ... x ˙y + (3n − 3) ¨x ¨y + (n − 3) ˙x ... y − x .... y . (4) Here, ˙[ ] = d dt [ ] and we also note [ ](n) = dn dtn [ ]. From these, higher order derivatives of y are recursively available in ˙y =[n ˙xy]/x, ¨y =[n ¨xy + (n − 1) ˙x ˙y]/x ... y =[n ... xy + (2n − 1) ¨x ˙y + (n − 2) ˙x ¨y]/x, .... y =[n .... x y + (3n − 1) ... x ˙y + (3n − 3) ¨x ¨y + (n − 3) ˙x ... y ]/x, (5) and so on. A general form for k ≥ 1 is y(k) = 1 x k−1 i=0 Ck,ix(k−i) y(i) , (6) 1
  2. 2. with coefficients Ck,0 =n Ck,k = − 1 Ck,i =Ck−1,i−1 + Ck−1,i = k − 1 i n − k − 1 i − 1 (1 ≤ i ≤ k − 1). (7) 2 Derivatives of gravitational force Now we focus on the time derivatives of the gravitational force, f = m r r 3 . (8) Let s = (r · r), and q = s−3/2 , (9) then f =mqr, ˙f =mq ˙r + ˙q q r , ¨f =mq ¨r + 2 ˙q q ˙r + ¨q q r , ... f =mq ... r + 3 ˙q q ¨r + 3 ¨q q ˙r + ... q q r , (10) and f (k) =m k i=0 k i q(i) r(k−i) =mq k i=0 k i q(i) q r(k−i) . (11) For the derivatives of q, by using n = −3 2, we have q =s−3/2 , ˙q q = − 3 s ˙s 2 , ¨q q = − 3 s ¨s 2 + 5 3 ˙s 2 ˙q q ... q q = − 3 s ... s 2 + 8 3 ¨s 2 ˙q q + 7 3 ˙s 2 ¨q q . (12) The coefficients multiplied by 6 are: 2
  3. 3. @ @ @k i 0 1 2 3 4 5 1 3 (2) 2 3 5 (2) 3 3 8 7 (2) 4 3 11 15 9 (2) 5 3 14 26 24 11 (2) Derivatives of s have simple form in, s =(r · r), ˙s =2(r · ˙r), ¨s =2(r · ¨r) + 2( ˙r · ˙r), ... s =2(r · ... r ) + 6( ˙r · ¨r), s(4) =2(r · r(4) ) + 8( ˙r · ... r ) + 6( ¨r · ¨r), s(5) =2(r · r(5) ) + 10( ˙r · r(4) ) + 20( ¨r · ... r ), (13) and a general form is s(k) = k i=0 k i (r(i) · r(k−i) ) =    2 (k−1)/2 i=0 k i (r(i) · r(k−i) ) (k is odd)   2 (k−2)/2 i=0 k i (r(i) · r(k−i) )   + k k/2 (r(k/2) · r(k/2) ) (k is even) . (14) 3 Another approach Le Guyader (1993) took a slightly different approach. For the derivatives of r = r , r2 = (r · r), (15) r ˙r = (r · ˙r), (16) and after (k − 1) times differentiations, k−1 i=0 k − 1 i r(i) r(k−i) = k−1 i=0 k − 1 i (r(i) · r(k−i) ). (17) Finally, we have r(k) = 1 r   (r · r(k) ) + k−1 i=1 k − 1 i (r(i) · r(k−i) ) − r(i) r(k−i)   , (18) 3
  4. 4. for k ≥ 2. For the derivatives of q = r−3, from r ˙q = −3˙rq, (19) after differentiating (k − 1) times, k−1 i=0 k − 1 i r(i) q(k−i) = −3 k−1 i=0 k − 1 i r(k−i) q(i) . (20) Thus, q(k) = − 1 r   3r(k) q + k−1 i=1 k − 1 i 3r(k−i) q(i) + r(i) q(k−i)   , (21) for k ≥ 2. References Le Guyader, C. 1993, A&A, 272, 687. http://adsabs.harvard.edu/abs/1993A&A... 272..687L 4

×