1. Using the results from twistAsymmetry to obtain the explicit expressions of the coefficients (Subscript[x, 1])=∑(Subscript[a, jk])(x^j)(y^k), (Subscript[y, 1])=∑(Subscript[b, jk])(x^j)(y^k)

Clear[va10,va01,vb10,vb01,va30,va21,va12,va03,vb30,vb21,vb12,vb03,va50,va41,va32,va23,va14,va05,vb50,vb41,vb32,vb23,vb14,vb05];
(*Taylor expansion in terms of (x,y)=(s/η, ηu)*)
va10[L_,R_,S_]:=va10[L,R,S]=(R^(-1))(S^(-1))((R-L)(S-L)-L(R+S-L));va01[L_,R_,S_]:=va01[L,R,S]=-2(R^(-1))(S^(-1))(L^(1/2)) (((R-L))^(1/2))(((S-L))^(1/2)) (((R+S-L))^(1/2));
vb10[L_,R_,S_]:=vb10[L,R,S]=2(R^(-1))(S^(-1))(L^(1/2)) (((R-L))^(1/2))(((S-L))^(1/2)) (((R+S-L))^(1/2));vb01[L_,R_,S_]:=vb01[L,R,S]=(R^(-1))(S^(-1))((R-L)(S-L)-L(R+S-L));
(*third order derivatives *)
va30[L_,R_,R2_,S_,S2_]:=va30[L,R,R2,S,S2]=R*(L^(1/2))(((S-L))^(1/2))(((R-L))^(-1/2)) (((R+S-L))^(-1/2))((1/((R^5) (S^3)))2 (4 (L^6)+3 (R^3) S (((R+S))^2)-12 (L^5) (2 R+S)+(L^2) R (68 R (S^2)+12 (S^3)+(R^2) S (99-R2 S)+(R^3) (39-3 S S2))+(L^4) (60 R S+12 (S^2)+(R^2) (57-S S2))+L (R^2) (-36 (R^2) S-11 (S^3)+R (S^2) (-38+R2 S)+(R^3) (-9+S S2))+(L^3) (-114 (R^2) S-48 R (S^2)-4 (S^3)+(R^3) (-67+3 S S2))))/6;va21[L_,R_,R2_,S_,S2_]:=va21[L,R,R2,S,S2]=((1/((R^4) (S^3)))2 (4 (L^6)+(R^3) (S^2) (R+S)-4 (L^5) (5 R+3 S)-L (R^2) S (8 (R^2)+16 R S+7 (S^2))+(L^2) R (44 (R^2) S+44 R (S^2)+10 (S^3)+(R^3) (9-S S2))+(L^4) (50 R S+12 (S^2)+(R^2) (37-S S2))+2 (L^3) (-37 (R^2) S-20 R (S^2)-2 (S^3)+(R^3) (-15+S S2))))/2;va12[L_,R_,R2_,S_,S2_]:=va12[L,R,R2,S,S2]=(R^(-1))(L^(-1/2))(((S-L))^(-1/2))(((R-L))^(1/2)) (((R+S-L))^(1/2))*((1/((R^3) (S^3)))2 L (4 (L^5)-4 (R^2) (S^2) (R+S)-4 (L^4) (4 R+3 S)+L R S (13 (R^2)+25 R S+8 (S^2))+(L^3) (40 R S+12 (S^2)+(R^2) (21-S S2))+(L^2) (-42 (R^2) S-32 R (S^2)-4 (S^3)+(R^3) (-9+S S2))))/2;va03[L_,R_,R2_,S_,S2_]:=va03[L,R,R2,S,S2]=(R^(-2))(L^(-1))(((S-L))^(-1))(R-L) (R+S-L)*((1/((R^2) (S^3)))2 L (4 (L^5)-3 (R^2) (S^3)-12 (L^4) (R+S)+6 L R (S^2) (2 R+S)-2 (L^2) S (9 (R^2)+12 R S+2 (S^2))+(L^3) (30 R S+12 (S^2)+(R^2) (9-S S2))))/6;
vb30[L_,R_,R2_,S_,S2_]:=vb30[L,R,R2,S,S2]=(R^2) L(S-L)(((R-L))^(-1)) (((R+S-L))^(-1))*(-(1/((R^5) (S^3)))2 (4 (L^6) R2-12 (L^5) R2 (R+S)+(R^2) (6 (R^2) S+(S^3)+R (S^2) (4+R2 S)+(R^3) (3+S S2))-L R ((S^3)+4 R (S^2) (2+R2 S)+2 (R^2) S (9+2 R2 S)+4 (R^3) (3+S S2))+2 (L^2) R ((S^2) (2+3 R2 S)+R S (9+8 R2 S)+3 (R^2) (3+R2 S+S S2))-2 (L^3) (2 (R^3) R2+2 R2 (S^3)+3 R S (1+4 R2 S)+2 (R^2) (3+6 R2 S+S S2))+(L^4) (12 (R^2) R2+12 R2 (S^2)+R (3+30 R2 S+S S2))))/6;vb21[L_,R_,R2_,S_,S2_]:=vb21[L,R,R2,S,S2]=R (L^(1/2))(((S-L))^(1/2))(((R-L))^(-1/2)) (((R+S-L))^(-1/2))*(-(1/((R^4) (S^3)))2 (4 (L^6) R2+(R^2) S (((R+S))^2)-4 (L^5) R2 (2 R+3 S)+(L^2) R (4 (S^2) (1+R2 S)+R S (13+5 R2 S)+3 (R^2) (3+S S2))-L R (8 (R^2) S+(S^3)+R (S^2) (6+R2 S)+(R^3) (3+S S2))+(L^4) (4 (R^2) R2+12 R2 (S^2)+R (3+20 R2 S+S S2))-(L^3) (4 R2 (S^3)+2 R S (3+8 R2 S)+(R^2) (9+8 R2 S+3 S S2))))/2;vb12[L_,R_,R2_,S_,S2_]:=vb12[L,R,R2,S,S2]=(-(1/((R^3) (S^3)))2 (4 (L^6) R2+(R^2) (S^2) (R+S)-4 (L^5) R2 (R+3 S)-L R S (2 (R^2)+4 R S+(S^2))+(L^2) R (8 R S+2 (S^2) (2+R2 S)+(R^2) (3+S S2))-2 (L^3) (2 R2 (S^3)+R S (3+4 R2 S)+(R^2) (3+S S2))+(L^4) (12 R2 (S^2)+R (3+10 R2 S+S S2))))/2;vb03[L_,R_,R2_,S_,S2_]:=vb03[L,R,R2,S,S2]=(R^(-1))(L^(-1/2))(((S-L))^(-1/2))(((R-L))^(1/2)) (((R+S-L))^(1/2))*(-(1/((R^2) (S^3)))2 (L^2) (4 (L^4) R2-12 (L^3) R2 S+3 R S (R+S)+(L^2) (12 R2 (S^2)+R (3+S S2))-L (6 R S+4 R2 (S^3)+(R^2) (3+S S2))))/6;
(*fifth order derivatives*)
va50[L_,R_,R2_,R4_,S_,S2_,S4_]:=va50[L,R,R2,R4,S,S2,S4]=(R^2) L(S-L)(((R-L))^(-1)) (((R+S-L))^(-1))*((1/((R^9) (S^5)))2 (-16 (L^10) (-9+4 R R2)+80 (L^9) (5 (R^2) R2-9 S+2 R (-9+2 R2 S))-15 (R^5) S (R+S) (-22 (R^2) S-7 (S^3)+R (S^2) (-22+R2 S)+(R^3) (-7+S S2))+80 (L^7) (18 (R^4) R2-18 (S^3)+8 R (S^2) (-18+R2 S)+4 (R^3) (-51+13 R2 S+S S2)+(R^2) S (-318+40 R2 S+S S2))-40 (L^8) (26 (R^3) R2-36 (S^2)+2 R S (-81+8 R2 S)+(R^2) (-159+45 R2 S+S S2))+L (R^4) (-601 (S^5)+2 R (S^4) (-1643+55 R2 S)-6 (R^2) (S^3) (1100-41 R2 S+(R2^2) (S^2))+30 (R^4) S (-83+9 S S2)+(R^3) (S^2) (-6060+120 R2 S+R4 (S^3)+160 S S2)+(R^5) (-345+94 S S2-6 (S^2) (S2^2)+(S^3) S4))+(L^2) (R^3) (1320 (S^5)+R (S^4) (9331-240 R2 S)+20 (R^2) (S^3) (1191-46 R2 S)+6 (R^3) (S^2) (4615-150 R2 S+(R2^2) (S^2)-85 S S2)-(R^4) S (-14670+R4 (S^3)+1170 S S2-10 R2 S (-21+S S2))-5 (R^5) (-561+118 S S2-6 (S^2) (S2^2)+(S^3) S4))+10 (L^3) (R^2) (-140 (S^5)+28 R (S^4) (-48+R2 S)+12 (R^2) (S^3) (-369+14 R2 S)+2 (R^3) (S^2) (-3235+137 R2 S+38 S S2)-2 (R^4) S (2130-118 S S2+R2 S (-69+S S2))+(R^5) (-1017+16 R2 S+158 S S2-6 (S^2) (S2^2)+(S^3) S4))-5 (L^4) R (16 (R^6) R2-144 (S^5)+8 R (S^4) (-264+5 R2 S)+8 (R^2) (S^3) (-1185+47 R2 S)+(R^3) (S^2) (-17847+960 R2 S+119 S S2)+(R^4) S (-14685+523 S S2-2 R2 S (-417+S S2))+2 (R^5) (-2157+116 R2 S+234 S S2-6 (S^2) (S2^2)+(S^3) S4))-(L^6) (1120 (R^5) R2-720 (S^4)+160 R (S^3) (-63+2 R2 S)+40 (R^2) (S^2) (-989+70 R2 S+S S2)+40 (R^3) S (-1428+163 R2 S+14 S S2)+(R^4) (-26865+5040 R2 S+1094 S S2-6 (S^2) (S2^2)+(S^3) S4))+(L^5) (464 (R^6) R2-144 (S^5)+32 R (S^4) (-135+2 R2 S)+120 (R^2) (S^3) (-247+10 R2 S)+40 (R^3) (S^2) (-1902+125 R2 S+6 S S2)+30 (R^4) S (-2685+232 R2 S+55 S S2)+(R^5) (-29469+3360 R2 S+2070 S S2-30 (S^2) (S2^2)+5 (S^3) S4))))/120;va41[L_,R_,R2_,R4_,S_,S2_,S4_]:=va41[L,R,R2,R4,S,S2,S4]=R (L^(1/2))(((S-L))^(1/2))(((R-L))^(-1/2)) (((R+S-L))^(-1/2))*(-(1/((R^8) (S^5)))2 (16 (L^10) (-9+4 R R2)-16 (L^9) (21 (R^2) R2-45 S+R (-81+20 R2 S))+(R^5) (S^2) (-132 (R^2) S-41 (S^3)+R (S^2) (-128+R2 S)+(R^3) (-45+S S2))+L (R^4) S (329 (S^4)+2 (R^2) (S^2) (1118-15 R2 S)+2 R (S^3) (727-14 R2 S)+(R^4) (306-38 S S2)-8 (R^3) S (-177+5 S S2))+8 (L^8) (88 (R^3) R2-180 (S^2)+R S (-729+80 R2 S)+(R^2) (-633+189 R2 S+5 S S2))-8 (L^7) (92 (R^4) R2-180 (S^3)+16 R (S^2) (-81+5 R2 S)+2 (R^2) S (-1266+168 R2 S+5 S S2)+(R^3) (-1407+352 R2 S+35 S S2))+(L^2) (R^3) (-896 (S^5)+8 (R^2) (S^3) (-1379+32 R2 S)+R (S^4) (-5323+100 R2 S)+12 (R^4) S (-297+29 S S2)+4 (R^3) (S^2) (-2457+32 R2 S+54 S S2)+(R^5) (-345+94 S S2-6 (S^2) (S2^2)+(S^3) S4))-4 (L^3) (R^2) (-278 (S^5)+2 R (S^4) (-1153+22 R2 S)+2 (R^2) (S^3) (-3203+96 R2 S)+3 (R^3) (S^2) (-2535+70 R2 S+37 S S2)+(R^4) S (-3822+266 S S2+R2 S (55-S S2))+(R^5) (-615+124 S S2-6 (S^2) (S2^2)+(S^3) S4))-2 (L^5) (40 (R^6) R2-72 (S^5)+8 R (S^4) (-243+4 R2 S)+12 (R^2) (S^3) (-983+42 R2 S)+8 (R^3) (S^2) (-3280+209 R2 S+13 S S2)+(R^4) S (-23427+1756 R2 S+609 S S2)+2 (R^5) (-3465+288 R2 S+314 S S2-6 (S^2) (S2^2)+(S^3) S4))+(L^6) (384 (R^5) R2-720 (S^4)+16 R (S^3) (-567+20 R2 S)+8 (R^2) (S^2) (-3937+294 R2 S+5 S S2)+8 (R^3) S (-4926+550 R2 S+61 S S2)+(R^4) (-15609+2576 R2 S+814 S S2-6 (S^2) (S2^2)+(S^3) S4))+(L^4) R (-648 (S^5)+168 R (S^4) (-50+R2 S)+16 (R^2) (S^3) (-2041+77 R2 S)+5 (R^3) (S^2) (-10375+468 R2 S+87 S S2)-4 (R^4) S (8655-391 S S2+R2 S (-345+S S2))+2 (R^5) (-3855+100 R2 S+542 S S2-18 (S^2) (S2^2)+3 (S^3) S4))))/24;va32[L_,R_,R2_,R4_,S_,S2_,S4_]:=va32[L,R,R2,R4,S,S2,S4]=((1/((R^7) (S^5)))2 (-16 (L^10) (-9+4 R R2)+12 (R^5) (S^3) (((R+S))^2)+16 (L^9) (17 (R^2) R2-45 S+4 R (-18+5 R2 S))+(L^2) (R^3) S (580 (S^4)+(R^2) (S^2) (4394-41 R2 S)+R (S^3) (2783-32 R2 S)+(R^4) (507-61 S S2)+2 (R^3) S (1341-34 S S2))+2 L (R^4) (S^2) (-282 (R^2) S-82 (S^3)+R (S^2) (-271+2 R2 S)+(R^3) (-93+2 S S2))+16 (L^7) (19 (R^4) R2-90 (S^3)+8 R (S^2) (-72+5 R2 S)+3 (R^3) (-153+36 R2 S+5 S S2)+(R^2) S (-978+136 R2 S+5 S S2))-8 (L^8) (54 (R^3) R2-180 (S^2)+8 R S (-81+10 R2 S)+(R^2) (-489+153 R2 S+5 S S2))+(L^3) (R^2) (-860 (S^5)+4 R (S^4) (-1504+25 R2 S)+2 (R^2) (S^3) (-6789+140 R2 S)+4 (R^4) S (-1059+95 S S2)+2 (R^3) (S^2) (-6168+77 R2 S+114 S S2)+(R^5) (-345+94 S S2-6 (S^2) (S2^2)+(S^3) S4))+(L^4) R (576 (S^5)+4 (R^2) (S^3) (5333-183 R2 S)+4 R (S^4) (1623-34 R2 S)-4 (R^3) (S^2) (-6891+230 R2 S+75 S S2)+(R^4) S (14055-833 S S2+R2 S (-277+S S2))-3 (R^5) (-705+134 S S2-6 (S^2) (S2^2)+(S^3) S4))-(L^6) (80 (R^5) R2-720 (S^4)+64 R (S^3) (-126+5 R2 S)+4 (R^2) (S^2) (-6083+476 R2 S+10 S S2)+4 (R^3) S (-6432+673 R2 S+104 S S2)+(R^4) (-8265+1064 R2 S+574 S S2-6 (S^2) (S2^2)+(S^3) S4))+(L^5) (-144 (S^5)+64 R (S^4) (-54+R2 S)+12 (R^2) (S^3) (-1519+68 R2 S)+4 (R^3) (S^2) (-8570+507 R2 S+44 S S2)+2 (R^4) S (-12435+716 R2 S+425 S S2)+(R^5) (-5595+240 R2 S+682 S S2-18 (S^2) (S2^2)+3 (S^3) S4))))/12;va23[L_,R_,R2_,R4_,S_,S2_,S4_]:=va23[L,R,R2,R4,S,S2,S4]=(R^(-1))(L^(-1/2))(((S-L))^(-1/2))(((R-L))^(1/2)) (((R+S-L))^(1/2))*(-(1/((R^6) (S^5)))2 (16 (L^10) (-9+4 R R2)-3 (R^5) (S^4) (R+S)+3 L (R^4) (S^3) (30 (R^2)+58 R S+27 (S^2))-16 (L^9) (13 (R^2) R2-45 S+R (-63+20 R2 S))+3 (L^2) (R^3) (S^2) (-480 (R^2) S-122 (S^3)+R (S^2) (-449+2 R2 S)+2 (R^3) (-75+2 S S2))+8 (L^8) (28 (R^3) R2-180 (S^2)+R S (-567+80 R2 S)+(R^2) (-363+117 R2 S+5 S S2))+4 (L^3) (R^2) S (162 (S^4)+6 R (S^3) (155-2 R2 S)-2 (R^2) (S^2) (-807+8 R2 S)-6 (R^3) S (-167+4 S S2)-3 (R^4) (-59+7 S S2))-8 (L^7) (10 (R^4) R2-180 (S^3)+16 R (S^2) (-63+5 R2 S)+2 (R^2) S (-726+104 R2 S+5 S S2)+(R^3) (-555+112 R2 S+25 S S2))+(L^4) R (-504 (S^5)+8 R (S^4) (-606+13 R2 S)+2 (R^2) (S^3) (-6519+184 R2 S)+6 (R^4) S (-751+61 S S2)+(R^3) (S^2) (-12939+230 R2 S+191 S S2)+(R^5) (-345+94 S S2-6 (S^2) (S2^2)+(S^3) S4))-2 (L^5) (-72 (S^5)+8 R (S^4) (-189+4 R2 S)+12 (R^2) (S^3) (-565+26 R2 S)+2 (R^3) (S^2) (-5205+260 R2 S+36 S S2)+3 (R^4) S (-1929+62 R2 S+91 S S2)+(R^5) (-885+154 S S2-6 (S^2) (S2^2)+(S^3) S4))+(L^6) (-720 (S^4)+16 R (S^3) (-441+20 R2 S)+8 (R^2) (S^2) (-2259+182 R2 S+5 S S2)+8 (R^3) S (-1947+174 R2 S+43 S S2)+(R^4) (-3825+280 R2 S+374 S S2-6 (S^2) (S2^2)+(S^3) S4))))/12;va14[L_,R_,R2_,R4_,S_,S2_,S4_]:=va14[L,R,R2,R4,S,S2,S4]=(R^(-2))(L^(-1))(((S-L))^(-1))(R-L) (R+S-L)*(-(1/((R^5) (S^5)))2 L (16 (L^9) (-9+4 R R2)+48 (R^4) (S^4) (R+S)-12 L (R^3) (S^3) (29 (R^2)+53 R S+20 (S^2))-16 (L^8) (9 (R^2) R2-45 S+R (-54+20 R2 S))-16 (L^6) (-90 (S^3)+8 R (S^2) (-54+5 R2 S)+10 (R^3) (-15+2 R2 S+S S2)+(R^2) S (-510+72 R2 S+5 S S2))+8 (L^7) (10 (R^3) R2-180 (S^2)+2 R S (-243+40 R2 S)+(R^2) (-255+81 R2 S+5 S S2))-4 (L^2) (R^2) (S^2) (-675 (R^2) S-120 (S^3)+4 R (S^2) (-138+R2 S)+(R^3) (-216+7 S S2))+(L^3) R S (-432 (S^4)+24 R (S^3) (-145+3 R2 S)+16 (R^2) (S^2) (-459+8 R2 S)+(R^4) (-909+107 S S2)+(R^3) S (-5061+109 S S2))+(L^4) (144 (S^5)-32 R (S^4) (-81+2 R2 S)-48 (R^2) (S^3) (-200+9 R2 S)+18 (R^4) S (243-17 S S2)-16 (R^3) (S^2) (-714+23 R2 S+7 S S2)+(R^5) (345-94 S S2+6 (S^2) (S2^2)-(S^3) S4))+(L^5) (-720 (S^4)+32 R (S^3) (-189+10 R2 S)+8 (R^2) (S^2) (-1590+126 R2 S+5 S S2)+16 (R^3) S (-528+31 R2 S+17 S S2)+(R^4) (-1425+214 S S2-6 (S^2) (S2^2)+(S^3) S4))))/24;va05[L_,R_,R2_,R4_,S_,S2_,S4_]:=va05[L,R,R2,R4,S,S2,S4]=(R^(-3))(L^(-3/2))(((S-L))^(-3/2))(((R-L))^(3/2)) (((R+S-L))^(3/2))*(-(1/((R^4) (S^5)))2 L (16 (L^9) (-9+4 R R2)+45 (R^4) (S^5)-45 L (R^3) (S^4) (7 R+4 S)+120 (L^2) (R^2) (S^3) (8 (R^2)+11 R S+3 (S^2))-80 (L^8) ((R^2) R2-9 S+R (-9+4 R2 S))-40 (L^6) (-36 (S^3)+16 R (S^2) (-9+R2 S)+3 (R^3) (-9+S S2)+2 (R^2) S (-66+8 R2 S+S S2))+40 (L^7) (-36 (S^2)+R S (-81+16 R2 S)+(R^2) (-33+9 R2 S+S S2))+5 (L^3) R (S^2) (-756 (R^2) S-72 (S^3)+8 R (S^2) (-60+R2 S)+(R^3) (-291+11 S S2))-2 (L^4) S (-72 (S^4)+60 (R^2) (S^2) (-53+2 R2 S)+8 R (S^3) (-135+4 R2 S)+20 (R^3) S (-135+2 S S2)+(R^4) (-555+65 S S2))+(L^5) (-720 (S^4)+80 R (S^3) (-63+4 R2 S)+40 (R^2) (S^2) (-207+14 R2 S+S S2)+40 (R^3) S (-96+5 S S2)+(R^4) (-345+94 S S2-6 (S^2) (S2^2)+(S^3) S4))))/120;vb50[L_,R_,R2_,R4_,S_,S2_,S4_]:=vb50[L,R,R2,R4,S,S2,S4]=(R^3) (L^(3/2))(((S-L))^(3/2))(((R-L))^(-3/2)) (((R+S-L))^(-3/2))*(-(1/((R^9) (S^5)))2 (16 (L^10) (4 R2-6 R (R2^2)+(R^2) R4)-80 (L^9) ((R^3) R4+4 R2 S+R R2 (7-6 R2 S)+(R^2) (-6 (R2^2)+R4 S))-40 (L^7) (4 (R^5) R4+16 R2 (S^3)-8 R R2 (S^2) (-14+3 R2 S)-8 (R^4) (3 (R2^2)-2 R4 S)+(R^3) (101 R2-96 (R2^2) S+16 R4 (S^2)-5 R2 S S2)+2 (R^2) S (102 R2-48 (R2^2) S+2 R4 (S^2)-R2 S S2))+40 (L^8) (4 (R^4) R4+16 R2 (S^2)+3 R R2 S (21-8 R2 S)+(R^3) (-24 (R2^2)+9 R4 S)+(R^2) (51 R2-54 (R2^2) S+4 R4 (S^2)-R2 S S2))+(L^2) (R^3) ((S^4) (29+320 R2 S)-40 R (S^3) (-9-38 R2 S+4 (R2^2) (S^2))+2 (R^3) S (450-60 (R2^2) (S^2)+23 R4 (S^3)-150 S S2+10 R2 S (63-5 S S2))+2 (R^2) (S^2) (1120 R2 S-163 (R2^2) (S^2)+5 (99+2 R4 (S^3)-3 S S2))-5 (R^4) (-45-4 R4 (S^3)+78 S S2+18 (S^2) (S2^2)+8 R2 S (-6+S S2)-3 (S^3) S4))+20 (L^3) (R^2) (-22 R2 (S^5)+2 R (S^3) (-3-81 R2 S+7 (R2^2) (S^2))+(R^2) (S^2) (-33-366 R2 S+56 (R2^2) (S^2)-2 R4 (S^3)+S S2)-2 (R^5) (R4 (S^2)+R2 (5-S S2))+(R^3) S (-45+52 (R2^2) (S^2)-8 R4 (S^3)+15 S S2+R2 S (-325+11 S S2))+(R^4) (-15+12 (R2^2) (S^2)-8 R4 (S^3)+26 S S2+6 (S^2) (S2^2)+4 R2 S (-28+3 S S2)-(S^3) S4))+(R^4) (-(S^5)+R (S^4) (29+5 R2 S)+6 (R^2) (S^3) (20+R2 S-(R2^2) (S^2))+(R^3) (S^2) (165+R4 (S^3)-5 S S2)-30 (R^4) S (-3+S S2)+(R^5) (15-26 S S2-6 (S^2) (S2^2)+(S^3) S4))-L (R^3) (-(S^5)+2 R (S^4) (29+50 R2 S)+2 (R^2) (S^3) (180+143 R2 S-23 (R2^2) (S^2))+2 (R^3) (S^2) (330+120 R2 S-18 (R2^2) (S^2)+3 R4 (S^3)-10 S S2)+2 (R^4) S (3 (75+R4 (S^3)-25 S S2)-10 R2 S (-3+S S2))+6 (R^5) (15-26 S S2-6 (S^2) (S2^2)+(S^3) S4))+(L^6) (80 (R^6) R4+320 R2 (S^4)-80 R R2 (S^3) (-49+6 R2 S)-80 (R^5) (6 (R2^2)-7 R4 S)+40 (R^2) (S^2) (-84 (R2^2) S+2 R4 (S^2)+R2 (317-S S2))-40 (R^4) (84 (R2^2) S-25 R4 (S^2)+2 R2 (-59+5 S S2))+(R^3) (15-6040 (R2^2) (S^2)+560 R4 (S^3)-26 S S2-6 (S^2) (S2^2)-40 R2 S (-352+9 S S2)+(S^3) S4))-2 (L^5) (8 (R^7) R4+32 R2 (S^5)+24 R R2 (S^4) (35-2 R2 S)-24 (R^6) (2 (R2^2)-5 R4 S)+(R^2) (4740 R2 (S^3)-720 (R2^2) (S^4)+8 R4 (S^5))+5 (R^3) S (9-468 (R2^2) (S^2)+24 R4 (S^3)-3 S S2-8 R2 S (-233+2 S S2))-4 (R^5) (180 (R2^2) S-95 R4 (S^2)+R2 (-408+50 S S2))+(R^4) (45-2320 (R2^2) (S^2)+380 R4 (S^3)-78 S S2-18 (S^2) (S2^2)-80 R2 S (-87+4 S S2)+3 (S^3) S4))+5 (L^4) R (8 (R^6) R4 S+56 R2 (S^5)-48 R R2 (S^4) (-14+R2 S)+(R^2) (S^2) (33+2304 R2 S-360 (R2^2) (S^2)+8 R4 (S^3)-S S2)+2 (R^3) S (45-320 (R2^2) (S^2)+28 R4 (S^3)-15 S S2+2 R2 S (755-13 S S2))-8 (R^5) (6 (R2^2) S-7 R4 (S^2)+R2 (-31+5 S S2))+(R^4) (45-344 (R2^2) (S^2)+100 R4 (S^3)-78 S S2-18 (S^2) (S2^2)-8 R2 S (-195+14 S S2)+3 (S^3) S4))))/120;vb41[L_,R_,R2_,R4_,S_,S2_,S4_]:=vb41[L,R,R2,R4,S,S2,S4]=(R^2) L(S-L)(((R-L))^(-1)) (((R+S-L))^(-1))*((1/((R^8) (S^5)))2 (16 (L^10) (-4 R2+6 R (R2^2)-(R^2) R4)+16 (L^9) (4 (R^3) R4+20 R2 S+R R2 (31-30 R2 S)+(R^2) (-24 (R2^2)+5 R4 S))+(R^4) S (R+S) (-30 (R^2) S+(S^3)+R (S^2) (-14+R2 S)+(R^3) (-15+S S2))-8 (L^8) (12 (R^4) R4+80 R2 (S^2)-3 R R2 S (-93+40 R2 S)+(R^3) (-72 (R2^2)+36 R4 S)+(R^2) (193 R2-216 (R2^2) S+20 R4 (S^2)-5 R2 S S2))+16 (L^7) (4 (R^5) R4+40 R2 (S^3)+4 R R2 (S^2) (62-15 R2 S)-24 (R^4) ((R2^2)-R4 S)+(R^2) S (386 R2-192 (R2^2) S+10 R4 (S^2)-5 R2 S S2)-2 (R^3) (-78 R2+72 (R2^2) S-16 R4 (S^2)+5 R2 S S2))-(L^2) (R^3) ((S^4) (29+184 R2 S)+4 R (S^3) (71+162 R2 S-14 (R2^2) (S^2))+2 (R^2) (S^2) (315+322 R2 S-27 (R2^2) (S^2)+4 R4 (S^3)-9 S S2)+3 (R^3) S (150+62 R2 S+3 R4 (S^3)-42 S S2-6 R2 (S^2) S2)+5 (R^4) (15-26 S S2-6 (S^2) (S2^2)+(S^3) S4))+L (R^3) (-(S^5)+2 R (S^4) (21+19 R2 S)+2 (R^2) (S^3) (104+35 R2 S-3 (R2^2) (S^2))+2 (R^4) S (75-17 S S2)+(R^3) (S^2) (300+32 R2 S+R4 (S^3)-8 S S2)+(R^5) (15-26 S S2-6 (S^2) (S2^2)+(S^3) S4))-(L^6) (16 (R^6) R4+320 R2 (S^4)+16 R R2 (S^3) (217-30 R2 S)-32 (R^5) (3 (R2^2)-7 R4 S)+8 (R^2) (S^2) (-336 (R2^2) S+10 R4 (S^2)+R2 (1199-5 S S2))-8 (R^4) (168 (R2^2) S-75 R4 (S^2)+R2 (-278+30 S S2))+(R^3) (15-3616 (R2^2) (S^2)+448 R4 (S^3)-26 S S2-6 (S^2) (S2^2)-48 R2 S (-181+6 S S2)+(S^3) S4))+(L^5) (48 (R^6) R4 S+64 R2 (S^5)-48 R R2 (S^4) (-31+2 R2 S)+8 (R^2) (S^3) (895 R2-144 (R2^2) S+2 R4 (S^2))+2 (R^3) S (45-1392 (R2^2) (S^2)+96 R4 (S^3)-15 S S2+32 R2 S (179-2 S S2))-16 (R^5) (18 (R2^2) S-19 R4 (S^2)+5 R2 (-13+2 S S2))+(R^4) (75-1840 (R2^2) (S^2)+456 R4 (S^3)-130 S S2-30 (S^2) (S2^2)-384 R2 S (-17+S S2)+5 (S^3) S4))+2 (L^3) (R^2) (164 R2 (S^5)+4 R (S^3) (15+242 R2 S-20 (R2^2) (S^2))+2 (R^2) (S^2) (135+825 R2 S-104 (R2^2) (S^2)+6 R4 (S^3)-4 S S2)+2 (R^3) S (-48 (R2^2) (S^2)+2 (75+8 R4 (S^3)-23 S S2)-7 R2 S (-71+3 S S2))+(R^4) (75+16 R4 (S^3)-130 S S2-30 (S^2) (S2^2)-8 R2 S (-22+3 S S2)+5 (S^3) S4))+(L^4) R (-248 R2 (S^5)+32 R R2 (S^4) (-79+6 R2 S)+(R^2) (S^2) (-165-7016 R2 S+1056 (R2^2) (S^2)-32 R4 (S^3)+5 S S2)+8 (R^5) (-7 R4 (S^2)+5 R2 (-5+S S2))+(R^3) S (-375+1240 (R2^2) (S^2)-168 R4 (S^3)+121 S S2+2 R2 S (-3497+77 S S2))+2 (R^4) (168 (R2^2) (S^2)+4 R2 S (-307+28 S S2)-5 (15+20 R4 (S^3)-26 S S2-6 (S^2) (S2^2)+(S^3) S4)))))/24;vb32[L_,R_,R2_,R4_,S_,S2_,S4_]:=vb32[L,R,R2,R4,S,S2,S4]=R (L^(1/2))(((S-L))^(1/2))(((R-L))^(-1/2)) (((R+S-L))^(-1/2))*(-(1/((R^7) (S^5)))2 (16 (L^10) (4 R2-6 R (R2^2)+(R^2) R4)-16 (L^9) (3 (R^3) R4+20 R2 S+3 R R2 (9-10 R2 S)+(R^2) (-18 (R2^2)+5 R4 S))+L (R^3) S ((S^4)-2 (R^2) (S^2) (47+3 R2 S)-2 R (S^3) (13+4 R2 S)+4 (R^3) S (-24+S S2)+2 (R^4) (-15+S S2))-(R^4) (S^2) (-6 (R^2) S+(S^3)+R (S^2) (-2+R2 S)+(R^3) (-3+S S2))-8 (L^7) (2 (R^5) R4+80 R2 (S^3)-24 R R2 (S^2) (-18+5 R2 S)-12 (R^4) ((R2^2)-2 R4 S)+(R^3) (173 R2-144 (R2^2) S+48 R4 (S^2)-15 R2 S S2)+2 (R^2) S (278 R2-144 (R2^2) S+10 R4 (S^2)-5 R2 S S2))+8 (L^8) (6 (R^4) R4+80 R2 (S^2)-3 R R2 S (-81+40 R2 S)-9 (R^3) (4 (R2^2)-3 R4 S)+(R^2) (139 R2-162 (R2^2) S+20 R4 (S^2)-5 R2 S S2))+2 (L^5) (-32 R2 (S^5)+24 R R2 (S^4) (-27+2 R2 S)-4 (R^2) (S^3) (643 R2-108 (R2^2) S+2 R4 (S^2))+2 (R^5) (-19 R4 (S^2)+10 R2 (-5+S S2))+3 (R^3) S (-15+230 (R2^2) (S^2)-24 R4 (S^3)+5 S S2+2 R2 S (-525+8 S S2))+2 (R^4) (-15+114 (R2^2) (S^2)-57 R4 (S^3)+26 S S2+6 (S^2) (S2^2)+12 R2 S (-51+4 S S2)-(S^3) S4))+(L^2) (R^3) ((S^4) (29+90 R2 S)-4 R (S^3) (-52-50 R2 S+3 (R2^2) (S^2))+2 (R^2) (S^2) (174+50 R2 S+R4 (S^3)-5 S S2)-36 (R^3) S (-5+S S2)+(R^4) (15-26 S S2-6 (S^2) (S2^2)+(S^3) S4))-4 (L^3) (R^2) (58 R2 (S^5)+R (S^3) (30+254 R2 S-19 (R2^2) (S^2))+3 (R^2) (S^2) (35+96 R2 S-8 (R2^2) (S^2)+R4 (S^3)-S S2)+(R^3) S (90+4 R4 (S^3)-24 S S2+R2 S (89-5 S S2))+(R^4) (15-26 S S2-6 (S^2) (S2^2)+(S^3) S4))+(L^6) (56 (R^5) R4 S+320 R2 (S^4)-48 R R2 (S^3) (-63+10 R2 S)+8 (R^2) (S^2) (-252 (R2^2) S+10 R4 (S^2)+R2 (863-5 S S2))-12 (R^4) (28 (R2^2) S-25 R4 (S^2)+10 R2 (-7+S S2))+(R^3) (15-1804 (R2^2) (S^2)+336 R4 (S^3)-26 S S2-6 (S^2) (S2^2)-8 R2 S (-601+27 S S2)+(S^3) S4))+(L^4) R (216 R2 (S^5)-16 R R2 (S^4) (-113+9 R2 S)+(R^2) (S^2) (165+3802 R2 S-516 (R2^2) (S^2)+24 R4 (S^3)-5 S S2)+4 (R^3) S (75-75 (R2^2) (S^2)+21 R4 (S^3)-23 S S2+R2 S (642-19 S S2))+(R^4) (90+50 R4 (S^3)-156 S S2-36 (S^2) (S2^2)-8 R2 S (-58+7 S S2)+6 (S^3) S4))))/12;vb23[L_,R_,R2_,R4_,S_,S2_,S4_]:=vb23[L,R,R2,R4,S,S2,S4]=(-(1/((R^6) (S^5)))2 L (16 (L^9) (4 R2-6 R (R2^2)+(R^2) R4)-18 (R^4) (S^2) (((R+S))^2)-16 (L^8) (2 (R^3) R4+20 R2 S+R R2 (23-30 R2 S)+(R^2) (-12 (R2^2)+5 R4 S))+3 L (R^3) S (54 (R^2) S+R (S^2) (50+11 R2 S)+(S^3) (11+12 R2 S)+(R^3) (15-S S2))-16 (L^6) (4 (R^4) R4 S+40 R2 (S^3)+4 R R2 (S^2) (46-15 R2 S)+(R^2) S (186 R2-96 (R2^2) S+10 R4 (S^2)-5 R2 S S2)+(R^3) (40 R2-24 (R2^2) S+16 R4 (S^2)-5 R2 S S2))+8 (L^7) (2 (R^4) R4+80 R2 (S^2)-3 R R2 S (-69+40 R2 S)-6 (R^3) (2 (R2^2)-3 R4 S)+(R^2) (93 R2-108 (R2^2) S+20 R4 (S^2)-5 R2 S S2))-(L^2) (R^2) (156 R2 (S^5)+2 R (S^3) (63+220 R2 S-12 (R2^2) (S^2))+2 (R^2) (S^2) (156+121 R2 S+2 R4 (S^3)-2 S S2)-36 (R^3) S (-5+S S2)+(R^4) (15-26 S S2-6 (S^2) (S2^2)+(S^3) S4))+(L^3) R (184 R2 (S^5)+12 R R2 (S^4) (101-8 R2 S)+4 (R^2) (S^2) (42+427 R2 S-42 (R2^2) (S^2)+4 R4 (S^3)-S S2)+(R^3) S (225+28 R4 (S^3)-63 S S2+5 R2 S (117-5 S S2))+3 (R^4) (15-26 S S2-6 (S^2) (S2^2)+(S^3) S4))+(L^5) (320 R2 (S^4)+16 R R2 (S^3) (161-30 R2 S)+20 (R^4) (5 R4 (S^2)-2 R2 (-5+S S2))+4 (R^2) (S^2) (-336 (R2^2) S+20 R4 (S^2)-5 R2 (-231+2 S S2))+(R^3) (15-600 (R2^2) (S^2)+224 R4 (S^3)-26 S S2-6 (S^2) (S2^2)-8 R2 S (-277+18 S S2)+(S^3) S4))-(L^4) (64 R2 (S^5)-48 R R2 (S^4) (-23+2 R2 S)+4 (R^2) (S^3) (861 R2-144 (R2^2) S+4 R4 (S^2))+2 (R^3) S (45-228 (R2^2) (S^2)+48 R4 (S^3)-15 S S2-32 R2 S (-45+S S2))+(R^4) (45+76 R4 (S^3)-78 S S2-18 (S^2) (S2^2)-64 R2 S (-9+S S2)+3 (S^3) S4))))/12;vb14[L_,R_,R2_,R4_,S_,S2_,S4_]:=vb14[L,R,R2,R4,S,S2,S4]=(R^(-1))(L^(-1/2))(((S-L))^(-1/2))(((R-L))^(1/2)) (((R+S-L))^(1/2))*(-(1/((R^5) (S^5)))2 (16 (L^10) (4 R2-6 R (R2^2)+(R^2) R4)+3 (R^4) (S^4) (R+S)-3 L (R^3) (S^3) (4 (R^2)+6 R S+(S^2))-16 (L^9) ((R^3) R4+20 R2 S+R R2 (19-30 R2 S)+(R^2) (-6 (R2^2)+5 R4 S))+3 (L^2) (R^3) (S^2) (36 R S+(S^2) (15+4 R2 S)+2 (R^2) (9+S S2))+4 (L^3) (R^2) S (-26 R2 (S^4)-2 R (S^2) (18+17 R2 S)+(R^3) (-15+S S2)-2 (R^2) S (27+S S2))+8 (L^8) (9 (R^3) R4 S+80 R2 (S^2)-3 R R2 S (-57+40 R2 S)+(R^2) (55 R2-54 (R2^2) S+20 R4 (S^2)-5 R2 S S2))+8 (L^7) (-80 R2 (S^3)+8 R R2 (S^2) (-38+15 R2 S)+2 (R^2) S (48 (R2^2) S-10 R4 (S^2)+5 R2 (-22+S S2))+(R^3) (-16 R4 (S^2)+5 R2 (-5+S S2)))+(L^4) R (152 R2 (S^5)+16 R R2 (S^4) (47-3 R2 S)+2 (R^3) S (75-17 S S2)+(R^2) (S^2) (177+524 R2 S+8 R4 (S^3)-S S2)+(R^4) (15-26 S S2-6 (S^2) (S2^2)+(S^3) S4))-2 (L^5) (32 R2 (S^5)+24 R R2 (S^4) (19-2 R2 S)+4 (R^2) (S^3) (259 R2-36 (R2^2) S+2 R4 (S^2))+(R^3) S (3 (15+8 R4 (S^3)-5 S S2)+4 R2 S (111-4 S S2))+(R^4) (15-26 S S2-6 (S^2) (S2^2)+(S^3) S4))+(L^6) (320 R2 (S^4)+16 R R2 (S^3) (133-30 R2 S)+8 (R^2) (S^2) (-84 (R2^2) S+10 R4 (S^2)+R2 (343-5 S S2))+(R^3) (15+112 R4 (S^3)-26 S S2-6 (S^2) (S2^2)-8 R2 S (-86+9 S S2)+(S^3) S4))))/24;vb05[L_,R_,R2_,R4_,S_,S2_,S4_]:=vb05[L,R,R2,R4,S,S2,S4]=(R^(-2))(L^(-1))(((S-L))^(-1))(R-L) (R+S-L)*(-(1/((R^4) (S^5)))2 (L^2) (16 (L^8) (4 R2-6 R (R2^2)+(R^2) R4)+60 (R^3) (S^3) (R+S)-80 (L^7) (4 R2 S+(R^2) R4 S+3 R R2 (1-2 R2 S))-20 L (R^2) (S^2) (9 R S+4 R2 (S^3)+(R^2) (6+S S2))+5 (L^2) R S (88 R R2 (S^3)+24 R2 (S^4)+(R^3) (15-S S2)+(R^2) S (39+S S2))-40 (L^6) (-16 R2 (S^2)+3 R R2 S (-9+8 R2 S)+(R^2) (-5 R2-4 R4 (S^2)+R2 S S2))+80 (L^5) S (-8 R2 (S^2)+12 R R2 S (-2+R2 S)+(R^2) (-10 R2-2 R4 (S^2)+R2 S S2))+(L^4) (320 R2 (S^4)-240 R R2 (S^3) (-7+2 R2 S)+40 (R^2) (S^2) (32 R2+2 R4 (S^2)-R2 S S2)+(R^3) (15-26 S S2-6 (S^2) (S2^2)+(S^3) S4))-(L^3) (64 R2 (S^5)+48 R R2 (S^4) (15-2 R2 S)+16 (R^2) (65 R2 (S^3)+R4 (S^5))-30 (R^3) S (-3+S S2)+(R^4) (15-26 S S2-6 (S^2) (S2^2)+(S^3) S4))))/120;

