consider a small part of the semicircular wire dl
now dE at the centre due t o this part is = Gdm/R^2 sin@
teh cos componenets get cancelled
dm =M/L *dl
dl= Rd@
dm = M Rd@ / L
dE = G M Rd@ / L *R^2sin@
= GM/RL sin@ d@
inetgrate both sideslimits to righ t hadn side wil eb 0 to pie
E = GM/RL *[cos pie - cos 0]
= 2GM/RL
I f u want it in terms of pie
pieR = L
so E = 2GM/pieR^2 eliminating L
or
E = 2GMpie /L^2 eliminating R