
function superN1

clear all
clc

syms  a1 b1 c1 d1 e1 f1 g1 h1  a2 b2 c2 d2 e2 f2 g2 h2 x         
syms  a3 b3 c3 d3 e3 f3 g3 h3  a4 b4 c4 d4 e4 f4 g4 h4
syms  a5 b5 c5 d5 e5 f5 g5 h5  a6 b6 c6 d6 e6 f6 g6 h6


B=(2*x-1)*3^(1/2);
L2 =(6*x^2-6*x+1)*5^(1/2);

%------------------------
C1=poly2sym([a1,b1],x);
C2=poly2sym([c1,d1],x);
C3=poly2sym([e1,f1],x);
C4=poly2sym([g1,h1],x);

normaC=simplify(int(C1*C1,x,0,1/4)+int(C2*C2,x,1/4,1/2)+int(C3*C3,x,1/2,3/4)+int(C4*C4,x,3/4,1)) 
ortC1=simplify(int(C1,x,0,1/4)+int(C2,x,1/4,1/2)+int(C3,x,1/2,3/4)+int(C4,x,3/4,1)) 
ortC2=simplify(int(B*C1,x,0,1/4)+int(B*C2,x,1/4,1/2)+int(B*C3,x,1/2,3/4)+int(B*C4,x,3/4,1)) 
ortC3=simplify(int(L2*C1,x,0,1/4)+int(L2*C2,x,1/4,1/2)+int(L2*C3,x,1/2,3/4)+int(L2*C4,x,3/4,1)) 

%------------------------
D1=poly2sym([a2,b2],x);
D2=poly2sym([c2,d2],x);
D3=poly2sym([e2,f2],x);
D4=poly2sym([g2,h2],x);

normaD=simplify(int(D1*D1,x,0,1/4)+int(D2*D2,x,1/4,1/2)+int(D3*D3,x,1/2,3/4)+int(D4*D4,x,3/4,1))
ortD1=simplify(int(D1,x,0,1/4)+int(D2,x,1/4,1/2)+int(D3,x,1/2,3/4)+int(D4,x,3/4,1)) 
ortD2=simplify(int(B*D1,x,0,1/4)+int(B*D2,x,1/4,1/2)+int(B*D3,x,1/2,3/4)+int(B*D4,x,3/4,1))
ortD3=simplify(int(C1*D1,x,0,1/4)+int(C2*D2,x,1/4,1/2)+int(C3*D3,x,1/2,3/4)+int(C4*D4,x,3/4,1))
ortD4=simplify(int(L2*D1,x,0,1/4)+int(L2*D2,x,1/4,1/2)+int(L2*D3,x,1/2,3/4)+int(L2*D4,x,3/4,1))

%------------------------
E1=poly2sym([a3,b3],x);
E2=poly2sym([c3,d3],x);
E3=poly2sym([e3,f3],x);
E4=poly2sym([g3,h3],x);

normaE=simplify(int(E1*E1,x,0,1/4)+int(E2*E2,x,1/4,1/2)+int(E3*E3,x,1/2,3/4)+int(E4*E4,x,3/4,1)) 
ortE1=simplify(int(E1,x,0,1/4)+int(E2,x,1/4,1/2)+int(E3,x,1/2,3/4)+int(E4,x,3/4,1)) 
ortE2=simplify(int(B*E1,x,0,1/4)+int(B*E2,x,1/4,1/2)+int(B*E3,x,1/2,3/4)+int(B*E4,x,3/4,1))
ortE3=simplify(int(C1*E1,x,0,1/4)+int(C2*E2,x,1/4,1/2)+int(C3*E3,x,1/2,3/4)+int(C4*E4,x,3/4,1))
ortE4=simplify(int(D1*E1,x,0,1/4)+int(D2*E2,x,1/4,1/2)+int(D3*E3,x,1/2,3/4)+int(D4*E4,x,3/4,1))
ortE5=simplify(int(L2*E1,x,0,1/4)+int(L2*E2,x,1/4,1/2)+int(L2*E3,x,1/2,3/4)+int(L2*E4,x,3/4,1))

%------------------------
F1=poly2sym([a4,b4],x);
F2=poly2sym([c4,d4],x);
F3=poly2sym([e4,f4],x);
F4=poly2sym([g4,h4],x);