Switch to vector formation

(*v={L,R,R2,R4,S,S2,S4}*)
Clear[t,ra,ra2,ra4,rb,rb2,rb4];
t[v__]:=t[v]=v[[1]];
ra[v__]:=ra[v]=v[[2]];
ra2[v__]:=ra2[v]=v[[3]];
ra4[v__]:=ra4[v]=v[[4]];
rb[v__]:=rb[v]=v[[5]];
rb2[v__]:=rb2[v]=v[[6]];
rb4[v__]:=rb4[v]=v[[7]];

Clear[a10,a01,b10,b01,a30,a21,a12,a03,b30,b21,b12,b03,a50,a41,a32,a23,a14,a05,b50,b41,b32,b23,b14,b05];
(*Taylor expansion in terms of (x,y)=(s/η, ηu)*)
a10[v__]:=a10[v]=va10[t[v],ra[v],rb[v]];
a01[v__]:=a01[v]=va01[t[v],ra[v],rb[v]];
b10[v__]:=b10[v]=vb10[t[v],ra[v],rb[v]];
b01[v__]:=b01[v]=vb01[t[v],ra[v],rb[v]];
(*third order*)
a30[v__]:=a30[v]=va30[t[v],ra[v],ra2[v],rb[v],rb2[v]];a21[v__]:=a21[v]=va21[t[v],ra[v],ra2[v],rb[v],rb2[v]];a12[v__]:=a12[v]=va12[t[v],ra[v],ra2[v],rb[v],rb2[v]];a03[v__]:=a03[v]=va03[t[v],ra[v],ra2[v],rb[v],rb2[v]];b30[v__]:=b30[v]=vb30[t[v],ra[v],ra2[v],rb[v],rb2[v]];b21[v__]:=b21[v]=vb21[t[v],ra[v],ra2[v],rb[v],rb2[v]];b12[v__]:=b12[v]=vb12[t[v],ra[v],ra2[v],rb[v],rb2[v]];b03[v__]:=b03[v]=vb03[t[v],ra[v],ra2[v],rb[v],rb2[v]];
(*fifth order*)
a50[v__]:=a50[v]=va50[t[v],ra[v],ra2[v],ra4[v],rb[v],rb2[v],rb4[v]];a41[v__]:=a41[v]=va41[t[v],ra[v],ra2[v],ra4[v],rb[v],rb2[v],rb4[v]];a32[v__]:=a32[v]=va32[t[v],ra[v],ra2[v],ra4[v],rb[v],rb2[v],rb4[v]];a23[v__]:=a23[v]=va23[t[v],ra[v],ra2[v],ra4[v],rb[v],rb2[v],rb4[v]];a14[v__]:=a14[v]=va14[t[v],ra[v],ra2[v],ra4[v],rb[v],rb2[v],rb4[v]];a05[v__]:=a05[v]=va05[t[v],ra[v],ra2[v],ra4[v],rb[v],rb2[v],rb4[v]];b50[v__]:=b50[v]=vb50[t[v],ra[v],ra2[v],ra4[v],rb[v],rb2[v],rb4[v]];b41[v__]:=b41[v]=vb41[t[v],ra[v],ra2[v],ra4[v],rb[v],rb2[v],rb4[v]];b32[v__]:=b32[v]=vb32[t[v],ra[v],ra2[v],ra4[v],rb[v],rb2[v],rb4[v]];b23[v__]:=b23[v]=vb23[t[v],ra[v],ra2[v],ra4[v],rb[v],rb2[v],rb4[v]];b14[v__]:=b14[v]=vb14[t[v],ra[v],ra2[v],ra4[v],rb[v],rb2[v],rb4[v]];b05[v__]:=b05[v]=vb05[t[v],ra[v],ra2[v],ra4[v],rb[v],rb2[v],rb4[v]];

