def roots_chebyu(n, mu=False):
 m = int(n)
 if ((n < 1) or (n != m)):
  raise ValueError('n must be a positive integer.')
 t = ((np.arange(m, 0, (-1)) * pi) / (m + 1))
 x = np.cos(t)
 w = ((pi * (np.sin(t) ** 2)) / (m + 1))
 if mu:
  return (x, w, (pi / 2))
 else:
  return (x, w)

def roots_chebyu ( n , mu = False ) : m = int ( n ) if ( ( n < 1 ) or ( n != m ) ) : raise ValueError ( 'n must be a positive integer.' ) t = ( ( np . arange ( m , 0 , ( - 1 ) ) * pi ) / ( m + 1 ) ) x = np . cos ( t ) w = ( ( pi * ( np . sin ( t ) ** 2 ) ) / ( m + 1 ) ) if mu : return ( x , w , ( pi / 2 ) ) else : return ( x , w )
gauss-chebyshev quadrature .