Calculation of Stiffness in Structural elements
1. Case 1:
Taking unit displacement u1 = 1
Translation of 2 columns = 2 x `(12EI)/h^3`
Beam translation = `(EI)/h^2`
Case 2:
Taking unit displacement u2=1; u1=u3=0

Stiffness coefficient of right end column rotation due unit displacement = 6EI / `h^2`
Stiffness coeefficient of left end column rotation due to unit displacement = 4EI/h + 4EI/L
= 4EI/h + 4EI/2h
= 6EI/h
Case 3 :
Taking unit displacement u3=1
Stiffness coefficient of column rotation left end at the beam = 6EI/ `h^2`
Stiffness coefficient of column rotation at the right end of the beam = 4EI/h + 4EI/L = 4EI/h + 4EI/2h
Total stiffness coefficient = 6EI/h
Stiffness coefficient matrix,
fs = k.u
= EIc /`h^3` `[[ 24,6h,6h],[6h,6h^2,h^2],[6h,h^2,6h^2]]` * `((u1),(u2),(u3))` = `((fs), (0) , (0))` --- eqn 1
Static condensation method is used u1 is identified in the form of u2 & u3
`((u2),(u3)) = - [ [6h^2 , h^2 ], [h^2 , 6h^2 ]]^-1 [[6h],[6h]] u1` ----- eqn 2
Substitute eqn 2 in 1
`[[u2], [u3]] = -6/(7h) [[1],[1]] u1`
From the above equation,
`(24EIc) / h^3 - (EIc)/h^3 [[6,6],[h,h]] [[1],[1]] 6/(7h) u1 = fs`
fs = u1 `((24EIc)/h^3 - (72EIc)/(7h^3))`
=`96/7 (EIc)/h^3 u1`
Therefore k= `96/7 (EIc)/h^3`
2)a. number of DOF =1
Equation of motion = 
Stiffness coefficient for the above column,k = `(3EI ) /h^3`
Substitute k in equation of motion
+ ( `(3EI ) /h^3` ) u = 0
natural frequency ,`omega`= `sqrt(k/m)`
2)b.
number of DOF =1
Stiffness coefficient column with fixed support, k1= k2 = 12EI/`h^3`
Stiffness coefficient for the column with pinned support, k3 = 3EI / `h^3`
ke = k1+k2+k3 = 27EI /`h^3`
natural frequency ,`omega`= `sqrt(k/m)` = `sqrt(27EI)/(mh^3)`
3) Calculation of natural frequency and time period:
`omega`= `sqrt(k/m)`
Lateral stiffness of simply supported beam, k1 = 48EI/ L^3
Lateral stiffness of cantilever beam, k2 = 3EI/ L^3
Total stiffness , Ke = k1 + k2
= `sqrt 3EI `((16/(L^3)) + (1/(L^3))` / sqrtm`
natural frequency ,`omega`= `sqrt(k/m)` = `3EI `((16/(L^3)) + (1/(L^3))` / sqrtm``
Time period T = `(2pi)/omega`
4)a) Stiffness of spring , K1 = K
Stiffness of beam, K2 = 3EI / `L^3`
Ke = K1 + K2
1/ Ke = `L^3 /(3EI)`+ `1/k`
1/Ke = k`L^3` + 3EI / (3EIK)
Ke = 3EIK / (K`L^3` + 3EI)
4)b.

Stiffness coefficient k = 3EI/`h^3`
Spring is acting inclined here, p = P/ cos `theta`
Inclined deformation , u = u cos`theta`
Stiffness coefficient of spring , K = p/ u`cos^2 theta`
p/u = K `cos^2 theta`
`cos theta` = L/`sqrt(L^2)` + `h^2`
`cos^2 theta` = L/`L^2` + `h^2`
Ks = K*L/`L^2` + `h^2`
Effective stiffness , Ke = `(6EI)/h^3 + (KL^2)/L^2 +h^2`
4)c.

Stiffness coefficient of the pinned beam element , k1 = 48EI/`L^3`
upward force = mg/2
Effective stiffness coefficient for the structure is obtained by adding the relative axial stiffness provided by the inclined strut,
mg/2 = `k_(ea,vert)` . 2 . `Delta_2`
`(mg)/ Delta_2` = 4`k_(ea,vert)`
`k_2 = 4k_(ea,vert)`
For inclined axial stiffness, `k_(ea,vert)`
`k_2`= `(4k_(ea)h^2 )/ ( L^2 +h^2)`
`1/k_e = 1/k_1 + 1/k_2`
`1/k_e = 1/((48EI)/L^3` + `1/((4k_(ea)h^2) / (L^2 +h^2`