(* 4.382.4 *)

Integrate[Log[(x^2+x+a^2)/(x^2-x+a^2)]*Sin[b*x],{x,0,Infinity},Assumptions->(b>0)&&(a>1/2)]

Integrate[Log[(x^2+x+a^2)/(x^2-x+a^2)]*Sin[b*x],{x,0,Infinity},Assumptions->(b>0)&&(0<a<1/2)]

f1[a_,b_]:=-((I (E^((1/2) I (-1+(Sqrt[1-4 (a^2)])) b)) (-1+(E^(I b))) π)/b);

g1[a_,b_]:=NIntegrate[Log[(x^2+x+a^2)/(x^2-x+a^2)]*Sin[b*x],{x,0,Infinity}]

N[f1[2,1/4]]

g1[2,1/4]

(* This is correct, but how do we simplify the answer given by Mathematica? *)