function o =  phi (beta , g1 , g2 , noise_var)

o = (2*g1*g2 - beta*(g1+g2)*noise_var^2 + sqrt((beta*(g2-g1))^2*noise_var^4  + 4*(g1*g2)^2  ) )/(2*beta*g1*g2);