{ the third try for F_2=1/2*[F_1,~S_1]+1/2*[~F_1,~S_1] differential relation d(l') = (sqrt(1-e'^2)^3/(1+e'*cos(v'))^2 * d(v') secular terms ~F_2*(sqrt(1-e'^2)^3/(1+e'*cos(v'))^2 without v in argument but in term of F_2 may be (1/r')=(1+e'*cosv'))/(a'*(1-e'^2)) } unit ungutons ; { to find secular terms for ~F_2 pregol3.txt } interface { middle perturbation function from prefol3.txt } { to select long terms to pregos3.txt } procedure secustre ; implementation uses untypvar , { types global variables } unrowmul , { proc MultForRow } unwrtext ; { proc texttorow rowtotext } { to select secular terms of hamiltonian ~F_2 to pregol3.txt to obtain generating function ~S_2 to write to pregos3.txt } procedure secustre ; var m : word ; { count for terms } r : TRowVar ; { current term to analyse } begin writeln('to obtain the second order very long function ~F_2 ~S_2'); maxsum:=numsum; { for giant planet global untypvar } texttorow(3,'prefol',mectre,rowtre); { all terms for ~F_2 function } writeln('there are',mectre:10,' temporary terms'); { array rowtre^ to select very long terms and simple long terms } mectmp:=0; { initial nullo for very long terms } for m:=1 to mectre do { for each term } if rowtre^[m].mar[5] = 0 then { now without v' } begin r:=rowtre^[m]; { temporary } r.mec[10]:=r.mec[10]+r.mec[12]; { power of r' to a' } r.mec[12]:=0; { power of r' to nullo } mectmp:=mectmp+1; { the next secular term } rowtmp^[mectmp]:=r; { to keep } end; writeln('there are',mectmp:10,' very long terms in ~F_2'); rowtotext(3,mectmp,rowtmp,'pregol'); { to this file very long } { to integrate current long periodic term Int [ a*cos(kv'+b) ] = (1/k)*a*sin(kv'+b) thus to change cosinus by sinus and to divide amplitude by k } mectmp:=0; { rowtmp^ to obtain generating function ~S_2 by integration } for m:=1 to mectre do { for each term } if rowtre^[m].mar[5] <> 0 then { now with v' periodic terms } begin { to integrate } mectmp:=mectmp+1; { the next term to function ~S_1 } rowtmp^[mectmp]:=rowtre^[m]; { to keep but with changing } with rowtmp^[mectmp] do { with current term } begin { to change } amp[1]:=amp[1]/mar[5]; { amplitude by (1/k) mar[5]*v' } mec[10]:=mec[10]+mec[12]; { power of r' to a' } mec[12]:=0; { power of r' to nullo } mec[14]:=mec[14]-1; { power for n' (1/n') } if fcs = 'S' { to verify trigonometric } then { may be terms with sinus function } begin { to chanage amp[1]:=-amp[1]; { minus after integration } fcs:='C'; { to change function } end { may be sunus } else { but only cosinus } fcs:='S'; { only to change function } end; end; writeln('there are',mectmp:10,' terms in generating function ~S_2'); rowtotext(3,mectmp,rowtmp,'pregos'); { this file for function ~S_2 } end; end.