Assume that a tunnel is dug along a chord of the earth, at a perpendicular distance R2 from the earth's center where R is the radius of the earth. the wall of the tunnel is frictionless. Find the time period.
The particle will be on the periphery of some circle (let's say of radius X1)
In that case the force of gravity on the particle will be because of the sphere of radius X1 only!
F=GM1mx21
If the mass of inner sphere is M1 then M1=43πx3143πR3M
=x31MR3
∴F=−Gx31MmR3x21=−GMx1mR3
Its component along O would be F cos θ
F0=F cos θ=−GMx1mR3(xx1)=−GMR3x×m
a0=−GMxR3
comparing with a=−ω2x [for a SHM]
ω2=GMR3⇒ω=√GMR3; T=2π√R3GM