{ the second try differential relation d(l') = (sqrt(1-e'^2)^3/(1+e'*cos(v'))^2 * d(v') secular terms ~F_1*(sqrt(1-e'^2)^3/(1+e'*cos(v'))^2 without v in argument but in each term of ~F_1 there is (1/r')=(1+e'*cosv'))/(a'*(1-e'^2)) } unit unfutons ; { to find secular terms from ~F_1 } interface { middle perturbation function from prefol1.txt } { to select long terms to pregos1.txt } procedure secutone ; implementation uses untypvar , { types global variables } unrowmul , { proc MultForRow } unrowcor , { rowcote proc to correct with power 1/sqrt(1-e^2) } unwrtext ; { proc texttorow rowtotext } { to select secular terms to pregol1.txt to obtain generating function ~S_1 to write to pregos1.txt } procedure secutone ; var i : shortint ; { for power variants i=-3,-4,-5 } k : byte ; { positive value for power (1+e'*cos(v')) } m : word ; { count for terms } r : TRowVar ; { current term to analyse } begin writeln('to obtain very long function ~F_1'); writeln('to obtain generating function ~S_1'); maxsum:=numsum; { for giant planet global untypvar } texttorow(1,'prefol',meccoh,rowcoh); { all terms for ~F_1 function } { ~F_1*(sqrt(1-e'^2)^3/(1+e'*cos(v'))^2 for given power of variable r' to rowtre^ } mectmp:=0; { rowtmp^ to keep our terms for all power r' } i:=-3; { for power r' variants i=-3,-4,-5 } repeat { in variable i is power r' that given for compare } mectwo:=0; { to change term form F_1 for given power r' } for m:=1 to meccoh do { to analyse each term in ~F_1 function } if rowcoh^[m].mec[12] = i { to compare power for r' } then { this is term with r'^i } begin { to copy to rowtwo^ array } r:=rowcoh^[m]; { current term to change } r.mec[5]:=2*i+3; { power for p'=sqrt(1-e'^2) negative } r.mec[10]:=r.mec[10]+i; { power for a' plus power for r' } r.mec[12]:=0; { but power for r' is nullo now } mectwo:=mectwo+1; { the next our term } rowtwo^[mectwo]:=r; { the next term after changing } end; k:=Abs(i)-2; { positive value for power (1+e'*cos(v')) } texttorow(k,'runge0',mecone,rowone); { row for (1+e'*cos(v'))^k } mectre:=0; { initial nullo terms in array for result } MultForRow(+1.0); { rowone * rowtwo = rowtre result } { result to keep in array rowtmp^ } for m:=1 to mectre do { for each term } begin mectmp:=mectmp+1; { the next term } rowtmp^[mectmp]:=rowtre^[m]; { to keep } end; writeln('current power r'':',i:5,mecone:8,mectwo:8,mectre:8,mectmp:8); i:=i-1; { the next power r' variants } until i = -6 ; { only for i=-3,-4,-5 in prefol1.txt file } rowcote(mectmp,rowtmp); { unrowcor to correct with power 1/sqrt(1-e^2) } writeln('there are',mectmp:10,' temporary terms'); rowtotext(0,mectmp,rowtmp,'pregol'); { to this file temporary } texttorow(0,'pregol',mectre,rowtre); { unwrtext } { 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 mectmp:=mectmp+1; { the next secular term } rowtmp^[mectmp]:=rowtre^[m]; { to keep } end; writeln('there are',mectmp:10,' very long terms'); rowtotext(1,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_1 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[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_1'); rowtotext(1,mectmp,rowtmp,'pregos'); { this file for function ~S_1 } end; end.