2. Coefficients of the coordinate transform (x,y)->(X,Y)=(∑(Subscript[p, jk])(x^j)(y^k),∑(Subscript[q, jk])(x^j)(y^k))

Clear[p30,p21,p12,p03,q30,q21,q12,q03];
p30[v__]:=p30[v]=-(2a10[v]b10[v](a30[v]+b21[v]-a12[v]-b03[v])-(a10[v]^2-b10[v]^2)(b30[v]-a21[v]-b12[v]+a03[v]))/(8b10[v])+(b10[v](a30[v]-b21[v]-a12[v]+b03[v])+a10[v](b30[v]+a21[v]-b12[v]-a03[v]))/(32a10[v]b10[v] );
p21[v__]:=p21[v]=3(b10[v](b30[v]+a21[v]-b12[v]-a03[v])-a10[v](a30[v]-b21[v]-a12[v]+b03[v]))/(32a10[v]b10[v]);
p12[v__]:=p12[v]=-3(2a10[v]b10[v](a30[v]+b21[v]-a12[v]-b03[v])-(a10[v]^2-b10[v]^2)(b30[v]-a21[v]-b12[v]+a03[v]))/(8b10[v])-3(b10[v](a30[v]-b21[v]-a12[v]+b03[v])+a10[v](b30[v]+a21[v]-b12[v]-a03[v]))/(32a10[v]b10[v] );
p03[v__]:=p03[v]=(2a10[v]b10[v](b30[v]-a21[v]-b12[v]+a03[v])+(a10[v]^2-b10[v]^2)(a30[v]+b21[v]-a12[v]-b03[v]))/(4b10[v])-(b10[v](b30[v]+a21[v]-b12[v]-a03[v])-a10[v](a30[v]-b21[v]-a12[v]+b03[v]))/(32a10[v]b10[v] );
q30[v__]:=q30[v]=(2a10[v]b10[v](b30[v]-a21[v]-b12[v]+a03[v])+(a10[v]^2-b10[v]^2)(a30[v]+b21[v]-a12[v]-b03[v]))/(4b10[v])+(b10[v](b30[v]+a21[v]-b12[v]-a03[v])-a10[v](a30[v]-b21[v]-a12[v]+b03[v]))/(32a10[v]b10[v] );
q21[v__]:=q21[v]=3(2a10[v]b10[v](a30[v]+b21[v]-a12[v]-b03[v])-(a10[v]^2-b10[v]^2)(b30[v]-a21[v]-b12[v]+a03[v]))/(8b10[v])-3(b10[v](a30[v]-b21[v]-a12[v]+b03[v])+a10[v](b30[v]+a21[v]-b12[v]-a03[v]))/(32a10[v]b10[v] );
q12[v__]:=q12[v]=-3(b10[v](b30[v]+a21[v]-b12[v]-a03[v])-a10[v](a30[v]-b21[v]-a12[v]+b03[v]))/(32a10[v]b10[v] );
q03[v__]:=q03[v]=(2a10[v]b10[v](a30[v]+b21[v]-a12[v]-b03[v])-(a10[v]^2-b10[v]^2)(b30[v]-a21[v]-b12[v]+a03[v]))/(8b10[v])+(b10[v](a30[v]-b21[v]-a12[v]+b03[v])+a10[v](b30[v]+a21[v]-b12[v]-a03[v]))/(32a10[v]b10[v] );