normaF=simplify(int(F1*F1,x,0,1/4)+int(F2*F2,x,1/4,1/2)+int(F3*F3,x,1/2,3/4)+int(F4*F4,x,3/4,1))
ortF1=simplify(int(F1,x,0,1/4)+int(F2,x,1/4,1/2)+int(F3,x,1/2,3/4)+int(F4,x,3/4,1)) 
ortF2=simplify(int(B*F1,x,0,1/4)+int(B*F2,x,1/4,1/2)+int(B*F3,x,1/2,3/4)+int(B*F4,x,3/4,1))
ortF3=simplify(int(C1*F1,x,0,1/4)+int(C2*F2,x,1/4,1/2)+int(C3*F3,x,1/2,3/4)+int(C4*F4,x,3/4,1))
ortF4=simplify(int(D1*F1,x,0,1/4)+int(D2*F2,x,1/4,1/2)+int(D3*F3,x,1/2,3/4)+int(D4*F4,x,3/4,1))
ortF5=simplify(int(E1*F1,x,0,1/4)+int(E2*F2,x,1/4,1/2)+int(E3*F3,x,1/2,3/4)+int(E4*F4,x,3/4,1))
ortF6=simplify(int(L2*F1,x,0,1/4)+int(L2*F2,x,1/4,1/2)+int(L2*F3,x,1/2,3/4)+int(L2*F4,x,3/4,1))


%------------------------
G1=poly2sym([a5,b5],x);
G2=poly2sym([c5,d5],x);
G3=poly2sym([e5,f5],x);
G4=poly2sym([g5,h5],x);

normaG=simplify(int(G1*G1,x,0,1/4)+int(G2*G2,x,1/4,1/2)+int(G3*G3,x,1/2,3/4)+int(G4*G4,x,3/4,1))
ortG1=simplify(int(G1,x,0,1/4)+int(G2,x,1/4,1/2)+int(G3,x,1/2,3/4)+int(G4,x,3/4,1)) 
ortG2=simplify(int(B*G1,x,0,1/4)+int(B*G2,x,1/4,1/2)+int(B*G3,x,1/2,3/4)+int(B*G4,x,3/4,1))
ortG3=simplify(int(C1*G1,x,0,1/4)+int(C2*G2,x,1/4,1/2)+int(C3*G3,x,1/2,3/4)+int(C4*G4,x,3/4,1))
ortG4=simplify(int(D1*G1,x,0,1/4)+int(D2*G2,x,1/4,1/2)+int(D3*G3,x,1/2,3/4)+int(D4*G4,x,3/4,1))
ortG5=simplify(int(E1*G1,x,0,1/4)+int(E2*G2,x,1/4,1/2)+int(E3*G3,x,1/2,3/4)+int(E4*G4,x,3/4,1))
ortG6=simplify(int(F1*G1,x,0,1/4)+int(F2*G2,x,1/4,1/2)+int(F3*G3,x,1/2,3/4)+int(F4*G4,x,3/4,1))
ortG7=simplify(int(L2*G1,x,0,1/4)+int(L2*G2,x,1/4,1/2)+int(L2*G3,x,1/2,3/4)+int(L2*G4,x,3/4,1))

%------------------------
H1=poly2sym([a6,b6],x);
H2=poly2sym([c6,d6],x);
H3=poly2sym([e6,f6],x);
H4=poly2sym([g6,h6],x);

normaH=simplify(int(H1*H1,x,0,1/4)+int(H2*H2,x,1/4,1/2)+int(H3*H3,x,1/2,3/4)+int(H4*H4,x,3/4,1)) 
ortH1=simplify(int(H1,x,0,1/4)+int(H2,x,1/4,1/2)+int(H3,x,1/2,3/4)+int(H4,x,3/4,1)) 
ortH2=simplify(int(B*H1,x,0,1/4)+int(B*H2,x,1/4,1/2)+int(B*H3,x,1/2,3/4)+int(B*H4,x,3/4,1))
ortH3=simplify(int(C1*H1,x,0,1/4)+int(C2*H2,x,1/4,1/2)+int(C3*H3,x,1/2,3/4)+int(C4*H4,x,3/4,1))
ortH4=simplify(int(D1*H1,x,0,1/4)+int(D2*H2,x,1/4,1/2)+int(D3*H3,x,1/2,3/4)+int(D4*H4,x,3/4,1))
ortH5=simplify(int(E1*H1,x,0,1/4)+int(E2*H2,x,1/4,1/2)+int(E3*H3,x,1/2,3/4)+int(E4*H4,x,3/4,1))
ortH6=simplify(int(F1*H1,x,0,1/4)+int(F2*H2,x,1/4,1/2)+int(F3*H3,x,1/2,3/4)+int(F4*H4,x,3/4,1))
ortH7=simplify(int(G1*H1,x,0,1/4)+int(G2*H2,x,1/4,1/2)+int(G3*H3,x,1/2,3/4)+int(G4*H4,x,3/4,1))


return
