We can observe that each and every element of rod is rotating with different radius about the axis of rotation.
Take an elementary mass `dm` of the rod.
`dm=m/(l_(0))dl`
The moment of inertia of the elementary mass is given as `dl=(dm)r^(2)`
The moment of inertia of the rod
`=I=intdIimpliesI=intr^(2)dm`
Substituting `r=lsintheta` and `dm=ml_(0).dl` we obtain
`I=int(l^(2)sin^(2)theta)m/l_(0)dI=(msin^(2)theta)/l_(0)int_0^(l_0)l^(3)dl=(ml_0^(3))/(3l_(0))sin^(2)theta`
`implies l=(ml_(0)^(2)sin^(2)theta)/3`