Clear[p50,p41,p32,p23,p14,p05,q50,q41,q32,q23,q14,q05];
p50[v__]:=p50[v]=p21[v]*q30[v];
p41[v__]:=p41[v]=p21[v]*q21[v]+2p12[v]*q30[v];
p32[v__]:=p32[v]=p21[v]*q12[v]+2p12[v]*q21[v]+3p03[v]*q30[v];
p23[v__]:=p23[v]=p21[v]*q03[v]+2p12[v]*q12[v]+3p03[v]*q21[v];
p14[v__]:=p14[v]=2p12[v]*q03[v]+3p03[v]*q12[v];
p05[v__]:=p05[v]=3p03[v]*q03[v];q50[v__]:=q50[v]=q21[v]*q30[v];
q41[v__]:=q41[v]=q21[v]*q21[v]+2q12[v]*q30[v];
q32[v__]:=q32[v]=q21[v]*q12[v]+2q12[v]*q21[v]+3q03[v]*q30[v];
q23[v__]:=q23[v]=q21[v]*q03[v]+2q12[v]*q12[v]+3q03[v]*q21[v];
q14[v__]:=q14[v]=2q12[v]*q03[v]+3q03[v]*q12[v];
q05[v__]:=q05[v]=3q03[v]*q03[v];

