Clear[n,m]

n = 2; m = 1;

t[phi_] := ((2*n + 1)*((n - m)!/(n + m)!))^0.5*m

*Sin[phi]^(2*n)*
    Integrate[LegendreP[n, m, Cos[x]]/Sin[x]^(2*n + 1), {x, phi, Pi/2}];

fac[x_]= FullSimplify[LegendreP[n, m, Cos[x]]/Sin[x]^(2*n + 1)]

intfac[x_]= Integrate [fac[x],x]

multi = ((2*n+1)*(n-m)!/(n+m)!)^0.5* m*Sin[phi]^(2*n)

0.9128709291752769` ((Sin[phi])^4)

FortranForm[multi*intfac[x]]