Free body of a spring element

image.png

https://www.youtube.com/watch?v=3AB1sHkCb3I (link for the above ^)

Displacement fuction

image.png

image.png

image.png

image.png

$N_1$ and $N_2$ would be our shape functions