Impedance Matching in a String I was reading 121st page of HJ Pain's Vibrations and waves and I saw this with the derivation of impedance matching on a string :-   
The conditions derived were:


*

*The impedance of coupling string be $\sqrt {Z_1Z_3}$ and

*Length of coupling medium be $\lambda/4$ where $\lambda$ is the wavelength of wave in the coupling medium.


Now, I am sure reflection will happen at $x=0$ . And reflective intensity coefficient is not $0$ until $Z_1=Z_2$.
So, given that $Z_2= \sqrt {Z_1Z_3}$ , some energy will be reflected at $x=0$ still.
Although, I understand the math and that there will be destructive interference of the reflected wave in the conditions Pain has imposed on the medium $2$; I don't understand how energy of reflected wave will become $0$ and entire energy be transmitted forward to medium $3$  ?? 
 A: So this is the whole point of waves, if they couldn't do this then we would never observe them and would never describe the world that way.
Suppose you cut a slit through a sheet of black paper, light shines through it to illuminate some band of width $w$. You might even see little fringes around that band but let's ignore those. Cover up the slit and then make a new slit at some distance $d<w$ and you will see another band which would overlap with the first band. Uncover the first and in the region of overlap you may see strange rainbow patterns;  filter the light so that it is one color and you will see that there are spaces on the observation screen where if only one slit is open they are illuminated, or if both are open this space is dark.
So more possibilities for reflection with waves may not mean more reflection. When the incoming wave is coming to the interface between $Z_1$ and $Z_2$ if the impedance has been properly matched then the wave wants to reflect but the reflected wave destructively interferes with a transmitted wave from the opposite direction.
One can provide an analogy that is flawed and incomplete: if you imagine driving a car, you could find yourself in a situation where traffic lights all seem to turn green just when you arrive at then so that you never have to stop. In the same way, the incoming wave his this interface between $Z_1,Z_2$ but at precisely the time when the standing wave in the $Z_2$ section has perfectly readied the boundary so that everything the wave wants to do to that interface happens without resistance and the wave just passes through.
Quick derivation
So we have one wave going from a medium $x < 0$ where the wave speed is $v_0$ to another medium $x > 0$ where the wave speed is $v_1$, we say that it comes in with unit amplitude and then there are reflection and transmission amplitudes $\rho, \tau$: $$
y(x, t) = e^{i\omega t}\cdot \begin{cases}
e^{-i k_1 x} + \rho~e^{i k_1 x}& x < 0\\
\tau~e^{- i k_2 x} & x > 0
\end{cases}
$$
To get continuity we need $y(0, t)$ to be the same between both cases, which is given if $1 + \rho = \tau.$ In addition we'd like differentiability there, $k_1 (1 - \rho) = k_2 \tau.$ So $$\begin{align}\tau &= \frac{2k_1}{k_1 + k_2},&
\rho &= \frac{k_1 - k_2}{k_1 + k_2}.
\end{align}$$
Differentiability however gives us something else, too, which is that $$k_1(1 +\rho)(1-\rho) = k_1 (1 - \rho^2) = k_2 \tau^2.$$Now for these sorts of wave equations typically a Lagrangian looks like $\mathcal L \propto \frac12 c^{-2} \dot y^2 - \frac12~(y')^2$ leading to the wave equation of motion $c^{-2} \ddot y - y'' = 0.$ But the Lagrangian also tells us that there is a conserved quantity here, namely $$\partial_t\left(c^{-2} \frac12\dot y^2 + \frac12 (y')^2 \right) = -\partial_x (\dot y~y').$$
For a plane wave $\alpha e^{i(\omega t \mp k x)}$ the energy-current inside the right hand side looks like $\dot y~y'=\pm \omega~k~y^2,$ so with some hand-waving that is technically not justified (you would have to fill in the proportionality factor for $\mathcal L$ and make sure that it's the same on both sides of the medium) you find that $k_1 (1 - \rho^2) = k_2 \tau^2$ is an expression stating that the energy leaving on the right hand side is exactly equal to the energy coming in on the left-hand side minus the energy leaving on the left-hand side: no energy is accumulating at $x=0.$
The impedance matching situation can then be looked at as simply two of these reflection/transmission barriers, in sequence, separated by a distance $L$. Once you know that one such barrier conserves energy, two such barriers must as well.
A: 
I don't understand how energy of reflected wave will become 0 and
  entire energy be transmitted forward to medium 3?

Imagine that there was no medium $3$: just medium $1$ and medium $2$.
Since $Z_1 \ne Z_2$, we would expect some reflection at the boundary between  medium $1$ and medium $2$. We'll call this reflected wave $W_1$.
Now, let's add medium $3$ at $\lambda/4$ from medium $1$. Again, since $Z_2 \ne Z_3$, we would expect some reflection at the boundary between medium $2$ and medium $3$. When that reflected wave reaches the boundary between medium $1$ and medium $2$, part of it will be reflected and part of it, let's call it $W_2$, will go through, into medium $1$, and join the originally reflected wave $W_1$.
It seems pretty obvious that, if $W_1$ and $W_2$ have equal amplitudes and are out of phase, there won't be any wave reflected back to medium $1$. 
The above explanation is somewhat simplified, particularly, on the part of the reflections between the two boundaries, but we know that, given appropriate relationships between the impedances, it works and you don't seem to have any issues with the mathematical proof of it.    
