This is a modification of the computations for pages 172-176 in order to find relative invariants of weight s for the differential equations 
             y''y + b[0] y'y' + b[1] y'y + b[2] yy = 0.
The main conclusions are at the very end of this notebook.

The version number of Mathematica used to evaluate this notebook:

$VersionNumber

To obtain the coefficients given by (30.3)--(30.5), we proceed as follows.

y[z]  =  rho[z]*v[z]

\(OneStarQ\  = \ 
      Expand[\ \ 
        \((1/rho[z])\)^2*
			\ \ \ \ \ 
          \((D[y[z], {z, 2}]*D[y[z], {z, 0}]
			 + \ 
              \(b[0]\)[z]*D[y[z], {z, 1}]*D[y[z], {z, 1}]
			 + \ \ 
              \(b[1]\)[z]*D[y[z], {z, 1}]*D[y[z], {z, 0}]
			 + \ 
              \(b[2]\)[z]*D[y[z], {z, 0}]*D[y[z], {z, 0}]\ )\)\ ]\)

leadingStarCoefficient  =  
      Coefficient[OneStarQ,  D[v[z], {z, 2}]*D[v[z], {z, 0}] ]

bOneStar[0][z_]  =   
      Coefficient[OneStarQ,  D[v[z], {z, 1}]*D[v[z], {z, 1}] ]

bOneStar[1][z_]  =   
      Coefficient[OneStarQ,  D[v[z], {z, 1}]*D[v[z], {z, 0}] ]

bOneStar[2][z_]  =   
      Coefficient[OneStarQ,  D[v[z], {z, 0}]*D[v[z], {z, 0}] ]

To check that  (Subscript[u, 2]) in (30.20) is a semi-invariant of the first kind

uOneStar[2][z_]  :=  
      (1 + bOneStar[0][z])^2*bOneStar[2][z] + 
        (1/2) bOneStar[0]'[z]*bOneStar[1][z] - 
        (1/2) (1 + bOneStar[0][z])*bOneStar[1]'[z] - 
        (1/4) (1 + bOneStar[0][z]) bOneStar[1][z]^2

u[2][z_]  :=  
      (1 +  b[0][z])^2*b[2][z] + 
        (1/2) b[0]'[z]*b[1][z] - 
        (1/2) (1 + b[0][z]) b[1]'[z] - 
        (1/4) (1 + b[0][z]) b[1][z]^2

Expand[ uOneStar[2][z]  -  u[2][z] ]

Next, we obtain the coefficients given by (30.7)--(30.9).

For a change of the independent variable z to a new independent variable zet 
by means z := f[zet], we proceed as follows.   A separate evaluation of

u[zet] := y[ f[zet] ]     and    D[ u[zet], zet]     and    D[ u[zet], {zet,  2}]    yields

y[f[zet]] = u[zet]   and   fun'[zet] y'[fun[zet]]   and   y'[fun[zet]] fun''[zet]+((fun'[zet])^2) y''[fun[zet]] respectively.  We therefore input

y:= u[zet]

y' := (1/D[f[zet],  zet])*D[u[zet],  zet]

