$\pi / 4 \not = \sum_{n, \text { odd }}^{\infty} \frac{1}{n} \sin \left(n \pi \frac{z}{h}\right)$ but the author argues otherwise In the book of Theoretical microfluidics by Bruus (2008) at page 49 the equation 3.48, it is argued that

$$-\frac{\Delta p}{\eta L}=-\frac{\Delta p}{\eta L} \frac{4}{\pi} \sum_{n, \text { odd }}^{\infty} \frac{1}{n} \sin \left(n \pi \frac{z}{h}\right)$$

which can be written as
$$
\pi / 4 = \sum_{n, \text { odd }}^{\infty} \frac{1}{n} \sin \left(n \pi \frac{z}{h}\right)
$$
where $z\in [0,h]$, but when I calculate the RHS in Mathematica, I get
$$\frac{1}{2} i \left(\tanh ^{-1}\left(e^{-i \pi  z/h}\right)-\tanh ^{-1}\left(e^{i \pi  z/h}\right)\right)$$
which is not equal to $\pi/4$. So how does author argues that a term $\frac{\Delta p}{\eta L}$ that is independent of $z$ can be written as a Fouries series given above?
Addendum:
The book can be accessed by a simply googling the name of the book.
 A: Actually yes,
$$ \frac{i}{2} \left(\tanh^{-1}\left(e^{-i\pi z/h}\right) -
\tanh^{-1}\left(e^{i\pi z/h}\right)\right) = \frac{\pi}{4} $$
for any real number $0 < \frac{z}{h} < 1$. Identities of trig and hyperbolic trig functions and their inverses can be tricky to spot! (This Fourier series breaks at the interval endpoints, but this isn't an issue for most physics applications.)
The inverse hyperbolic tangent can also be written
$$ \tanh^{-1} x = \frac{1}{2}\, \ln \frac{1+x}{1-x} $$
As complex functions, both $\ln$ and $\tanh^{-1}$ can be multivalued, or the principal branch of $\tanh^{-1}$ is defined based on the principle branch of $\ln$. Mathematica always uses $\tanh^{-1}$ in the sense of the principle branch.
So if we say $w = e^{i \pi z/h}$ then
$$ \begin{align*}
X &= \frac{i}{2} \left(\tanh^{-1}\left(e^{-i\pi z/h}\right) -
\tanh^{-1}\left(e^{i\pi z/h}\right)\right) \\
X &= \frac{i}{2} \left(\tanh^{-1} \left(\frac{1}{w}\right) - \tanh^{-1} w\right) \\
X &= \frac{i}{4} \left(\ln \frac{1+\frac{1}{w}}{1-\frac{1}{w}} - \ln \frac{1+w}{1-w}\right) \\
X &= \frac{i}{4} \left(\ln \left(-\frac{1+w}{1-w}\right) - \ln \frac{1+w}{1-w}\right) \\
X &= \frac{i}{4} \big(\ln (-u) - \ln u \big)
\end{align*} $$
where $u = \frac{1+w}{1-w}$.
$$ e^{\ln(-u) - \ln u} = \frac{-u}{u} = -1 $$
which implies that
$$ \ln(-u) - \ln u = (2k+1) \pi i $$
for some integer $k$.
Since $-1 < \mathop{\mathrm{Re}} w < 1$ and $0 < \mathop{\mathrm{Im}} w < 1$, we have $1+w$ and $1-w$ both in the first quadrant and $1-w$ in the fourth quadrant. So the quotient has $\mathop{\mathrm{Im}} u = \mathop{\mathrm{Im}} \frac{1+w}{1-w} > 0$, and   using the principal branch of $\ln$ and $\tanh^{-1}$,
$$0 < \mathop{\mathrm{Im}}(\ln u) < \pi $$
$$ -\pi < \mathop{\mathrm{Im}}\!\big(\ln(-u)\big) < 0 $$
$$ -2 \pi < \mathop{\mathrm{Im}}\!\big(\ln(-u) - \ln u \big) < 0 $$
Combining the multivalue solution and the inequality, $\ln(-u)-\ln u = -\pi i$. So finally,
$$ X = \frac{i}{4} \big(\ln (-u) - \ln u \big) = \frac{\pi}{4} $$
Mathematica's answer is correct on a wider set of complex values for $\frac{z}{h}$, in regions where the infinite series converges.
A: $\def\zb{\bar z}$It is a straightforward exercise to show that the Fourier series for
$$f(x) = \begin{cases} 
1, & x\ge 0 \\
-1, & x<0 
\end{cases}$$
for $x\in[-1,1]$ is given by
$$\frac{4}{\pi} \sum_{n\textrm{ odd}} \frac{1}{n}\sin n\pi x.$$
Thus, for $x\in(0,1)$,
$$\frac{\pi}{4} = \sum_{n\textrm{ odd}} \frac{1}{n}\sin n\pi x,$$
as claimed.
It is also instructive to show for $x\in(0,1)$ that
$$\tanh^{-1}e^{i\pi x} - \tanh^{-1}e^{-i\pi x} = i\frac{\pi}{2},$$
from which the claim also follows.
Let $z = e^{i\pi x}$.
Note that
\begin{align*}
\tanh^{-1}z-\tanh^{-1}\zb &= \frac{1}{2}\left(\log\frac{1+z}{1-z}-\log\frac{1+\zb}{1-\zb}\right),
\end{align*}
where $\log$ gives the principal value of the natural logarithm.
Consider the ratio $(1+z)/(1-z)$.
The figure below makes it obvious that $1+z$ and $1-z$ can be thought of as antipodal points on a circle of radius $1$ centered at $z=1$.
This implies, by Thales' theorem, that $\arg(1+z)-\arg(1-z) = \pi/2$.
(Here we denote the principal value of the argument of $z$ as $\arg z$.)
Similarly,
$\arg(1+\zb)-\arg(1-\zb) = -\pi/2$.
Since
$|(1+z)/(1-z)| = |(1+\zb)/(1-\zb)|$
we find
\begin{align*}
\log\frac{1+z}{1-z}-\log\frac{1+\zb}{1-\zb} 
&= \left(\log\left|\frac{1+z}{1-z}\right|+i\frac{\pi}{2}\right)
- \left(\log\left|\frac{1+\zb}{1-\zb}\right|-i\frac{\pi}{2}\right)
= i\pi.
\end{align*}
The result follows.
It looks like @aschepler beat me to it, but the argument here is a bit different.

Figure 1. Geometry for $(1+z)/(1-z)$ and $(1+\zb)/(1-\zb)$.
A: I have just come across the following text in Elementary Applied Partial Differential Equations With Fourier Series And Boundary Value Problems by Haberman at page 102

The Fourier sine series of $f(x)=1$ can be obtained by term-by-term differentiation of the Fourier cosine series of $f(x)=x .$ Assuming that term-by-term differentiation of (3.4.5) is valid as claimed, it follows that
$$
1 \sim \frac{4}{\pi} \sum_{n \text { odd } \atop \text { only }} \frac{1}{n} \sin \frac{n \pi x}{L}
$$

