Clear["Global`*"]; Off[General::spell, General::spell1];

Problem 9.18 and 9.20 textbook

Hermite Cubic Polynomials (used as basis functions)

(Subscript[ϕ, 1])  =  
        1  -  3 ((((ξ/h)))^2) +  
          2 ((((ξ/h)))^3);
(Subscript[ϕ, 2]) = ξ (((1  -  (ξ/h)))^2);
(Subscript[ϕ, 3]) =  
        3 ((((ξ/h)))^2) -  
          2 ((((ξ/h)))^3);
(Subscript[ϕ, 4])  =  ξ (((((ξ/h)))^2) -  (ξ/h));
Φ  =  Table[(Subscript[ϕ, k]), {k, 4}];

Element stiffness matrix (Subscript[K, e]) and stability matrix (Subscript[G, e])

Table[
        d2ϕ(Subscript[dx2, i]) = (∂_(ξ, ξ))(Subscript[ϕ, i]), {i, 
          4}];

    Table[
        dϕ(Subscript[dx, i]) = (∂_ξ) (Subscript[ϕ, i]), {i, 
          4}];

(Subscript[K, e]) = 
        Table[(∫_0^h)( 
                  EE II d2ϕ(Subscript[dx2, i]) 
                    d2ϕ(Subscript[dx2, j]) ) \[DifferentialD]ξ , {i, 4}, {j, 
              4}] // Simplify;

(Subscript[G, e]) = 
        Table[(∫_0^h)( 
                  NN dϕ(Subscript[dx, i]) 
                    dϕ(Subscript[dx, j]) ) \[DifferentialD]ξ , {i, 4}, {j, 
              4}] // Simplify;
MatrixForm[(Subscript[G, e])]

k = ((Subscript[K, e])/(2 EE (II/(h^3))));
MatrixForm[k]

Eliminate 1st and 4th equations:

matk  =  
        Take[Take[(Subscript[K, e]), 3, 3], -2, -2];
matg  =  
        Take[Take[(Subscript[G, e]), 3, 3], -2, -2];
MatrixForm[matk]
MatrixForm[matg]

Approximate Buckling load:

Solve[Det[matk - matg] ==  0 ,  NN] // N