How can I get Mathematica to directly produce the series expansion of an expression such as $(1+1/x)^n$, where $n$ is an arbitrary positive integer? Note that it's important in my expression to keep $n$ arbitrary rather than specifying a specific value.

When I enter something like,

 Series[(1 + x)^n, {x, 0, 5}]

it gives me the usual first few terms that the binomial expansion would produce but as soon as I enter the original expression instead, it just returns the expression itself. Of course for this particular case, I can just expand $(1+x)^n$ and take $x \rightarrow 1/x$, but I'm interested in expanding a more complicated expression which is a linear combination of expressions of the form

$$ \frac{(1+ax)^n(1+a/x)^n}{(1+x)(1+1/x)} $$

about $x=0$ and extracting the first few coefficients.

I've tried things like

Assuming[Element[n, Integers] && n >= 1, Series[f[x], {x, 0, 5}]]

but that doesn't help.


I'm not sure if I have understood exactly what you want.

But as it makes no sense to expand your expression about x=0, you can expand it about x=\[Infinity]:

Series[(1 + 1/x)^ n, {x, \[Infinity], 5}]

$1+\frac{n}{x}+\frac{(-1+n) n}{2 x^2}+\frac{(-2+n) (-1+n) n}{6 x^3}+\frac{(-3+n) (-2+n) (-1+n) n}{24 x^4}+\frac{(-4+n) (-3+n) (-2+n) (-1+n) n}{120 x^5}+O\left[\frac{1}{x}\right]^6$

Let's have a look at the other expression

f = ((1 + a x)^n (1 + a/x)^ n )/((1 + x) (1 + 1/x))

Series[f, {x, 0, 5}] // Simplify

$\left(\frac{a+x}{x}\right)^n \left(x+(-2+a n) x^2+\left(3-2 a n+\frac{1}{2} a^2 (-1+n) n\right) x^3+\left(-4+3 a n-a^2 (-1+n) n+\frac{1}{6} a^3 (-2+n) (-1+n) n\right) x^4+\left(5-4 a n+\frac{3}{2} a^2 (-1+n) n-\frac{1}{3} a^3 (-2+n) (-1+n) n+\frac{1}{24} a^4 (-3+n) (-2+n) (-1+n) n\right) x^5+O[x]^6\right.$

The first bracket is not expandable about x=0. Therefore it is left unchanged.

Summing up: just use Series about the apropriate Point.

Hope this helps, Regards Wolfgang

  • $\begingroup$ You're correct in this particular case, but for the second expression I wrote, I think a series expression about $x = 0$ is well defined, since the function doesn't blow up as $x$ goes to $0$, though the series may contain a few negative powers of $x$. $\endgroup$
    – user20031
    Sep 25 '14 at 18:32
  • $\begingroup$ @user20031 I think unless your $n=1$, or the fraction does blow up at $x=0$. $\endgroup$
    – Silvia
    Sep 26 '14 at 4:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.