Tying to use Zangwill's EM book for multilayer R and T coeff

1. Feb 2, 2015

fluidistic

1. The problem statement, all variables and given/known data
I am trying to use Zangwill's book to calculate the transmisson (T) and reflexion (R) coefficients for an EM plane wave going through 3 layers. (the intermediate layer has a width d).
I am reading pages 604/605, he defines "N+1" as the number of layers in which layer 0 is half infinite (from say $x=-\infty$ to x=0) and layer N is also semi infinite and extends to positive infinite.
The book reaches a system of 2 equations with 2 unknows: $$\begin{bmatrix} 1+R \\ (1-R)Z_0^{-1} \end{bmatrix}=\prod _{j=1}^{N-1} \begin{bmatrix} \cos \phi _j && -i Z_j \sin \phi _j \\ -iZ_j ^{-1}\sin \phi _j && \cos \phi _j \end{bmatrix} \begin{bmatrix} T \\ TZ_N^{-1} \end{bmatrix}$$ where the 2 unknowns are R and T. In fact I don't understand why these are 2 unknows since when we know one of them we know both of them since R+T must equal 1.

2. The attempt at a solution
I have 3 layers so N+1=3, so N=2. So if I use the formula given in the book, the product goes from j=1 to N-1=1 so I have only 1 term for the product.
Then I manually solved the system of equations for T and reached that $$T=\frac{2n_1/(c \mu_0 )}{\left ( \frac{-in_2}{c\mu_1} \right ) \sin (n_2 d \omega /c) + \cos (n_2 d \omega /c) \left ( \frac{n_3}{c \mu_2} \right ) + \left ( \frac{n_1}{c\mu_0} \right ) [\cos (n_2 d \omega /c) -\frac{in_2}{c \varepsilon_1} \sin (n_2 d \omega /c) \frac{n_3}{c \mu _2}] }$$ where the notation is a bit misleading since $n_i$ is the refractive index of the i'th layer while $\varepsilon _i$ and $\mu _i$ corresponds to the i-1'th layers.
What I don't like about my result is that it depends on $\varepsilon _i$ and $\mu _i$ and given the problem statement I would have hoped to get all in terms of $n_i$ instead but I see no way of reaching that.
Then I'm told to calculate explicitely T and R for particular values of $n_1$, $n_2$ and $n_3$. So I don't know where I went wrong...

2. Feb 3, 2015

fluidistic

Assuming that the 3 mediums have the same permeability than free space ($\mu_0$), I reach that $$T=\frac{2n_1}{(n_1+n_3)\cos (n_2 d \omega /c)-i (n_2+n_3)\sin (n_2d \omega /c)}$$. However I see that this is a complex number which cannot be right. I am wondering whether the matrix formula from Zangwill's book that I posted here is well suited to solve my problem. Can someone confirm that I can reach what I want using that formula and that I probably made some arithmetic errors somewhere... Thanks.

3. Feb 3, 2015

fluidistic

Maybe I should take the absolute value of my result and square it up... I find the book extremely confusing about what is meant by "T" and "R". Apparently it is used for more than 1 physical concept...