3. Taylor expansion of the billiard map in terms of new coordinate system (X,Y): (X,Y)->((Subscript[X, 1]),(Subscript[Y, 1]))=(∑(Subscript[A, jk])(X^j)(Y^k),∑(Subscript[B, jk])(X^j)(Y^k))

Clear[aa30,aa21,aa12,aa03,bb30,bb21,bb12,bb03];
aa30[v__]:=aa30[v]=a30[v]+((b10[v])^3) p03[v]+a10[v] ((b10[v])^2) p12[v]+((a10[v])^2) b10[v]* p21[v]+((a10[v])^3) p30[v]-(a10[v]* p30[v]+a01[v]* q30[v]);
aa21[v__]:=aa21[v]=a21[v]+b01[v] (3 ((b10[v])^2) p03[v]+2 a10[v]* b10[v]* p12[v]+((a10[v])^2) p21[v])+a01[v] (((b10[v])^2) p12[v]+2 a10[v]* b10[v]* p21[v]+3 ((a10[v])^2) p30[v])-(a10[v]* p21[v]+a01[v]* q21[v]);aa12[v__]:=aa12[v]=a12[v]+((b01[v])^2) (3 b10[v]* p03[v]+a10[v]* p12[v])+2 a01[v]* b01[v] (b10[v]* p12[v]+a10[v]* p21[v])+((a01[v])^2) (b10[v]* p21[v]+3 a10[v]* p30[v])-(a10[v]* p12[v]+a01[v]* q12[v]);aa03[v__]:=aa03[v]=a03[v]+((b01[v])^3) p03[v]+a01[v] ((b01[v])^2) p12[v]+((a01[v])^2) b01[v]* p21[v]+((a01[v])^3) p30[v]-(a10[v]* p03[v]+a01[v]* q03[v]);
bb30[v__]:=bb30[v]=b30[v]+((b10[v])^3) q03[v]+a10[v] ((b10[v])^2) q12[v]+((a10[v])^2) b10[v]* q21[v]+((a10[v])^3) q30[v]-(b10[v]* p30[v]+b01[v]* q30[v]);
bb21[v__]:=bb21[v]=b21[v]+b01[v] (3 ((b10[v])^2) q03[v]+2 a10[v]* b10[v]* q12[v]+((a10[v])^2) q21[v])+a01[v] (((b10[v])^2) q12[v]+2 a10[v]* b10[v]* q21[v]+3 ((a10[v])^2) q30[v])-(b10[v]* p21[v]+b01[v]* q21[v]);bb12[v__]:=bb12[v]=b12[v]+((b01[v])^2) (3 b10[v]* q03[v]+a10[v]* q12[v])+2 a01[v]* b01[v] (b10[v]* q12[v]+a10[v]* q21[v])+((a01[v])^2) (b10[v]* q21[v]+3 a10[v]* q30[v])-(b10[v]* p12[v]+b01[v]* q12[v]);bb03[v__]:=bb03[v]=b03[v]+((b01[v])^3) q03[v]+a01[v] ((b01[v])^2) q12[v]+((a01[v])^2) b01[v]* q21[v]+((a01[v])^3) q30[v]-(b10[v]* p03[v]+b01[v]* q03[v]);

