'Scale x by a term independent of x.
f(x) -> f(s*x)
This is fast, if Fourier series of f(x) is already
computed.
Examples
>>> from sympy import fourier_series, pi
>>> from sympy.abc import x
>>> s = fourier_series(x**2, (x, -pi, pi))
>>> s.scalex(2).truncate()
-4*cos(2*x) + cos(4*x) + pi**2/3'

def scalex(self, s):

    (s, x) = (sympify(s), self.x)
    if (x in s.free_symbols):
        raise ValueError(("'%s'    should    be    independent    of    %s" % (s, x)))
    an = self.an.subs(x, (x * s))
    bn = self.bn.subs(x, (x * s))
    sfunc = self.function.subs(x, (x * s))
    return self.func(sfunc, self.args[1], (self.a0, an, bn))
