measuring young's modulus from simple harmonic motion with cantilever I was doing this experiment:
http://practicalphysics.org/shm-cantilever.html
I'm interested in the derivation of the result $ω^2 = \frac{Exy^3}{4ML^3}$.
I tried to think where it comes from.

Let's say theta is small so $\sin\theta$ is approximately $\theta$.
I tried to make moment of forces equation with point of turning at the place of force N, but it really don't make any sense as we get $\theta mg\frac{L}{2} + MgL\theta = 0$.
How do we even start to derive k from the equation mg = K*S where S is the delta in the length of C.M before and after Mass was put on the edge and K is constant which is equal to $\frac{Eb^3a}{4L^3}$?
 A: This is quite a lengthy and in-depth answer to OP's question. For a quick summary, please go to the Conclusion section at the bottom of the post.
Firstly note that in your link, only the cellotaped mass $M$ is taken into account, not the mass of the beam itself. Taking the beam's mass into account makes it behave like a tuning fork, with quite different modes of oscillation.
For a massless beam with a force $F$ acting on the free tip:

This paper (top case) tells us the deflection of the beam will be:
$$z=\frac{FL^3}{3EI}$$
(Beam deflection can be derived by solving the differential equation $EI\frac{d^2z(x)}{dx^2}=M(x)$ with $M(x)$ the bending moment, for various relevant boundary conditions)
$I$ is the second moment of inertia of a rectangle (about the $x$-axis):
$$I=\frac{ab^3}{12}$$
Where $a$ is the width of the beam and $b$ the thickness of the beam. Inserting we get:
$$z=\frac{4FL^3}{Eab^3}$$
Or:
$$F=\frac{Eab^3}{4L^3}z$$
So the beam acts as a spring.
As only two forces act on the mass $M$, gravity and the restoring force $F$, we can now write the equation of motion as:
$$M\frac{d^2z}{dt^2}+\frac{Eab^3}{4L^3}z-Mg=0$$
Or:
$$\frac{d^2z}{dt^2}+\frac{Eab^3}{4ML^3}z-g=0$$
$$\frac{d^2z}{dt^2}+\omega^2z-g=0$$
This is the equation of motion of a simple harmonic oscillator with angular frequency $\omega$ and has a solution (#, below page break) of the general form:
$$z(t)=A\sin(\omega t+\phi)$$
Where:
$$\Large{\omega^2=\frac{Eab^3}{4ML^3}}$$

#:
$$\frac{d^2z}{dt^2}+\omega^2z-g=0$$
$$\frac{1}{\omega^2}z''+z-\frac{g}{\omega^2}=0$$
Call:
$$u=z-\frac{g}{\omega^2}$$
$$du=dz$$
$$d^2u=d^2z$$
$$\frac{1}{\omega^2}u''+u=0$$
$$u''+\omega^2u=0$$
$$u=A\sin(\omega t+\phi)$$
$$z(t)=A\sin(\omega t+\phi)+\frac{g}{\omega^2}$$

Initial conditions to determine $A$ and $\phi$:
$$z(0)=z_0 \implies A\sin \phi+\frac{g}{\omega^2}=z_0$$
$$z'(0)=0\implies A\omega \cos\phi=0\implies \phi=\frac{\pi}{2}$$
$$\sin\big(\omega t+\frac{\pi}{2}\big)=\cos \omega t$$
$$A=z_0-\frac{g}{\omega^2}$$
$$\implies z(t)=\big(z_0-\frac{g}{\omega^2}\big)\cos \omega t+\frac{g}{\omega^2}$$

Conclusion:
A massless elastic beam with rectangular cross-section and with a mass $M$ strapped to its free tip behaves like a simple harmonic oscillator with equation of motion:
$$u''+\omega^2u=0$$
Its angular frequency $\omega$ is given by:
$$\omega^2=\frac{Eab^3}{4ML^3}$$
Measurement of $\omega$ can thus be used to estimate the elastic modulus $E$ of the beam.
A: The equation that they give here neglects the mass of the ruler compared to the mass of the object taped to the ruler. They want you to treat the beam the same way you treat a massless spring in a spring-mass system.
What they are using is the equation (derived from solid deformation mechanics) for the downward displacement at the location were a force is applied to a cantilever beam as a function of the magnitude of the force. They don't want you to worry about where the equation came from.  If you feel compelled to understand the derivation of the equation, get a book on Strength of Materials and see the section on bending of beams.
