In this picture, the red curve is an elastic rod that has resistance to bending and extension. I am trying to model the adhesions (contact) between the rod and the substrate (glass): the green dashed lines. We will try to model it as in a spring-like bond. But, I need it in integral form.
From a numerical view, I can write that: \begin{equation} E = \sum_i \frac{1}{2}kz_i^2 \end{equation} where $i$ represent the bond at certain position.
How can I transform this discretization into an integral form that covers all the green parts?