Equating the applied moment to the moment in the beam

$Pv(x) = M(x) = B\kappa(x) = -B\frac{d^2v}{dx^2} = -Bv''$

$\therefore Bv'' + Pv = 0$

Thus we wish to solve $v'' + \frac{P}{B}v = 0$.

$m^2 + \frac{P}{B} = 0$ is the 'subsidiary equation', $\therefore m = \pm i\sqrt{\frac{P}{B}}$.

$\therefore v = G\sin(\sqrt{\frac{P}{B}}x) + H\cos(\sqrt{\frac{P}{B}}x)$ where $G$ and $H$ are constants.

But $v(0) = 0 \therefore H = 0$

and $v(L) = 0 \therefore L\sqrt{\frac{P}{B}} = n\pi$, where $n$ is any integer.

$\therefore P = \frac{B n^2\pi^2}{L^2}$, and since the lowest possible $n$ is 1, and we are interested in the lowest load that would be an 'equilibrium state' when the strut is on the point of buckling, we find the lowest buckling load is given by

$P = \frac{\pi^2B}{L^2}$

So now you can find out just how stiff that matchstick is! Later you will learn that the bending stiffness $B$ is the product of two other quantities, the 'elastic modulus' material stiffness $E$, and the lowest 'second moment of area' of the beam $I_{xx}$.