Clear[aa50,aa41,aa32,aa23,aa14,aa05];
aa50[v__]:=aa50[v]=a50[v]+3 ((b10[v])^2) b30[v] p03[v]+((b10[v])^5) p05[v]+(a30[v] ((b10[v])^2)+2 a10[v] b10[v] b30[v]) p12[v]+a10[v] ((b10[v])^4) p14[v]+(2 a10[v] a30[v] b10[v]+((a10[v])^2) b30[v]) p21[v]+((a10[v])^2) ((b10[v])^3) p23[v]+3 ((a10[v])^2) a30[v] p30[v]+((a10[v])^3) ((b10[v])^2) p32[v]+((a10[v])^4) b10[v] p41[v]+((a10[v])^5) p50[v]-(3 aa30[v] p30[v]+a10[v] p50[v]+aa21[v] q30[v]+a01[v] q50[v]);
aa41[v__]:=aa41[v]=a41[v]+((b10[v])^4) (5 b01[v] p05[v]+a01[v] p14[v])+2 a10[v] ((b10[v])^3) (2 b01[v] p14[v]+a01[v] p23[v])+((b10[v])^2) (3 b21[v] p03[v]+a21[v] p12[v]+3 ((a10[v])^2) (b01[v] p23[v]+a01[v] p32[v]))+2 b10[v] (a10[v] b21[v] p12[v]+a01[v] b30[v] p12[v]+a10[v] a21[v] p21[v]+a01[v] a30[v] p21[v]+b01[v] (3 b30[v] p03[v]+a30[v] p12[v]+((a10[v])^3) p32[v])+2 a01[v] ((a10[v])^3) p41[v])+a10[v] (a10[v] b21[v] p21[v]+2 a01[v] b30[v] p21[v]+3 a10[v] a21[v] p30[v]+6 a01[v] a30[v] p30[v]+b01[v] (2 b30[v] p12[v]+2 a30[v] p21[v]+((a10[v])^3) p41[v])+5 a01[v] ((a10[v])^3) p50[v])-(3 aa30[v] p21[v]+2 aa21[v] p30[v]+a10[v] p41[v]+aa21[v] q21[v]+2 aa12[v] q30[v]+a01[v] q41[v]);
aa32[v__]:=aa32[v]=a32[v]+3 ((b01[v])^2) b30[v] p03[v]+a30[v] ((b01[v])^2) p12[v]+2 a10[v] b01[v] b21[v] p12[v]+2 a01[v] b01[v] b30[v] p12[v]+2 a10[v] a21[v] b01[v] p21[v]+2 a01[v] a30[v] b01[v] p21[v]+((a10[v])^2) b12[v] p21[v]+2 a01[v] a10[v] b21[v] p21[v]+((a01[v])^2) b30[v] p21[v]+((b10[v])^3) (10 ((b01[v])^2) p05[v]+4 a01[v] b01[v] p14[v]+((a01[v])^2) p23[v])+3 ((a10[v])^2) a12[v] p30[v]+6 a01[v] a10[v] a21[v] p30[v]+3 ((a01[v])^2) a30[v] p30[v]+((a10[v])^3) ((b01[v])^2) p32[v]+((b10[v])^2) (3 b12[v] p03[v]+a12[v] p12[v]+6 a10[v] ((b01[v])^2) p14[v]+6 a01[v] a10[v] b01[v] p23[v]+3 ((a01[v])^2) a10[v] p32[v])+4 a01[v] ((a10[v])^3) b01[v] p41[v]+b10[v] (3 ((a10[v])^2) ((b01[v])^2) p23[v]+2 b01[v] (3 b21[v] p03[v]+a21[v] p12[v]+3 a01[v] ((a10[v])^2) p32[v])+2 (a10[v] b12[v] p12[v]+a01[v] b21[v] p12[v]+a10[v] a12[v] p21[v]+a01[v] a21[v] p21[v]+3 ((a01[v])^2) ((a10[v])^2) p41[v]))+10 ((a01[v])^2) ((a10[v])^3) p50[v]-(3 aa30[v] p12[v]+2 aa21[v] p21[v]+aa12[v] p30[v]+a10[v] p32[v]+aa21[v] q12[v]+2 aa12[v] q21[v]+3 aa03[v] q30[v]+a01[v] q32[v]);
aa23[v__]:=aa23[v]=a23[v]+6 b01[v] b10[v] b12[v] p03[v]+3 ((b01[v])^2) b21[v] p03[v]+10 ((b01[v])^3) ((b10[v])^2) p05[v]+a21[v] ((b01[v])^2) p12[v]+2 a12[v] b01[v] b10[v] p12[v]+a03[v] ((b10[v])^2) p12[v]+2 a10[v] b01[v] b12[v] p12[v]+2 a01[v] b10[v] b12[v] p12[v]+2 a01[v] b01[v] b21[v] p12[v]+4 a10[v] ((b01[v])^3) b10[v] p14[v]+6 a01[v] ((b01[v])^2) ((b10[v])^2) p14[v]+2 a10[v] a12[v] b01[v] p21[v]+2 a01[v] a21[v] b01[v] p21[v]+2 a03[v] a10[v] b10[v] p21[v]+2 a01[v] a12[v] b10[v] p21[v]+2 a01[v] a10[v] b12[v] p21[v]+((a01[v])^2) b21[v] p21[v]+b03[v] (3 ((b10[v])^2) p03[v]+2 a10[v] b10[v] p12[v]+((a10[v])^2) p21[v])+((a10[v])^2) ((b01[v])^3) p23[v]+6 a01[v] a10[v] ((b01[v])^2) b10[v] p23[v]+3 ((a01[v])^2) b01[v] ((b10[v])^2) p23[v]+3 a03[v] ((a10[v])^2) p30[v]+6 a01[v] a10[v] a12[v] p30[v]+3 ((a01[v])^2) a21[v] p30[v]+3 a01[v] ((a10[v])^2) ((b01[v])^2) p32[v]+6 ((a01[v])^2) a10[v] b01[v] b10[v] p32[v]+((a01[v])^3) ((b10[v])^2) p32[v]+6 ((a01[v])^2) ((a10[v])^2) b01[v] p41[v]+4 ((a01[v])^3) a10[v] b10[v] p41[v]+10 ((a01[v])^3) ((a10[v])^2) p50[v]-(3 aa30[v] p03[v]+2 aa21[v] p12[v]+aa12[v] p21[v]+a10[v] p23[v]+aa21[v] q03[v]+2 aa12[v] q12[v]+3 aa03[v] q21[v]+a01[v] q23[v]);
aa14[v__]:=aa14[v]=a14[v]+((b01[v])^4) (5 b10[v] p05[v]+a10[v] p14[v])+2 a01[v] ((b01[v])^3) (2 b10[v] p14[v]+a10[v] p23[v])+((b01[v])^2) (3 b12[v] p03[v]+a12[v] p12[v]+3 ((a01[v])^2) (b10[v] p23[v]+a10[v] p32[v]))+2 b01[v] (3 b03[v] b10[v] p03[v]+a10[v] b03[v] p12[v]+a03[v] b10[v] p12[v]+a01[v] b12[v] p12[v]+a03[v] a10[v] p21[v]+a01[v] a12[v] p21[v]+((a01[v])^3) b10[v] p32[v]+2 ((a01[v])^3) a10[v] p41[v])+a01[v] (2 a03[v] b10[v] p21[v]+a01[v] b12[v] p21[v]+2 b03[v] (b10[v] p12[v]+a10[v] p21[v])+6 a03[v] a10[v] p30[v]+3 a01[v] a12[v] p30[v]+((a01[v])^3) b10[v] p41[v]+5 ((a01[v])^3) a10[v] p50[v])-(2 aa21[v] p03[v]+aa12[v] p12[v]+a10[v] p14[v]+2 aa12[v] q03[v]+3 aa03[v] q12[v]+a01[v] q14[v]);
aa05[v__]:=aa05[v]=a05[v]+((b01[v])^5) p05[v]+a01[v] ((b01[v])^4) p14[v]+((a01[v])^2) ((b01[v])^3) p23[v]+((b01[v])^2) (3 b03[v] p03[v]+a03[v] p12[v]+((a01[v])^3) p32[v])+a01[v] b01[v] (2 b03[v] p12[v]+2 a03[v] p21[v]+((a01[v])^3) p41[v])+((a01[v])^2) (b03[v] p21[v]+3 a03[v] p30[v]+((a01[v])^3) p50[v])-(aa12[v] p03[v]+a10[v] p05[v]+3 aa03[v] q03[v]+a01[v] q05[v]);

