Maximum value of n-term sum I'm working on a problem involving the acoustic transmission of a impact-generated shockwave through a layered material. In the following $Z$ refers to acoustic impedance and $v$ the impact velocity. The initial impact generates a pressure,
$$
p_{\text{in}} = v\cdot\frac{Z_1Z_2}{Z_1 + Z_2}.
$$
The transmission of the pressure wave from the $n$-th medium to the $(n+1)$-th reduces the amplitude by a factor
$$
\frac{2Z_{n+1}}{Z_n + Z_{n+1}}.
$$
Hence for an $n$-layer system, the pressure after the final layer is
$$
p_{\text{out}} = v\cdot2^{n-2}\frac{\displaystyle\prod_{k=1}^{n}Z_k}{\displaystyle\prod_{k=1}^{n-1}(Z_k + Z_{k+1})}
$$
My question is this, how do I find the maximum value of this function? That is to say, the number of layers and all the values of $Z$ can be chosen independently (where the physical range of $Z$ is $0$ to $100$), which choices give the maximum value?
Many thanks in advance for any help or hints offered,
Nick
 A: If you consider a stack of three materials with the impedances of the end two fixed, you should be able to prove that the best transmission comes from having the impedance of the center one the geometric mean of the impedances of the outer two.  Then if you have $n-1$ layers between $Z_1$ and $Z_2$, so there are $n$ interfaces, let $x=\sqrt[n]{\frac {Z_2}{Z_1}}$.  You would like layer $k$ to have impedance $Z_1x^k$ so each layer is the geometric mean of its neighbors.
A: To maximize this value, minimize its reciprocal
$$\tag1\frac1{p_{\text{out}}}=\frac1v2^{2-n}\frac1{Z_1}\prod_{k=2}^n \frac{Z_{k-1}+Z_k}{Z_k}=\frac1v2^{2-n}\frac1{Z_1}\prod_{k=2}^n \left(\frac{Z_{k-1}}{Z_k}+1\right).$$
For fixed $n$ and if we restrict the $Z_k$ to a closed interval $[a,b]$ with $0<a<b$, the minimum is attained because we consider a continuous function on a compact set. For $2\le r<n$, there are exactly two factors depending on $Z_r$, namely
$$\tag2 \left(\frac{Z_{r-1}}{Z_r}+1\right)\left(\frac{Z_{r}}{Z_{r+1}}+1\right)=\frac{Z_{r-1}}{Z_{r+1}}+\frac{Z_{r-1}}{Z_{r}}+\frac{Z_{r}}{Z_{r+1}}+1.$$
Recall that for positive $u,v,x$, we have $\frac ux+\frac xv=\left(\sqrt {\frac ux}-\sqrt {\frac xv}\right)^2+2\cdot\sqrt{\frac uv}\ge2\cdot\sqrt{\frac uv}$ with equality iff $\sqrt{\frac ux}=\sqrt {\frac xv} $ that is iff $x=\sqrt{uv}$.
Therefore, if $(1)$ and hence all instances of $(2)$ are minimal, the numbers $Z_1, \ldots, Z_n$ are in geometric progression, $Z_k=Z_1(1/q)^{k-1}$ for some $q>0$. Then $(1)$ becomes
$$\tag3\frac1{p_{\text{out}}}=\frac{2^{2-n}}v\frac1{Z_1}\prod_{k=2}^n \left(q+1\right)=\frac{2^{2-n}}v\cdot\frac1{Z_1}\cdot \left(q+1\right)^{n-1}=\frac{2^{2-n}}v\cdot\frac1{Z_1}\cdot \left(\sqrt[n-1]{\frac{Z_1}{Z_n}}+1\right)^{n-1}.$$
For fixed $n$ and $Z_1$, this expression is clearly minimal if $Z_n$ is maximal, hence we let $Z_n=b$ and rewrite as
$$\tag4\frac1{p_{\text{out}}}=\frac{2^{2-n}}v\cdot\frac1{Z_1}\cdot \left(\sqrt[n-1]{\frac{Z_1}{b}}+1\right)^{n-1}=\frac{2^{2-n}}v\cdot \left(\sqrt[n-1]{\frac{1}{b}}+\sqrt[n-1]{\frac{1}{Z_1}}\right)^{n-1},$$
which not unexpectedly, is minimal as $Z_1$ is maximal so that with $Z_1=b$ we obtain
$$\tag5 \frac1{p_{\text{out}}}=\frac{2^{2-n}}v\cdot \left(\sqrt[n-1]{\frac{1}{b}}+\sqrt[n-1]{\frac{1}{b}}\right)^{n-1}=\frac{2^{2-n}}v\cdot\frac{2^{n-1}}{b}=\frac2{vb}$$
or $$ p_{\text{out}}=\frac{vb}2.$$
This does not depend on $n$, which is surprising - are the damping factors per layer correct?
