ps3 p2 (b).  Directivity

U = ((Cos[Pi #2 Cos[#1]] - Cos[Pi #2])/Sin[#1])^2 & ;

(*With[{alpha = 1},Maximize[ {U[theta, alpha], 0 ≤ theta ≤ Pi}, {theta}]]*)

alphas = {0.5,1,1.25, 2} ;

maxU  := NMaximize[ {U[theta, #1], 0 ≤ theta ≤ Pi}, {theta}] & ;
(*maxU := f[#] & ;*)
maxes  = maxU[#1] &/@ alphas


pRad := NIntegrate[ U[theta, #1] Sin[theta], {theta, 0, Pi}] & ;
prads = pRad[#1] &/@ alphas

directivities = (2 maxes[[#1]][[1]]/prads[[#1]]) &/@ Range[4]

{alphas, directivities} // TableForm