Critical force for a system comprised of a compressible and incompressible parts What is the critical buckling force needed to be applied on a system of made out of two parts?
The parts of the system are as depicted in the picture:

*

*incompressible elastic beam - on top


*compressible support beam - on the bottom
Upon applying enough compression force the top beam will buckle and the bottom will compress. I managed to follow worked examples for calculating the Euler buckling of the top beam leading to $F_{cr}= \frac{\pi\kappa}{l^2}$ where $\kappa$ is the bending rigidity and $l$ is the compressed length of the bottom beam and the projection of the top beam on the $x$-axis.
The bottom beam is modeled as a spring using Hooke's law.
I am having problem connecting all the pieces of the system together to be able to find the two behaviors where under the critical load the system is flat and above it it undergoes compression and buckling. I would like to also know the energy of the system but that should be relatively easy to obtain from the force by integration.

 A: We assume two general bars/rods/beams in parallel with Young's elastic modulus, cross-sectional area, and area moment of inertia $E_1$, $A_1$, $I_1$ and $E_2$, $A_2$, $I_2$, respectively. Beam 1 is presumed to buckle, and beam 2 is presumed not to buckle under a total force $F$.
I'll use the nomenclature and analysis strategy of these lecture notes. Disclaimer: I don't know if this is the best analysis strategy for a parallel-beam problem, but it is a strategy.
The strain energy stored in beam 1 from bending and axial stresses is $U_1=\int_0^l \frac{1}{2}M_1\kappa_1\,dx+\int_0^l \frac{1}{2}N_1\varepsilon_1\,dx$, where $M=EI\kappa$ is the bending moment, $N=EA\varepsilon$ is the axial load, $\kappa$ is the curvature, and $\varepsilon$ is the axial strain.
The strain energy stored in beam 2 is then $U_2=\int_0^l \frac{1}{2}N_2\varepsilon_2\,dx$ (no bending),  giving a total of
$$U=\int_0^l \frac{1}{2}M_1\kappa_1\,dx+\int_0^l \frac{1}{2}N_1\varepsilon_1\,dx+\int_0^l \frac{1}{2}N_2\varepsilon_2\,dx.$$
We seek a stationary configuration $\delta(U-W)=0$, where the applied work $W=F\varepsilon_2 l$ (we use $\varepsilon_2$ because it's entirely horizontal, just like the force application):
$$\delta(U-W)=0=\int_0^l M_1\delta\kappa_1\,dx+\int_0^l N_1\delta\varepsilon_1\,dx+\int_0^l N_2\delta\varepsilon_2\,dx-F\delta\varepsilon_2 l.$$
(Note what's happening when we take the variation: $\delta\left(\frac{1}{2}M_1\kappa_1\right)=\delta\left(\frac{1}{2}E_1I_1\kappa_1^2\right)=E_1I_1\kappa_1\delta\kappa_1=M_1\delta\kappa_1$.)
For small deflections, we can approximate the curvature from the second derivative of the deflection $w$ and the axial strain from the first derivatives of the elongation $u$ and deflection: $\kappa\approx -w^{\prime\prime}$ and $\varepsilon\approx u+\frac{1}{2}(w^\prime)^2$; thus, $\delta\kappa\approx -\delta w^{\prime\prime}$ and $\delta\varepsilon\approx \delta^\prime u+w^\prime\delta w^\prime$. This gives
$$\delta(U-W)=0=-\int_0^l M\delta w^{\prime\prime}\,dx+\int_0^l N_1\left(\delta u^\prime+w^\prime\delta w^\prime\right)\,dx+\int_0^l N_2\delta u^\prime\,dx-F\delta u^\prime\ l.$$
Here, I've eliminated some subscripts where no ambiguity exists and incorporated $w=0$ for the second beam.
Now, note that
$$\int_0^l N_1\delta u^\prime\,dx+\int_0^l N_2\delta u^\prime\,dx=\left(N_1+N_2\right)\delta u|_{x=0}^{x=L}=F\delta u^\prime\ l,$$ so we have
$$\delta(U-W)=0=-\int_0^l M\delta w^{\prime\prime}\,dx+\int_0^l N_1w^\prime\delta w^\prime\,dx.$$
According to the Treffzt stability criterion, we seek $\delta^2(U-W)=\delta\left[\delta(U-W)\right]=0$:
$$\delta^2(U-W)=0=-\int_0^l \delta M\delta w^{\prime\prime}\,dx+N_1\int_0^l \delta w^\prime\delta w^\prime\,dx,$$
where we've ignored higher-order variations. Thus, the critical load (negative because it's compressive) is
$$N_{1,\mathrm{crit}}=-\frac{\int_0^l \delta M\delta w^{\prime\prime}\,dx}{\int_0^l \delta w^\prime\delta w^\prime\,dx}=E_1I_1\frac{\int_0^l \delta w^{\prime\prime}\delta w^{\prime\prime}\,dx}{\int_0^l \delta w^\prime\delta w^\prime\,dx},$$
which for an assumed first-mode shape of $w(x)\propto \sin\frac{\pi x}{l}$ (and thus $w^\prime(x)\propto \frac{\pi}{l}\sin\frac{\pi x}{l}$ and $w^{\prime\prime}(x)\propto \frac{\pi^2}{l^2}\sin\frac{\pi x}{l}$) gives
$$N_{1,\mathrm{crit}}=-\frac{\pi^2E_1I_1}{l^2},$$ as expected. This can be added to $N_2$ to obtain the total force $F$; the parallel beams combine additively in force, and the critical load is unchanged in the beam that buckles (which we might expect but gain practice in proving).
