#NEWLINE# def scalex( self , s ) : #NEWLINE# #INDENT# 'Scale x by a term independent of x.\n\n        f(x) -> f(s*x)\n\n        This is fast, if Fourier series of f(x) is already\n        computed.\n\n        Examples\n        ========\n\n        >>> from sympy import fourier_series, pi\n        >>> from sympy.abc import x\n        >>> s = fourier_series(x**2, (x, -pi, pi))\n        >>> s.scalex(2).truncate()\n        -4*cos(2*x) + cos(4*x) + pi**2/3\n        ' #NEWLINE# ( s , x ) = ( sympify ( s ) , self . x ) #NEWLINE# if ( x in s . free_symbols ) : #NEWLINE# #INDENT# raise ValueError ( ( "'%s' should be independent of %s" % ( s , x ) ) ) #NEWLINE# #UNINDENT# an = self . an . subs ( x , ( x * s ) ) #NEWLINE# bn = self . bn . subs ( x , ( x * s ) ) #NEWLINE# sfunc = self . function . subs ( x , ( x * s ) ) #NEWLINE# return self . func ( sfunc , self . args [ 1 ] , ( self . a0 , an , sfunc ) )