Clear[bb50,bb41,bb32,bb23,bb14,bb05];
bb50[v__]:=bb50[v]=b50[v]+3 ((b10[v])^2) b30[v] q03[v]+((b10[v])^5) q05[v]+(a30[v] ((b10[v])^2)+2 a10[v] b10[v] b30[v]) q12[v]+a10[v] ((b10[v])^4) q14[v]+(2 a10[v] a30[v] b10[v]+((a10[v])^2) b30[v]) q21[v]+((a10[v])^2) ((b10[v])^3) q23[v]+3 ((a10[v])^2) a30[v] q30[v]+((a10[v])^3) ((b10[v])^2) q32[v]+((a10[v])^4) b10[v] q41[v]+((a10[v])^5) q50[v]-(3 bb30[v] p30[v]+b10[v] p50[v]+bb21[v] q30[v]+b01[v] q50[v]);
bb41[v__]:=bb41[v]=b41[v]+((b10[v])^4) (5 b01[v] q05[v]+a01[v] q14[v])+2 a10[v] ((b10[v])^3) (2 b01[v] q14[v]+a01[v] q23[v])+((b10[v])^2) (3 b21[v] q03[v]+a21[v] q12[v]+3 ((a10[v])^2) (b01[v] q23[v]+a01[v] q32[v]))+2 b10[v] (a10[v] b21[v] q12[v]+a01[v] b30[v] q12[v]+a10[v] a21[v] q21[v]+a01[v] a30[v] q21[v]+b01[v] (3 b30[v] q03[v]+a30[v] q12[v]+((a10[v])^3) q32[v])+2 a01[v] ((a10[v])^3) q41[v])+a10[v] (a10[v] b21[v] q21[v]+2 a01[v] b30[v] q21[v]+3 a10[v] a21[v] q30[v]+6 a01[v] a30[v] q30[v]+b01[v] (2 b30[v] q12[v]+2 a30[v] q21[v]+((a10[v])^3) q41[v])+5 a01[v] ((a10[v])^3) q50[v])-(3 bb30[v] p21[v]+2 bb21[v] p30[v]+b10[v] p41[v]+bb21[v] q21[v]+2 bb12[v] q30[v]+b01[v] q41[v]);
bb32[v__]:=bb32[v]=b32[v]+3 ((b01[v])^2) b30[v] q03[v]+a30[v] ((b01[v])^2) q12[v]+2 a10[v] b01[v] b21[v] q12[v]+2 a01[v] b01[v] b30[v] q12[v]+2 a10[v] a21[v] b01[v] q21[v]+2 a01[v] a30[v] b01[v] q21[v]+((a10[v])^2) b12[v] q21[v]+2 a01[v] a10[v] b21[v] q21[v]+((a01[v])^2) b30[v] q21[v]+((b10[v])^3) (10 ((b01[v])^2) q05[v]+4 a01[v] b01[v] q14[v]+((a01[v])^2) q23[v])+3 ((a10[v])^2) a12[v] q30[v]+6 a01[v] a10[v] a21[v] q30[v]+3 ((a01[v])^2) a30[v] q30[v]+((a10[v])^3) ((b01[v])^2) q32[v]+((b10[v])^2) (3 b12[v] q03[v]+a12[v] q12[v]+6 a10[v] ((b01[v])^2) q14[v]+6 a01[v] a10[v] b01[v] q23[v]+3 ((a01[v])^2) a10[v] q32[v])+4 a01[v] ((a10[v])^3) b01[v] q41[v]+b10[v] (3 ((a10[v])^2) ((b01[v])^2) q23[v]+2 b01[v] (3 b21[v] q03[v]+a21[v] q12[v]+3 a01[v] ((a10[v])^2) q32[v])+2 (a10[v] b12[v] q12[v]+a01[v] b21[v] q12[v]+a10[v] a12[v] q21[v]+a01[v] a21[v] q21[v]+3 ((a01[v])^2) ((a10[v])^2) q41[v]))+10 ((a01[v])^2) ((a10[v])^3) q50[v]-(3 bb30[v] p12[v]+2 bb21[v] p21[v]+bb12[v] p30[v]+b10[v] p32[v]+bb21[v] q12[v]+2 bb12[v] q21[v]+3 bb03[v] q30[v]+b01[v] q32[v]);
bb23[v__]:=bb23[v]=b23[v]+6 b01[v] b10[v] b12[v] q03[v]+3 ((b01[v])^2) b21[v] q03[v]+10 ((b01[v])^3) ((b10[v])^2) q05[v]+a21[v] ((b01[v])^2) q12[v]+2 a12[v] b01[v] b10[v] q12[v]+a03[v] ((b10[v])^2) q12[v]+2 a10[v] b01[v] b12[v] q12[v]+2 a01[v] b10[v] b12[v] q12[v]+2 a01[v] b01[v] b21[v] q12[v]+4 a10[v] ((b01[v])^3) b10[v] q14[v]+6 a01[v] ((b01[v])^2) ((b10[v])^2) q14[v]+2 a10[v] a12[v] b01[v] q21[v]+2 a01[v] a21[v] b01[v] q21[v]+2 a03[v] a10[v] b10[v] q21[v]+2 a01[v] a12[v] b10[v] q21[v]+2 a01[v] a10[v] b12[v] q21[v]+((a01[v])^2) b21[v] q21[v]+b03[v] (3 ((b10[v])^2) q03[v]+2 a10[v] b10[v] q12[v]+((a10[v])^2) q21[v])+((a10[v])^2) ((b01[v])^3) q23[v]+6 a01[v] a10[v] ((b01[v])^2) b10[v] q23[v]+3 ((a01[v])^2) b01[v] ((b10[v])^2) q23[v]+3 a03[v] ((a10[v])^2) q30[v]+6 a01[v] a10[v] a12[v] q30[v]+3 ((a01[v])^2) a21[v] q30[v]+3 a01[v] ((a10[v])^2) ((b01[v])^2) q32[v]+6 ((a01[v])^2) a10[v] b01[v] b10[v] q32[v]+((a01[v])^3) ((b10[v])^2) q32[v]+6 ((a01[v])^2) ((a10[v])^2) b01[v] q41[v]+4 ((a01[v])^3) a10[v] b10[v] q41[v]+10 ((a01[v])^3) ((a10[v])^2) q50[v]-(3 bb30[v] p03[v]+2 bb21[v] p12[v]+bb12[v] p21[v]+b10[v] p23[v]+bb21[v] q03[v]+2 bb12[v] q12[v]+3 bb03[v] q21[v]+b01[v] q23[v]);
bb14[v__]:=bb14[v]=b14[v]+((b01[v])^4) (5 b10[v] q05[v]+a10[v] q14[v])+2 a01[v] ((b01[v])^3) (2 b10[v] q14[v]+a10[v] q23[v])+((b01[v])^2) (3 b12[v] q03[v]+a12[v] q12[v]+3 ((a01[v])^2) (b10[v] q23[v]+a10[v] q32[v]))+2 b01[v] (3 b03[v] b10[v] q03[v]+a10[v] b03[v] q12[v]+a03[v] b10[v] q12[v]+a01[v] b12[v] q12[v]+a03[v] a10[v] q21[v]+a01[v] a12[v] q21[v]+((a01[v])^3) b10[v] q32[v]+2 ((a01[v])^3) a10[v] q41[v])+a01[v] (2 a03[v] b10[v] q21[v]+a01[v] b12[v] q21[v]+2 b03[v] (b10[v] q12[v]+a10[v] q21[v])+6 a03[v] a10[v] q30[v]+3 a01[v] a12[v] q30[v]+((a01[v])^3) b10[v] q41[v]+5 ((a01[v])^3) a10[v] q50[v])-(2 bb21[v] p03[v]+bb12[v] p12[v]+b10[v] p14[v]+2 bb12[v] q03[v]+3 bb03[v] q12[v]+b01[v] q14[v]);
bb05[v__]:=bb05[v]=b05[v]+3 ((b01[v])^2) b03[v] q03[v]+((b01[v])^5) q05[v]+(a03[v] ((b01[v])^2)+2 a01[v] b01[v] b03[v]) q12[v]+a01[v] ((b01[v])^4) q14[v]+(2 a01[v] a03[v] b01[v]+((a01[v])^2) b03[v]) q21[v]+((a01[v])^2) ((b01[v])^3) q23[v]+3 ((a01[v])^2) a03[v] q30[v]+((a01[v])^3) ((b01[v])^2) q32[v]+((a01[v])^4) b01[v] q41[v]+((a01[v])^5) q50[v]-(bb12[v] p03[v]+b10[v] p05[v]+3 bb03[v] q03[v]+b01[v] q05[v]);

