#NEWLINE# def _eval_nseries( self , x , n , logx ) : #NEWLINE# #INDENT# from sympy import log , EulerGamma , Pow #NEWLINE# n += 1 #NEWLINE# if ( self . args [ 0 ] . subs ( x , 0 ) != 0 ) : #NEWLINE# #INDENT# return super ( TrigonometricIntegral , self ) . _eval_nseries ( x , n , logx ) #NEWLINE# #UNINDENT# baseseries = self . _trigfunc ( x ) . _eval_nseries ( x , n , logx ) #NEWLINE# if ( self . _trigfunc ( 0 ) != 0 ) : #NEWLINE# #INDENT# baseseries -= 1 #NEWLINE# #UNINDENT# baseseries = baseseries . replace ( Pow , ( lambda t , n : ( ( t ** n ) / n ) ) , simultaneous = False ) #NEWLINE# if ( self . _trigfunc ( 0 ) != 0 ) : #NEWLINE# #INDENT# baseseries += ( EulerGamma + log ( x ) ) #NEWLINE# #UNINDENT# return baseseries . subs ( x , self . args [ 0 ] ) . _eval_nseries ( x , n , logx )