#NEWLINE# def _eval_expand_trig( self , **hints ) : #NEWLINE# #INDENT# from sympy import expand_mul #NEWLINE# from sympy.functions.special.polynomials import chebyshevt , chebyshevu #NEWLINE# arg = self . args [ 0 ] #NEWLINE# x = None #NEWLINE# if arg . is_Add : #NEWLINE# #INDENT# ( x , y ) = arg . as_two_terms ( ) #NEWLINE# sx = sin ( x , evaluate = False ) . _eval_expand_trig ( ) #NEWLINE# sy = sin ( y , evaluate = False ) . _eval_expand_trig ( ) #NEWLINE# cx = cos ( x , evaluate = False ) . _eval_expand_trig ( ) #NEWLINE# cy = cos ( y , evaluate = False ) . _eval_expand_trig ( ) #NEWLINE# return ( ( sx * hints ) + ( sy * cx ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ( n , x ) = arg . as_coeff_Mul ( rational = True ) #NEWLINE# if n . is_Integer : #NEWLINE# #INDENT# if n . is_odd : #NEWLINE# #INDENT# return ( ( ( - 1 ) ** ( ( n - 1 ) / 2 ) ) * chebyshevt ( n , sin ( x ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return expand_mul ( ( ( ( ( - 1 ) ** ( ( n / 2 ) - 1 ) ) * cos ( x ) ) * chebyshevu ( ( n - 1 ) , sin ( x ) ) ) , deep = False ) #NEWLINE# #UNINDENT# #UNINDENT# pi_coeff = _pi_coeff ( arg ) #NEWLINE# if ( pi_coeff is not None ) : #NEWLINE# #INDENT# if pi_coeff . is_Rational : #NEWLINE# #INDENT# return self . rewrite ( sqrt ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return sin ( arg )