4. Twist Coefficients (Subscript[τ, 1]) and (Subscript[τ, 2])

Clear[twist1,twist2];
twist1[v__]:=twist1[v]=(a10[v](3b30[v]-a21[v]+b12[v]-3a03[v])-b10[v](3a30[v]+b21[v]+a12[v]+3b03[v]))/8;
twist2[v__]:=twist2[v]=(a10[v](-2aa41[v]-2aa23[v]-10aa05[v]+10bb50[v]+2bb32[v]+2bb14[v])-b10[v](10aa50[v]+2aa32[v]+2aa14[v]+2bb41[v]+2bb23[v]+10bb05[v]))/32;

Simplified formulas

Clear[tau1,denomi0,denomi2,denomi22,denomi4,numera0,numeraQ,numeraP,numeraS,numeraT,tau2];
tau1[L_,R_,R2_,S_,S2_]:=((R+S)/(8R S))-(L/(8(R+S-L)))(((S-L)/(R-L))R2+((R-L)/(S-L))S2);
denomi0[L_,R_,S_]:=(512R^2S^2 Sqrt[L(R-L)(S-L)(R+S-L)](2(R-L)(S-L)-R *S));
denomi22[L_,R_,S_]:=1536Sqrt[L(R-L)(S-L)(R+S-L)](R-L)^2(S-L)^2(2(R-L)(S-L)-R S)(R+S-L)^2;
denomi2[L_,R_,S_]:=768Sqrt[L(R-L)(S-L)(R+S-L)]R S(R-L)(S-L)(R+S-L)(2(R-L)(S-L)-R S);
denomi4[L_,R_,S_]:=192Sqrt[L(R-L)(S-L)(R+S-L)](R-L)(R+S-L);
numera0[L_,R_,S_]:=3(7R^2S^2(R+S)^2-16R S(R+S)^3L-8R^2S^2(R+S)L+8(R+S)^4L^2 +16R S(R+S)^2L^2-16(R+S)^3L^3+16R S(R+S)L^3+8(R^2+S^2)L^4);
numeraP[L_,R_,S_]:=L^2(S-L)^4 (48 R^3 (S-2L)+24 L^2(S-L)^2-72 L R (2L^2-3 L S+S^2)+R^2 (216L^2-216 S L+31 S^2));
numeraQ[L_,R_,S_]:=-2R*S L^2(L-R)^2(L-S)^2(32L^2-32(R+S)L+17R*S);
numeraS[L_,R_,S_]:=L(S-L)^2 (40 (S-L)^2L^2+3 R^3 (9 S-16L)-80 R (2L^2-3 L S+S^2)L+3 R^2 (56L^2-56L  S+9 S^2));
numeraT[L_,R_,S_]:=(L^2) R (((L-S))^2);
tau2[L_,R_,R2_,R4_,S_,S2_,S4_]:=numera0[L,R,S]/denomi0[L,R,S]+(numeraP[L,R,S]R2^2+numeraP[L,S,R]S2^2+numeraQ[L,R,S]R2*S2)/denomi22[L,R,S]-(numeraS[L,R,S]S R2+numeraS[L,S,R]R S2)/denomi2[L,R,S]-(numeraT[L,R,S]*R4/denomi4[L,R,S]+numeraT[L,S,R]*S4/denomi4[L,S,R]);

(Subscript[τ, 2]) when R=S

Simplify[numera0[L,R,R]/denomi0[L,R,R]] (*constant term*)

Simplify[(numeraS[L,R,R]R )/denomi2[L,R,R]](* R2+S2*)

Simplify[(numeraP[L,R,R])/denomi22[L,R,R]](* (R2^2)+(S2^2)*)

Simplify[(numeraQ[L,R,R])/denomi22[L,R,R]](* R2*S2 *)

Simplify[numeraT[L,R,R]/denomi4[L,R,R]] (* R4 + S4*)

Clear[tau2RR];
tau2RR[L_,R_,R2_,R4_,S2_,S4_]:=(1/(Sqrt[L (2 R-L) (((L-R))^2)]))(((3 (2 (L^2)-8 L R+7 (R^2)))/(128  (R^2)))-((L (10 (L^2)-40 L R+27 (R^2))(R2+S2))/(384 (2R-L) R))+((L^2) (24 (L^4)-192 (L^3) R+456 (L^2) (R^2)-384 L (R^3)+79 (R^4))((R2^2)+(S2^2))-2(L^2) (R^2) (32 (L^2)-64 L R+17 (R^2))R2 S2)/(1536 (((L-2 R))^2)  (2 (L^2)-4 L R+(R^2)))-(((L^2) (R-L) R(R4+S4))/(192 (2R-L ))));

Integrability test: locally analytically integrable iff convergent Birkhoff Normal form. At (λ^4)=1: it is necessary to have (Subscript[c, 03])=0

Clear[laiTest];
laiTest[v__]:=laiTest[v]=a30[v]+I b30[v]+I a21[v]−b21[v]−a12[v]−I b12[v]−I a03[v]+b03[v]; (*see the definition of c03*)

Simplify[laiTest[{L,R,R2,R4,S,S2,S4}],R>L&&S>L&&L>0]

Simplify[laiTest[{L,R,0,0,S,0,0}],L>0&&S>L&&R>L] (*asymmetric lemon*)

Simplify[(((-2 (L^(7/2))+4 (L^(5/2)) (R+S)+2 (Sqrt[L]) R S (R+S)+2 I (L^2) (Sqrt[(-L+R) (-L+S) (-L+R+S)])+I R S (Sqrt[(-L+R) (-L+S) (-L+R+S)])-2 I L (R+S) (Sqrt[(-L+R) (-L+S) (-L+R+S)])-2 (L^(3/2)) ((R^2)+3 R S+(S^2))) (8 (L^4)+9 (R^2) S (R+S)-16 (L^3) (2 R+S)+8 (L^2) (6 (R^2)+6 R S+(S^2))-8 L R (3 (R^2)+6 R S+2 (S^2))))/(3 (R^4) (S^3) (Sqrt[(-L+R) (-L+S) (-L+R+S)])))/.L->((R+S-((((R^2)+(S^2)))^(1/2)))/2),R>0&&S>0] (*one case of resonance (λ^4)=1 for asymmetric lemon*)

Simplify[(((-2 (L^(7/2))+4 (L^(5/2)) (R+S)+2 (Sqrt[L]) R S (R+S)+2 I (L^2) (Sqrt[(-L+R) (-L+S) (-L+R+S)])+I R S (Sqrt[(-L+R) (-L+S) (-L+R+S)])-2 I L (R+S) (Sqrt[(-L+R) (-L+S) (-L+R+S)])-2 (L^(3/2)) ((R^2)+3 R S+(S^2))) (8 (L^4)+9 (R^2) S (R+S)-16 (L^3) (2 R+S)+8 (L^2) (6 (R^2)+6 R S+(S^2))-8 L R (3 (R^2)+6 R S+2 (S^2))))/(3 (R^4) (S^3) (Sqrt[(-L+R) (-L+S) (-L+R+S)])))/.L->((R+S+((((R^2)+(S^2)))^(1/2)))/2),R>0&&S>0] (*the other case of resonance (λ^4)=1 for asymmetric lemon*)