# Sum up a taylor series

1. Oct 13, 2012

### Xarx

I need to calculate $\sum_{n=0}^{∞}x^{(2^n)}$ for $0≤x<1$. It doesn't resemble any basic taylor series, so I have no idea how to sum it up. Any hint, or the resulting formula?

This series comes from a physical problem, so I suppose (if I didn't make a mistake) that the series is sumable, and diverges for x=1.

2. Oct 13, 2012

### haruspex

I'm fairly sure this cannot be put in closed form (except by inventing a new function for it). The fact that it comes from a physical problem would be no guarantee. I would guess it has been studied before, and probably has a name. But it does look unusual for a physical behaviour, so it would be a good idea to check correctness.

3. Oct 14, 2012

### chiro

4. Oct 14, 2012

### Xarx

Well, I'm trying to compare the recessional velocity formula for the Doppler effect redshift and for the cosmological redshift. While the formula

$v_{rec} = c \frac{λ_{obs} - λ_{rest}}{λ_{rest}}$

is easy to derive for the Doppler redshift, the maths for the cosmological redshift is much more complicated. At one stage of the calculations I get the series above, which I'm unable to simplify or calculate. I'll have to resort to only several first terms of the Taylor expansion, which shall result in that the formula being derived will be valid for small recessional velocities only .

Why I'm doing that? I'd like to know whether the recessional velocity formulas are in fact the same for both kinds of redshift, or not. Because the cosmological redshift velocity is by convention "the recessional velocity that would produce the same redshift if it were caused by a linear Doppler effect" (Wikipedia). So this conventional redshift velocity does not correspond to any physical velocity, it's just a number.

Usually, when they teach about redshift and recessional velocities, they don't point out that the recessional velocity is not a "real" velocity in any common sense. So the crucial question (to me) is whether it does matter or not, whether the "real" recessional velocities are equal to the conventional ones. And if they are not, whether the difference may influence calculations e.g. of the distance of the border of the visible universe etc., or not.

By the "real" velocity I mean the velocity with respect to the "proper" distance (technical term).

5. Oct 14, 2012

### Xarx

6. Oct 14, 2012

### chiro

Can you introduce some kind of transformation to take x^(2^n) to z^n?

7. Oct 14, 2012

### Xarx

I don't know how to. The power operation is not anyhow associative, so I'm unable to transfer x^(2^n) to anything like (y^2)^n. I've already tried to apply exp and log, but without success.

8. Oct 14, 2012

### awkward

Wolfram Alpha says
$$\sum_{n=0}^{\infty} x^{n^2} = \frac{1}{2} (\vartheta_3(0, x)+1)$$ for $x < 1$

where $\vartheta_3$ is a Jacobi theta function,
$$\vartheta_3(z,q) = \sum_{n=-\infty}^{\infty} q^{n^2} e^{2niz}$$

Last edited: Oct 14, 2012
9. Oct 14, 2012

### Xarx

Thank you for the hint. I was thinking about it, and I looked at other Jacobi theta functions (e.g. here: http://mathworld.wolfram.com/JacobiThetaFunctions.html), but I still don't know how to use it. The z parameter of the $\vartheta_3$ function can be a complex number, which is good as I can use e.g. z=-i/2. But the elements of its Taylor series only grow similarly as the elements of a geometric series, which is insufficient.

10. Oct 14, 2012

### Mute

I don't think you're going to find a closed form for this sum. Mathematica doesn't give a closed form for it, so even if you can find one it won't necessarily be useful because it would be in terms of some exotic special functions almost no one has heard of.

As you have written it, the expression contains no parameters other than x. Because the exponent increases exponentially, it should be rather easy to compute this numerically. e.g., in Mathematica

f[x_] := NSum[x^(2^n),{n,0,Infinity}]

works just fine and you can plot it as close to x = 1 as you like, and it computes it quite quickly. What advantage over numerical evaluation are you hoping for by having an analytic expression?

Last edited: Oct 14, 2012
11. Oct 14, 2012

### awkward

If you have Mathematica, you can compute $\vartheta_3(0,x)$ via the function EllipticThetaPrime[3,0,x].

12. Oct 14, 2012

### Mute

Unfortunately, the OP's sum is quite different from the theta function sum - $x^{2^n}$ versus $x^{n^2}$ - so I don't think the theta function will really help.

13. Oct 14, 2012

### Xarx

At first I hoped the sum gives something common and simple, but now I have the same opinion. Even if it gives the theta function, I wouldn't be able to calculate further with it.

Numerical evaluation doesn't give you understanding, you just can compare whether two calculations give the same result, but that's almost all. Moreover, the series is only an intermediary result in my calculations, so I need to perform some more calculations to get to my final formula.

I'll probably take several first terms in the series to proceed further. Thank you all.

14. Oct 15, 2012

### Mute

Closed forms are only nicer because they're in terms of functions that have been studied to death and people have generally written efficient code to evaluate the functions. In this case, the sum is so simple that numerical evaluation is going to be just as good as having a built-in function already programmed.

But, if you insist, there is one trick you can make use of to get an asymptotic closed form, which may help out with the later steps in your calculation. The Euler-Maclaurian formula reads

$$\sum_{n=a}^b f(n) \sim \int_a^b dt~f(t) + \frac{f(a)+f(b)}{2} + \sum_{k=1}^\infty \frac{B_{2k}}{(2k)!}(f^{(2k-1)}(b)-f^{(2k-1)}(a)),$$
where the $B_{2k}$ are Bernoulli numbers and the formula typically remains valid even when a or b are $\pm \infty$. Applying this to your sum (and keeping only the first two terms) gives, for 0< x < 1,

$$\sum_{n=0}^\infty x^{2^n} \sim \int_0^\infty dt~x^{2^t} + \frac{x}{2} + \dots$$

Using wolfram to evaluate the integral:

$$\sum_{n=0}^\infty x^{2^n} \simeq -\frac{\mbox{Ei}(\ln x)}{\ln 2} + \frac{x}{2},$$
where $\mbox{Ei}(x)$ is the exponential integral special function defined by

$$\mbox{Ei}(x) = \int_{-\infty}^x dt~\frac{e^{t}}{t}.$$
(Note that the primary advantage this special function has over your function defined in terms of a sum is that this function has been studied a lot and is built into Mathematica, etc!).

Plotting the asymptotic form against the sum evaluated numerically yields that the two curves basically fall right on top of each other.

Mathematica commands:
Code (Text):

f[x_] := NSum[x^(2^n), {n, 0, Infinity}]

g[x_] := -(ExpIntegralEi[Log[x]]/Log[2]) + x/2

Plot[{f[x], g[x]}, {x, 0, 0.98}]

(Not sure why it didn't occur to me to mention the Euler-Maclaurin formula yesterday. It is seriously one of the most useful formulas I know).

Last edited: Oct 15, 2012
15. Oct 15, 2012

### awkward

Whoops! My mistake, sorry.