Thread: Help with calculating a summation

1. Help with calculating a summation

Hi there,

I have a trigonometrical-series type of solution as follows:

$C=C_{0}-\frac{4C_{0}}{\pi}\sum\frac{(-1)^n}{2n+1}\exp(\frac{-D(2n+1)^2\pi^2t}{4l^2}\cos(\frac{(2n+1)\pi\times(x )}{2l})$

I am having trouble calculating the sum part of the expression. Let's assume

$\frac{Dt}{l^2}=1$ and x = 0 and divide through by $C_{0}$, then I get the sum part to be:

$\sum\frac{(-1)^n}{2n+1}\exp(\frac{-(2n+1)^2\pi^2}{4})\times1$

The reference I am using gives the overall answer to be:

$\frac{C}{C_{0}}=1 - 0.1080 = 0.8920$

but I am getting much smaller answers. Could anyone suggest what I might be doing wrong?

Any help would be much appreciated

2. Re: Help with calculating a summation

Your sum has no limits, so I'm assuming an infinite series starting at n = 0. Notice this is an alternating series with the magnitude of the terms decreasing to 0 as n goes to infinity. So the series converges and you know the value of a partial sum with m term differs from the value of the series by at most the magnitude of the (m+1)st term. With your calculator you find that the magnitude of the 3nd term is of the order of E-28. So just the sum of the 1st two terms is very close to the true value. I find the answer you gave to be correct.

3. Re: Help with calculating a summation

Thanks johng!

I just reached the same conclusion - you beat me to it! I had initally started at n = 1 and seeing as the n = 0 part contributes the most, my answer was much too small.

I have run into another similar problem, perhaps you could help me with that too? The sum is:

$\frac{C}{C_{0}}=1+\frac{2b}{r\pi}\sum\frac{(-1)^{n-1}}{n}\times\sin(\frac{nr\pi}{b})\times\exp(\frac{-Dn^2\pi^2t}{b^2})$

we can let $\frac{Dt}{b^2}$ be a constant. The limits in this case are n = 1 to infinity (I haven't mastered that in latex yet sorry...)

Essentially, I am getting answers that tend to oscillate for different values of r (ranging from 0 to 1).

I have tried to break down each part of the sum to see how it contributes, but I am not having much luck.

Again, any light thrown on this would be very much appreciated!