y'' :=  
      (1/(D[f[zet],  zet])^2)*
        ( D[u[zet], {zet, 2}]  -  D[f[zet],  {zet,  2}]*y')

\(TwoStarQ\  = \ 
      Expand[\((D[f[zet], \ zet])\)^2*\ 
          \((
			\ \ \ \ \ 
            \(y'\)'*y
			 + \ \(b[0]\)[f[zet]]*y'*y'
			 + \ 
              \(b[1]\)[f[zet]]*y'*y
			 + \ \(b[2]\)[f[zet]]*y*y\ )\)\ \ ]
        \)

leadingTwoStarCoefficient  =  
      Coefficient[ TwoStarQ,  u''[zet]*u[zet] ]

bTwoStar[0][zet_]  =   
      Coefficient[  TwoStarQ,  u'[zet]*u'[zet] ]

bTwoStar[1][zet_]  =    
      Coefficient[  TwoStarQ,  u'[zet]*u[zet] ]

bTwoStar[2][zet_]  =  
      Coefficient[ TwoStarQ,  u[zet]*u[zet] ]

At this point, we modify the technique for pages 172-176.

u[s_,p_,r_]:=Floor[ (1/(p + r))*(s-Sum[(p + k)*e[s, p, k],{k, r + 1, s - p}]-Sum[(i + k)*e[s, i, k],{i, p + 1, 2},{k, Floor[(i - 1) (i - 2)/2], s - i}])]

nM[s_]:=Module[{counter, seq},counter = 0;seq= Apply[Sequence,Reverse[Flatten[Table[{e[s, i, k], 0, u[s, i, k]},{i,0,2},{k, (i - 1) (i - 2)/2, 
                                s - i}],1]]];Do[If[(Sum[(i + k)*e[s, i, k],{i, 0, 2},{k, Floor[(i - 1) (i - 2)/2], 
                                s - i}])==s,(counter = counter + 1;monM[s, counter]=Product[D[x[i][z],{z, k}]^e[s, i, k],{i,0,2},{k, 
                                  Floor[(i - 1) (i - 2)/2], s - i}] ),counter = counter],Evaluate[seq]];counter]

printM[s_]:=Do[ Print["monM[", s, ", ", i, "] = ", monM[s, i]],{i, 1, nM[s]}]

d = 5

xPolynomial[s_]:=Sum[p[s, i, j]*monM[s, i]*x[0][z]^j,{i,1,nM[s]},{j, 0, d}]

xPolynomial[1]

sub[s_]:=Flatten[ Table[D[x[i][z],{z, k}]->D[b[i][z],{z, k}],{i, 0, 2},{k,0,s-i}] ]

bPoly[s_]:=xPolynomial[s] /. sub[s]

bPoly[1]

sub1[s_]:= Flatten[ Table[D[x[i][z],{z, k}]->D[bOneStar[i][z],{z, k}],{i, 0, 2},{k, 0, s - i} ] ]

bOneStarPoly[s_]:=xPolynomial[s] /. sub1[s]

sub2[s_]:=Flatten[ Table[D[x[i][z],{z, k}]->D[bTwoStar[i][zet],{zet, k}],{i,0,2},{k, 0, s - i} ] ]

bTwoStarPoly[s_]:=xPolynomial[s] /. sub2[s]

firstCondition[s_]:=firstCondition[s] = Expand[rho[z]^s*(bOneStarPoly[s] - bPoly[s])];

secondCondition[s_]:=secondCondition[s] = Expand[f'[zet]^s*(bTwoStarPoly[s]-f'[zet]^s*(bPoly[s] /. z -> f[zet]))];

secondCondition[1]

v[s_,p_]:=Floor[(1/p)*(s-Sum[(i + k)*e[s, i, k],{i, 0, 2},{k, (i - 1) (i - 2)/2, s - i}]-Sum[t*h[s, t],{t, p + 1, s}])]

nA[s_]:=Module[{counter, seq1, seq2},counter = 0;seq1=Apply[Sequence,Reverse[Flatten[Table[{e[s, i, k], 0, u[s, i, k]},{i, 0, 2},{k,(i - 1) (i - 2)/2,s - i}],1]]];seq2=Apply[Sequence,Reverse[Table[{h[s, t],0,v[s, t]},{t,1,s}]]];Do[If[(Sum[(i + k)*e[s, i, k],{i,0,2},{k, (i - 1) (i - 2)/2, 
                                  s - i}]+Sum[t*h[s, t],{t, 1, s}])==s,(counter = counter + 1;monA[s, counter]=Product[D[b[i][z],{z, k}]^e[s, i, k],{i,0,2},{k,(i - 1) (i - 2)/2,s - i}]*rho[z]^(s-Sum[h[s, t],{t, 1, s}])*Product[D[rho[z],{z, t}]^h[s, t],{t, 1, s}]),counter = counter],Evaluate[seq1],Evaluate[seq2]];counter]

printA[s_]:=Do[Print["monA[", s, ", ", i, "] = ", monA[s, i]],{i, 1, nA[s]}]

printA[2]

nB[s_]:=Module[{counter, seq1, seq2},counter = 0;seq1=Apply[Sequence,Reverse[Flatten[Table[{e[s, i, k], 0, u[s, i, k]},{i,0,2},{k, (i - 1) (i - 2)/2, 
                                s - i}],1]]];seq2=Apply[Sequence,Reverse[Table[{h[s, t],0,v[s, t]},{t, 1, s}]]];Do[If[(Sum[(i + k)*e[s, i, k],{i,0,2},{k, (i - 1) (i - 2)/2, 
                                  s - i}]+ Sum[t*h[s, t],{t, 1, s}])==s,(counter = counter + 1;monB[s, counter]=Product[(D[b[i][z],{z, k}]/.z -> f[zet] )^e[s, i, k],{i,0,2},{k, (i - 1) (i - 2)/2, 
                                    s - i}]*f'[zet]^(2 s-Sum[(t + 1)*h[s, t],{t, 1, s}])*Product[D[f[zet],{zet, t + 1}]^h[s, t],{t, 1, s}]),counter = counter],Evaluate[seq1],Evaluate[seq2]];counter]

printB[s_]:=Do[ Print["monB[", s, ", ", i, "] = ", monB[s, i]],{i, 1, nB[s]}]

printB[1]

firstCoefficients[s_]:=(  Do[q[s, i, j]=Coefficient[ Coefficient[firstCondition[s], monA[s, i] ], 
                      b[0][z]^j ] ,{i, 1, nA[s]},{j, 1, s + d}]; Do[q[s, i, 0]=Coefficient[ Coefficient[firstCondition[s], monA[s, i] ], 
                      b[0][z], 0 ] ,{i, 1, nA[s]} ] )

\(printFirstCoefficients[s_]\  := \ 
      Do[\ Print[\ "q[", \ s, ", ", \ i, ", ", \ j, \ "] = ", 
          
			q[s, i, j]\ ], \ {i, 1, nA[s]}, \ {j, 0, s + d}]\)

q[2, 1, 2]

d = 5

firstCoefficients[2]

firstZeroCheck[s_]:=Expand[firstCondition[s]-Sum[q[s, i, j]*monA[s, i]*b[0][z]^j,{i, 1, nA[s]},{j, 0, s + d}]]

firstZeroCheck[2]

secondCoefficients[s_]:= ( Do[ \(r[s, i, j] = 
			
                  Coefficient[\ \ 
                    Coefficient[secondCondition[s], monB[s, i]\ ], 
                    \(b[0]\)[f[zet]]^j\ ]\),
				{i,1,nB[s]},{j, 1, s + d} ];  Do[ \(r[s, i, 0] = 
			
                  Coefficient[\ \ 
                    Coefficient[secondCondition[s], monB[s, i]\ ], 
                    \(b[0]\)[f[zet]], 0\ ]\),
				{i,1,nB[s]} ] )

\(printSecondCoefficients[s_]\  := \ 
      Do[\ Print[\ "r[", \ s, ", ", \ i, ", ", \ j, \ "] = ", 
          
			r[s, i, j]\ ], \ {i, 1, nB[s]}, \ {j, 0, s + d}]\)

secondZeroCheck[s_]:=Expand[secondCondition[s]-Sum[ r[s, i, j]*monB[s, i]*b[0][f[zet]]^j,{i,1,nB[s]},{j, 0, s + d}]]

secondCoefficients[2]

secondZeroCheck[2]

eqs[s_]:=Join[ Flatten[ Table[q[s, i, j] == 0,{i, 1, nA[s]},{j, 0, s + d}] ],Flatten[ Table[r[s, i, j] == 0,{i,1,nB[s]},{j, 0, s + d}] ] ]

rules[s_]:=Flatten[Solve[eqs[s],Flatten[ Table[p[s, i, j],{i, 1, nM[s]},{j, 0, 5}] ] ]]

(*  Print["firstZeroCheck[", s, "] = ", firstZeroCheck[s]];   *)

(* Print["secondZeroCheck[", s, "] = ", secondZeroCheck[s]]; 
         *)

invariants[s_]:=Module[{expr, counter},counter = 0;
		Print["   "];
		Print["   Computation of invariants[", s, "]"]
              ;
		nM[s];Print["Number of Monic Monomials = ", nM[s]];
	nA[s];Print["Number of firstCondition Terms = ", nA[s]];
  nB[s]; Print["Number of secondCondition Terms = ", nB[s]];
		firstCondition[s];  firstCoefficients[s];
		Print["firstZeroCheck[", s, "] = ",  
              firstZeroCheck[s]];
		secondCondition[s]; secondCoefficients[s];
			Print["secondZeroCheck[", s, "] = ", 
              secondZeroCheck[s] ]; 
		eqs[s];    rules[s]; 
		expr=Expand[(Sum[ p[s, i, j]*monM[s, i]*x[0][z]^j,{i, 1, nM[s]},{j, 0, d}])/.rules[s]];Do[ If[Length[Coefficient[expr, p[s, i, j]]] != 0, 
                    (counter = counter + 1; 
                      Inv[s, counter] = Coefficient[expr, p[s, i, j]]; 
                      Print["Inv[", s, ", ", counter, "] = ", 
                        Inv[s, counter]] ),  counter = counter],{i, 1, nM[s]},{j, 0, d}]; n[s] = counter; Print["n[", s, "] = ",  n[s] ]   ]

Date[]

Do[( invariants[s];  Print[Date[]]),  {s, 1, 6}]

To check that the preceding are relative invariants.

We introduce

rule0  =  
      Flatten[ Table[ 
          D[x[i][z], {z, j}] -> D[b[i][z], {z, j}], {i, 0, 2}, {j, 0, 
            6}] ]

rule1  =   
      Flatten[ Table[ 
          D[x[i][z], {z, j}] -> D[bOneStar[i][z], {z, j}], {i, 0, 
            2}, {j, 0, 6}] ];

rule2  =   
      Flatten[ Table[ 
          D[x[i][z], {z, j}] -> D[bTwoStar[i][zet], {zet, j}], {i, 0, 
            2}, {j, 0, 6}] ];

and obtain

Expand[(Inv[4, 7] /. rule1) - (Inv[4, 7] /. rule0)]

Expand[
      (Inv[4, 7] /. rule2) - 
        ((Inv[4, 7] /. rule0) /. z -> f[zet])*f'[zet]^4]

Expand[ 
      (Inv[4, 8]  /.  rule1)  -  (Inv[4, 8]  /.  rule0) ]

Expand[ 
      (Inv[4, 8]  /.  rule2)  -  
        ((Inv[4, 8]  /.  rule0) /.  z -> f[zet])*f'[zet]^4 ]

Expand[ 
      (Inv[4, 9]  /.  rule1)  -  (Inv[4, 9]  /.  rule0) ]

Expand[ 
      (Inv[4, 9]  /.  rule2)  -  
        ((Inv[4, 9]  /.  rule0) /.  z -> f[zet])*f'[zet]^4 ]

Expand[ 
      (Inv[4, 10]  /.  rule1)  -  (Inv[4, 10]  /.  rule0) ]

Expand[ 
      (Inv[4, 10]  /.  rule2)  -  
        ((Inv[4, 10]  /.  rule0) /.  z -> f[zet])*f'[zet]^4 ]

Expand[ 
      (Inv[5, 7]  /.  rule1)  -  (Inv[5, 7]  /.  rule0) ]

Expand[ 
      (Inv[5, 7]  /.  rule2)  -  
        ((Inv[5, 7]  /.  rule0) /.  z -> f[zet])*f'[zet]^5 ]

Expand[ 
      (Inv[5, 8]  /.  rule1)  -  (Inv[5, 8]  /.  rule0) ]

Expand[ 
      (Inv[5, 8]  /.  rule2)  -  
        ((Inv[5, 8]  /.  rule0) /.  z -> f[zet])*f'[zet]^5 ]

Expand[ 
      (Inv[5, 9]  /.  rule1)  -  (Inv[5, 9]  /.  rule0) ]

Expand[ 
      (Inv[5, 9]  /.  rule2)  -  
        ((Inv[5, 9]  /.  rule0) /.  z -> f[zet])*f'[zet]^5 ]

Expand[ 
      (Inv[5, 10]  /.  rule1)  -  (Inv[5, 10]  /.  rule0) ]

Expand[ 
      (Inv[5, 10]  /.  rule2)  -  
        ((Inv[5, 10]  /.  rule0) /.  z -> f[zet])*f'[zet]^5 ]

Expand[ 
      (Inv[6, 7]  /.  rule1)  -  (Inv[6, 7]  /.  rule0) ]

Expand[ 
      (Inv[6, 7]  /.  rule2)  -  
        ((Inv[6, 7]  /.  rule0) /.  z -> f[zet])*f'[zet]^6 ]

Expand[ 
      (Inv[6, 8]  /.  rule1)  -  (Inv[6, 8]  /.  rule0) ]

Expand[ 
      (Inv[6, 8]  /.  rule2)  -  
        ((Inv[6, 8]  /.  rule0) /.  z -> f[zet])*f'[zet]^6 ]

Expand[ 
      (Inv[6, 9]  /.  rule1)  -  (Inv[6, 9]  /.  rule0) ]

Expand[ 
      (Inv[6, 9]  /.  rule2)  -  
        ((Inv[6, 9]  /.  rule0) /.  z -> f[zet])*f'[zet]^6 ]

Expand[ 
      (Inv[6, 10]  /.  rule1)  -  (Inv[6, 10]  /.  rule0) ]

Expand[ 
      (Inv[6, 10]  /.  rule2)  -  
        ((Inv[6, 10]  /.  rule0) /.  z -> f[zet])*f'[zet]^6 ]

Expand[ 
      (Inv[6, 11]  /.  rule1)  -  (Inv[6, 11]  /.  rule0) ]

Expand[ 
      (Inv[6, 11]  /.  rule2)  -  
        ((Inv[6, 11]  /.  rule0) /.  z -> f[zet])*f'[zet]^6 ]

Expand[ 
      (Inv[6, 12]  /.  rule1)  -  (Inv[6, 12]  /.  rule0) ]

Expand[ 
      (Inv[6, 12]  /.  rule2)  -  
        ((Inv[6, 12]  /.  rule0) /.  z -> f[zet])*f'[zet]^6 ]

Expand[ 
      (Inv[6, 13]  /.  rule1)  -  (Inv[6, 13]  /.  rule0) ]

Expand[ 
      (Inv[6, 13]  /.  rule2)  -  
        ((Inv[6, 13]  /.  rule0) /.  z -> f[zet])*f'[zet]^6 ]

Expand[ 
      (Inv[6, 14]  /.  rule1)  -  (Inv[6, 14]  /.  rule0) ]

Expand[ 
      (Inv[6, 14]  /.  rule2)  -  
        ((Inv[6, 14]  /.  rule0) /.  z -> f[zet])*f'[zet]^6 ]

Expand[ 
      (Inv[6, 15]  /.  rule1)  -  (Inv[6, 15]  /.  rule0) ]

Expand[ 
      (Inv[6, 15]  /.  rule2)  -  
        ((Inv[6, 15]  /.  rule0) /.  z -> f[zet])*f'[zet]^6 ]

Expand[ 
      (Inv[6, 16]  /.  rule1)  -  (Inv[6, 16]  /.  rule0) ]

Expand[ 
      (Inv[6, 16]  /.  rule2)  -  
        ((Inv[6, 16]  /.  rule0) /.  z -> f[zet])*f'[zet]^6 ]

Expand[ 
      (Inv[6, 17]  /.  rule1)  -  (Inv[6, 17]  /.  rule0) ]

Expand[ 
      (Inv[6, 17]  /.  rule2)  -  
        ((Inv[6, 17]  /.  rule0) /.  z -> f[zet])*f'[zet]^6 ]

The Relative Invariants  (Subscript[I, 4]) ,  (Subscript[I, 6]) ,  and  (Subscript[(J ), 6])  (30.18), (30.19), and (30.24)

I4  =  Factor[ - 4*Inv[4, 7] ]

I6  =  Factor[ -4*Inv[6, 11] ]

J6  =  Factor[ -2*Inv[6, 15] ]

For the right member of (30.21), we introduce

xxxx[2][z_]  =  
      (u2[z]  -  (1/2)*x[0]'[z]*x[1][z] + 
            (1/2) (1 + x[0][z])*x[1]'[z] + 
            (1/4)*(1 + x[0][z]) x[1][z]^2)/
        (1  +  x[0][z])^2

To obtain (30.26), we have

I4  /.   x[2][z] -> xxxx[2][z]   // Together

To obtain (30.27), we have

A1  =   
      ( I6  /.   x[2]'[z] -> xxxx[2]'[z] )  // Together ;

and

A2  =   
      ( A1  /.   x[2][z] -> xxxx[2][z] )  // Together

The preceding is the right member of (30.27).

To obtain the right member of (30.25), we have

B1  =   
      (  (1  +  x[0][z])* J6  /.   
            x[2]''[z] -> xxxx[2]''[z] )  // Together;

B2  =   
      (  B1  /.   x[2]'[z] -> xxxx[2]'[z] )  // Together;

B3  =   
      (  B2  /.   x[2][z] -> xxxx[2][z] )  // Together

The preceding is the right member of (30.25).

To check that it  does not have a common factor, we include the following

Factor[ B3]