kill(all)$

load(lrats)$

Transformation of two  mass problem.(diff eq.),version 1.0
peter.vlasschaert@gmail.com,04/08/2018.

two body (m1,m2) problem ( = center of mass ).

Definition : Center of mass.  m[i],R[i], i=1..n

p1a:sum(m[i]*R[i],i,1,n);
p1b:sum(m[i],i,1,n);
p1: R  = p1a/p1b;

two body system ,m[i],R[i].  ( i=1,2), ' n=2 definition '.
===========================================

p2:subst([n=2],p1);

p2a:ev(p2,sum);

rem : expand symbolic sum with 'ev'.

from figure ,relation : R,R[i],r[i]  ; n=2; i=1,2.
====================================

p3a:part(rhs(p2a),1);

p3b:part(rhs(p2a),2);

p3:p3a = lhs(p2a)*p3b;

look Figure : 1
---------------------

p4:R[1] = R+r[1];
p5:R[2] = R+r[2];

p6:subst([p4,p5],p3);

p6a:expand(p6);

p6b:ratsimp(p6a);

definition , m[i],r[i]; n=2; i=1,2.
=========================

p6c:p6b-rhs(p6b);

look Figure : 1
----------------------

p7: r=r[2]-r[1];

p8:r=R[2]-R[1];

use : 'p6c'  solve for   r1,r2  put inside 'p7'
-------------------------------------------------------------

p9:solve(p6c,r[1]);

p9a:solve(p6c,r[2]);

p10:ratsimp(subst(p9,p7));

p11:solve(p10,r[2]);

p10a:factor(subst(p9a,p7));

p11a:solve(p10a,r[1]);

use : 'p9,p9a', subst. 'p4,p5'
------------------------------------------

p12:subst(p11a,p4);
p12a:subst(p11,p5);

We want to find ' reduced mass '
===========================
Answer : ?

part 1:

formal definition : unit vector 'direction r' = e[r]
=======================================

p13: e[r] = r/abs(r);

part 2:

Equation motions : mass center system .
===================================
=> Newton second law : ' vector notation'
=> Newton third       law : gravitational ( = G).

p14:m[1]*'diff(lhs(p12),t,2)=m[1]*'diff(rhs(p12),t,2);

depends([R,r],t);

p14a :lhs(p14)=ev(rhs(p14),diff);

equation motion  :  'm1',neg sign for  G
----------------------------------------------------------
rem : neg  sign   opposite to       ,  ' r ' direction.

p15:rhs(p14a)  = (-1)*G*(m[1]*m[2])/(abs(r))^2*lhs(p13);

                                       *************************************

p16:m[2]*'diff(lhs(p12a),t,2)=m[2]*'diff(rhs(p12a),t,2);

p16a :lhs(p16)=ev(rhs(p16),diff);

equation motion  :  'm2'  ,pos sign before G
-----------------------------------------------------------------
rem : pos  sign  same direction to   ' r ' direction.

p17:rhs(p16a)  = G*(m[1]*m[2])/(abs(r))^2*lhs(p13);

<************************************************************************************************************>

part 3:

from combination 'p15,p17'   (adding)
===============================

p18:p15+p17;

p19:expand(p18);

p19a:factor(p19);

from 'p19a'
=========
1e ) (m[2]+m[1]) ≠ 0 
2e ) ('diff(R,t,2)) =  0  =>   'diff(R,t,1) = constant'  => R=0

p19b:ode2(p19a,R,t);

p19c:'diff(R,t,1)=diff(rhs(p19b),t,1);

p19d:subst([%k2=constant],p19c);

velocity : mass center is constant ,  R=0

p19e:diff(p19d,t,1);

from combination 'p15,p17'   (substracting), use 'p19a'
============================================

p20: p17-p15;

subst :  'p19d'  into 'p20'

part 4:

p21:lratsubst([p19e],p20)/2;

assume(m1>0,m2>0);

definition μ : reduced   mass
========================

p21a:μ = ratcoeff(lhs(p21),('diff(r,t,2)));

p21b:lhs(p21a)*('diff(r,t,2)) = rhs(p21);

                                   ------------------------------------------------------------

mass : assume '  m1>>>m2
=======================
-------------------------------------------------------------------------------------------------------
example : m1 (= earth )  and m2 ( = 'small bod'y with respect to earth)
                   μ =>  μ[e] 
-------------------------------------------------------------------------------------------------------

p22:μ[e] =  m[2];

rem : use by good approximation EK = 1/2*m2*v^2

p22a:subst([μ=lhs(p22)],p21b);

p22b:subst([p22],p22a);

p22c:p22b/m[2];

p24:solve(p21,'diff(r,t,2));

p24a:p24[1];

example : m[1] = m[e] = mass earth.

p24b:subst([m[2]=0,m[1] = m[e]],p24a);

What  about sign : before e[r] .

 m[2] orbit around m[1]

because attraction direction w ,abs(w) = abs(e[r])
--------------------------------------------------------------------------
rem : w opposite with respect e[r]  =>       (-1)
=========================================

p25:lratsubst([e[r] =-e[r]],p21b);

p25a::lratsubst([e[r] =-e[r]],p24a);

  check : to make approximations , 'see above how '
============================================
--------------------------------------------------------------------------------------------
orbits :  m[1] : earth    and  m[2] : small body (ref to the earth)
                m[1] : sun      and  m[2] : earth            (ref to the sun  )
--------------------------------------------------------------------------------------------
rem : m[1]*m[2]*G             = k1
           sum(m[1],m[2])*G  = k2
--------------------------------------------------------------------------------------------

p26:lratsubst([m[1]*m[2]*G = k1],p25);

p26a:lratsubst([(m[1]+m[2])*G = k2],p25a);

p26b:p21a;

------------------------------------------------------------------------------------------------------------------------------------