{ differential relation d(l) = (1-e*cos(E)) * d(E) secular terms F_1*(1-e*cos(E)) without E in argument } unit unfunons ; { to find secular terms from F_1 } interface { perturbation function prefon1.txt } { to select secular terms to prefos1.txt } procedure secufone ; implementation uses untypvar , { types global variables } unrowmul , { proc MultForRow } unwrtext ; { proc texttorow rowtotext } { simple row for 1-e*cos(E) } procedure sipmler ( var mecone : word ; { two terms } var rowone : TRowPtr ) ; { to rowone } begin mecone:=2; { two terms } rowone^[1]:=recnul; { default untypvar but cosinus } rowone^[2]:=recnul; { default untypvar but cosinus } rowone^[1].amp[1]:=+1.0; { amplitude the first term } rowone^[2].amp[1]:=-1.0; { amplitude the second term } rowone^[2].mec[2]:=+1; { power e^1 } rowone^[2].mar[2]:=+1; { argument angle E } end; { to select secular terms to prefol1.txt to obtain generating function S_1 to write to prefos1.txt } procedure secufone ; var m : word ; { count for terms } begin maxsum:=numsum; { for giant planet global untypvar } sipmler(mecone,rowone); { simple row for 1-e*cos(E) } texttorow(1,'prefon',mectwo,rowtwo); { all terms for F_1 function } mectre:=0; { initial nullo terms } MultForRow(+1.0); { rowone * rowtwo = rowtre result } mectmp:=0; { rowtmp^ to keep our secular terms } for m:=1 to mectre do { for each term } if rowtre^[m].mar[2] = 0 then { now without E } begin mectmp:=mectmp+1; { the next secular term } rowtmp^[mectmp]:=rowtre^[m]; { to keep } end; writeln('there are',mectmp:10,' secular terms'); rowtotext(1,mectmp,rowtmp,'prefol'); { to this file secular } { to integrate current short periodic term Int [ a*cos(kE+b) ] = (1/k)*a*sin(kE+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[2] <> 0 then { now with E short 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[2]; { amplitude by (1/k) mar[2]*E } mec[13]:=mec[13]-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,'prefos'); { this file for function S_1 } end; end.