# Explicitly summing a series involving hyperbolic tangent

1. Nov 19, 2008

### gabbagabbahey

I recently came across a problem where I was able to show that $$\sum_{n=1}^{\infty} \frac{(-1)^n}{n} \tanh \left( \frac{n \pi}{2} \right)=\frac{\ln 2- \pi}{4}$$ through numerical approximation....However, I don't have much practice evaluating such summations analytically, and I was wondering if anyone had any ideas on how to evaluate this one analytically?

2. Dec 17, 2008

### rochfor1

Express tanh as a sum of complex exponentials.

3. Dec 17, 2008

### gabbagabbahey

Ermm...was the 'complex' a typo, or does expressing $\tanh\left(\frac{n\pi}{2}\right)$ as $$\frac{e^{i\left(\frac{-in\pi}{2}\right)}-e^{i\left(\frac{in\pi}{2}\right)}}{e^{i\left(\frac{-in\pi}{2}\right)}+e^{i\left(\frac{in\pi}{2}\right)}}$$ actually help in evaluating this sum? If so, I don't see how.

4. Dec 17, 2008

### gabbagabbahey

Okay, so I've made some headway by expressing tanh in terms of 'real' exponentials:

Using $\tanh(x)=\frac{e^x-e^{-x}}{e^x+e^{-x}}=\frac{e^{2x}-1}{e^{2x}+1}=1-\frac{2}{e^{2x}+1}}$ , the sum becomes:

$$\sum_{n=1}^{\infty} \frac{(-1)^n}{n} \tanh \left( \frac{n \pi}{2} \right)=\sum_{n=1}^{\infty} \frac{(-1)^n}{n} -2\sum_{n=1}^{\infty} \frac{(-1)^n}{n} \left( \frac{1}{e^{n\pi}+1} \right)$$

The first term is just the alternating harmonic series and sums to $-\ln(2)$, and the second one converges very quickly, but now I need to review my old calc text and see if there is something in there that will help me analytically compute the second summation.