def f1(x): """ An angular integral that appears in electron noise calculation. """ term1 = x * (mp.si(x) - 0.5 * mp.si(2*x)) term2 = -2 * mp.sin(0.5 * x)**4 return (term1 + term2)/x**2
def f2(x): """ Another angular integral in electron noise calculation. """ term1 = 2*x**3 * (2*mp.si(2*x)-mp.si(x)) term2 = 2*x**2 * (mp.cos(2*x) - mp.cos(x)) term3 = x * (mp.sin(2*x) - 2*mp.sin(x)) - (mp.cos(2*x) - 4* mp.cos(x) + 3) return (term1 + term2 + term3)/(12 * x**2)
def f63(x): # Si return mpmath.si(x)