Light in Planar Stratified Media - part 1

ECE 5368/6358                                            han q le - copyrighted
Use solely for students registered for UH ECE 6358/5368 during courses - DO NOT distributed (copyrighted materials)

Part 1

3. The transfer matrix approach for boundary problems

3.1 Introduction

However, what if we have a problem like this:

The layers can number in the 100’s. The solution in each layer needs not be plane wave if there is graded index for example. We will see that it is quite hairy to handle the boundary conditions between these many layers. Here, we will use a far more convenient mathematical technique to handle the problem.

3.2 Description of the concept and general formulism

3.2.1 Boundary value vector

We will use the 2-medium TE reflection and refraction above to introduce the concept. Let’s start at these expressions of the field:
                          (Subscript[E, 1])= (Subscript[E, inc]) +(Subscript[E, refl])                                                   (2.5.1a)
where:                (Subscript[E, inc])= (OverHat[y])    (e^(i  (Subscript[k, 1]) x )) (e^(i  (β z -ω t )))                                    (2.2.2a)      
and:                   (Subscript[E, refl])=  (OverHat[y]) r  (e^(-i  (Subscript[k, 1]) x ))(e^(i  (β z -ω t )))                                  (2.5.1a,b)      
                         (Subscript[E, 2])=    (OverHat[y])  t  (e^(i  (Subscript[k, 2]) x ))(e^(i  (β z -ω t )))                                    (2.5.2)

But now we must make a generalization:
                                       (Subscript[E, 1])= (OverHat[y])  (Subscript[F, 1])[x](e^(i  (β z -ω t )))                        (3.2.1)
                                       (Subscript[E, 2])= (OverHat[y])  (Subscript[F, 2])[x](e^(i  (β z -ω t )))                        (3.2.2)
The reason is that we while (Subscript[F, 1])[x] and (Subscript[F, 2])[x] are simple functions of (e^(i  (Subscript[k, 1]) x )), (e^(-i  (Subscript[k, 1]) x ))and (e^(i  (Subscript[k, 2]) x ))in this case, we are using a method of generality that deals with complex structure in which, the wave solution along x can be more complicated than just those functions that we use above. The only thing we know for sure to be the same for all is (e^(i  (β z -ω t ))).

Next step: we need the H field, given by:    ∇×E+(μ/c)((∂ H)/(∂ t)) = 0

∇×(Subscript[E, 1])= Det(({{(OverHat[x]), (OverHat[y]), (OverHat[z])}, {(∂_x), (∂_y), (∂_z)}, {(Subscript[E, 1,x]), (Subscript[E, 1,y]), (Subscript[E, 1,z])}})) = Det(({{(OverHat[x]), (OverHat[y]), (OverHat[z])}, {(∂_x), (∂_y), (∂_z)}, {0,  (Subscript[F, 1])[x] (e^(i  β z )), 0}})) (e^(-i  ω t ))      (3.2.3)
                      = -(OverHat[x])  (∂_z) ((Subscript[F, 1])[x] (e^(i  β z )))  +(OverHat[z])  (∂_x) ((Subscript[F, 1])[x] (e^(i  β z )))  (e^(-i  ω t )) 
                      = -(OverHat[x])  i β (Subscript[F, 1])[x]  (e^(i  β z )) +(OverHat[z])  (∂_x) (Subscript[F, 1])[x]  (e^(i  β z ))) (e^(-i  ω t )) 
Equating this with:        ∇×(Subscript[E, 1])=- (μ/c)((∂ (Subscript[H, 1]))/(∂ t)) =i μ(ω/c)(Subscript[H, 1]) =i (Subscript[μ, 1]) (Subscript[k, 0]) (Subscript[H, 1])                   
Or:                       (Subscript[μ, 1]) (Subscript[H, 1])= (({{(OverHat[x]), (OverHat[y]), (OverHat[z])}})) (1/(Subscript[k, 0]))(({{-β (Subscript[F, 1])[x]}, {0}, {-i (∂_x)(Subscript[F, 1])[x]}}))(e^(i (β z-ω t)))            (3.2.4)

We have a similar equation:
                              (Subscript[μ, 2]) (Subscript[H, 2])=  (({{(OverHat[x]), (OverHat[y]), (OverHat[z])}}))(1/(Subscript[k, 0]))(({{-β (Subscript[F, 2])[x]}, {0}, {-i (∂_x)(Subscript[F, 2])[x]}}))(e^(i (β z-ω t)))          (3.2.5)

The boundary condition dictates that E and H tangential are continous, and μ H normal component is continuous. We can express the boundary condition in a vector matrix form: 
                                                  (Subscript[(Subscript[(({{(Subscript[E, y])}, {(Subscript[H, z])}, {(Subscript[μ, 1]) (Subscript[H, x])}}))|, med 1])=(({{(Subscript[E, y])}, {(Subscript[H, z])}, {(Subscript[μ, 2]) (Subscript[H, x])}}))|, med 2])            (3.2.6)
But from above, we see that μ (Subscript[H, x]) and (Subscript[E, y]) are related:
                                                       μ (Subscript[H, x]) =-(β/(Subscript[k, 0])) (Subscript[E, y])                              (3.2.7)
Hence, the 1st and the last condition of (3.2.6) are the same. In other words, of the three terms, (({{(Subscript[E, y])}, {(Subscript[H, z])}, {(Subscript[μ, 1]) (Subscript[H, x])}})), only 2 are independent. Hence we keep only the top two independent terms:  (({{(Subscript[E, y])}, {(Subscript[H, z])}}))
Thus, the boundary condition becomes:
                                       (Subscript[(Subscript[(({{(Subscript[E, y])}, {(Subscript[H, z])}}))|, med 1])=(({{(Subscript[E, y])}, {(Subscript[H, z])}}))|, med 2])            (3.2.8a) 
                       (({{(Subscript[F, 1])[x=0]}, {(1/(Subscript[μ, 1]))(∂_x)(Subscript[F, 1])[x=0]}}))=(({{(Subscript[F, 2])[x=0]}, {(1/(Subscript[μ, 2]))(∂_x)(Subscript[F, 2])[x=0]}}))            (3.2.8b)
Since we can assume (Subscript[μ, 1])=(Subscript[μ, 2]), it becomes:
                          (({{(Subscript[F, 1])[x=0]}, {(∂_x)(Subscript[F, 1])[x=0]}}))=(({{(Subscript[F, 2])[x=0]}, {(∂_x)(Subscript[F, 2])[x=0]}}))                    (3.2.9)
which simply says that the x-dependent wavefunction and its derivative must be continuous across the interface, or smoothly continuous.

Summary: For TE polarization, the E field function F[x] perpendicular to the planar layers must be smoothly continuous.

Why would this formulism, in terms of the column vector (({{F[x]}, {F'[x]}})), which is continuous across a boundary for TE is useful?

The reason is that it allows us to use the transfer matrix method:

3.2.2 Transfer matrix

As shown above, if we know, say (({{(Subscript[F, 2])[x]}, {(Subscript[F, 2])'[x]}})) at one boundary x=(Subscript[x, 1]), we can use a transfer matrix  S=(({{(Subscript[S, 11]), (Subscript[S, 12])}, {(Subscript[S, 21]), (Subscript[S, 22])}})) to obtain (({{(Subscript[F, 2])[x]}, {(Subscript[F, 2])'[x]}})) at the next boundary x=(Subscript[x, 2]) and so on:
                                      (({{(Subscript[F, 2])[x=(Subscript[x, 2])]}, {(Subscript[F, 2])'[x=(Subscript[x, 2])]}}))=(({{(Subscript[S, 11]), (Subscript[S, 12])}, {(Subscript[S, 21]), (Subscript[S, 22])}})) (({{(Subscript[F, 2])[x=(Subscript[x, 1])]}, {(Subscript[F, 2])'[x=(Subscript[x, 1])]}}))            (3.2.10)
Each layer, or segment has its own S matrix, which can be obtained from the wave solutions of the segment as shown later. The key idea here is that we don’t have to keep track of E and H for each layer, but can connect the 1st and last layer through a simple matrix product:
                    (({{(Subscript[F, n])[x=(Subscript[x, n-1])]}, {(Subscript[F, n])'[x=(Subscript[x, n-1])]}}))=(Subscript[S, Q]) ⋯ (Subscript[S, B]) (Subscript[S, A]) (({{(Subscript[F, 2])[x=(Subscript[x, 1])]}, {(Subscript[F, 2])'[x=(Subscript[x, 1])]}}))                     (3.2.11)

3.2.3 Transfer matrix of each segment

To obtain the S matrix for each layer, we denote (Subscript[ψ, 1]) and (Subscript[ψ, 2]) be the basis function of a segment. Each segment will have its own basis that is different from each other. The choise of the basis function depends on the problem itself: one should choose a basis that is a natural solution to the problem at hand.
Any wave solution in that segment can be expressed in terms of the basis functions:
                             F[x]= a  (Subscript[ψ, 1])[x]+b (Subscript[ψ, 2])[x] =(({{(Subscript[ψ, 1])[x], (Subscript[ψ, 2])[x]}}))  . (({{a}, {b}}))     (3.2.12)
 hence:                  F'[x]=(({{(Subscript[ψ, 1])'[x], (Subscript[ψ, 2])'[x]}}))  . (({{a}, {b}}))                                 (3.2.13)
 and:                      (({{F[x]}, {F'[x]}}))=(({{(Subscript[ψ, 1])[x], (Subscript[ψ, 2])[x]}, {(Subscript[ψ, 1])'[x], (Subscript[ψ, 2])'[x]}})) (({{a}, {b}}))                               (3.2.14)
 At a point x=(Subscript[x, 0]):           (({{F[(Subscript[x, 0])]}, {F'[(Subscript[x, 0])]}}))=(({{(Subscript[ψ, 1])[(Subscript[x, 0])], (Subscript[ψ, 2])[(Subscript[x, 0])]}, {(Subscript[ψ, 1])'[(Subscript[x, 0])], (Subscript[ψ, 2])'[(Subscript[x, 0])]}})) (({{a}, {b}}))                     (3.2.15)
                                  (((({{(Subscript[ψ, 1])[(Subscript[x, 0])], (Subscript[ψ, 2])[(Subscript[x, 0])]}, {(Subscript[ψ, 1])'[(Subscript[x, 0])], (Subscript[ψ, 2])'[(Subscript[x, 0])]}})))^(-1))(({{F[(Subscript[x, 0])]}, {F'[(Subscript[x, 0])]}}))= (({{a}, {b}}))                    (3.2.16)
Hence:        (({{F[x]}, {F'[x]}}))=(({{(Subscript[ψ, 1])[x], (Subscript[ψ, 2])[x]}, {(Subscript[ψ, 1])'[x], (Subscript[ψ, 2])'[x]}})) (((({{(Subscript[ψ, 1])[(Subscript[x, 0])], (Subscript[ψ, 2])[(Subscript[x, 0])]}, {(Subscript[ψ, 1])'[(Subscript[x, 0])], (Subscript[ψ, 2])'[(Subscript[x, 0])]}})))^(-1))(({{F[(Subscript[x, 0])]}, {F'[(Subscript[x, 0])]}}))     (3.2.17)
                                  (({{F[x]}, {F'[x]}}))=S[x;(Subscript[x, 0])] (({{F[(Subscript[x, 0])]}, {F'[(Subscript[x, 0])]}}))                                 (3.2.18)
where:               S[x;(Subscript[x, 0])]=(({{(Subscript[ψ, 1])[x], (Subscript[ψ, 2])[x]}, {(Subscript[ψ, 1])'[x], (Subscript[ψ, 2])'[x]}})) (((({{(Subscript[ψ, 1])[(Subscript[x, 0])], (Subscript[ψ, 2])[(Subscript[x, 0])]}, {(Subscript[ψ, 1])'[(Subscript[x, 0])], (Subscript[ψ, 2])'[(Subscript[x, 0])]}})))^(-1))             (3.2.19)

We see that if we know the value of (({{F[x]}, {F'[x]}})) at one point x=(Subscript[x, 0]), we can obtain (({{F[x]}, {F'[x]}})) at anywhere within the segment for which ({{{(Subscript[ψ, 1])[x],, (Subscript[ψ, 2])[x]}}}) are the basis functions. In other words, S[x;(Subscript[x, 0])] gives us the solution anywhere if we are given the function values at (Subscript[x, 0]). It is like a “kernel” function.

But often, we are not interested in the field within a segment, but only at the boundary, then, the S-matrix is not a function of position x but only at the boundary points:
                     S[(Subscript[x, 1]);(Subscript[x, 0])]=(({{(Subscript[ψ, 1])[(Subscript[x, 1])], (Subscript[ψ, 2])[(Subscript[x, 1])]}, {(Subscript[ψ, 1])'[(Subscript[x, 1])], (Subscript[ψ, 2])'[(Subscript[x, 1])]}})) (((({{(Subscript[ψ, 1])[(Subscript[x, 0])], (Subscript[ψ, 2])[(Subscript[x, 0])]}, {(Subscript[ψ, 1])'[(Subscript[x, 0])], (Subscript[ψ, 2])'[(Subscript[x, 0])]}})))^(-1))≡(Subscript[S, segment 1])         (3.2.20)

Note:

FullSimplify[(({{(Subscript[ψ, 1])[x], (Subscript[ψ, 2])[x]}, {(Subscript[ψ, 1])'[x], (Subscript[ψ, 2])'[x]}})) . Inverse[(({{(Subscript[ψ, 1])[(Subscript[x, 0])], (Subscript[ψ, 2])[(Subscript[x, 0])]}, {(Subscript[ψ, 1])'[(Subscript[x, 0])], (Subscript[ψ, 2])'[(Subscript[x, 0])]}}))] ]

S=(1/(Det[(Subscript[P, 0])]))(({{Det|(({{(Subscript[ψ, 1])(x), (Subscript[ψ, 2])(x)}, {(Subscript[ψ, 1])'[(Subscript[x, 0])], (Subscript[ψ, 2])'[(Subscript[x, 0])]}}))|, Det|(({{(Subscript[ψ, 1])((Subscript[x, 0])), (Subscript[ψ, 2])((Subscript[x, 0]))}, {(Subscript[ψ, 1])(x), (Subscript[ψ, 2])(x)}}))|}, {Det|(({{(Subscript[ψ, 1])'[x], (Subscript[ψ, 2])'[x]}, {(Subscript[ψ, 1])'[(Subscript[x, 0])], (Subscript[ψ, 2])'[(Subscript[x, 0])]}}))|, Det|(({{(Subscript[ψ, 1])((Subscript[x, 0])), (Subscript[ψ, 2])((Subscript[x, 0]))}, {(Subscript[ψ, 1])'[x], (Subscript[ψ, 2])'[x]}}))|}}))

Summary: If we know the S matrix of a layer, and the function and its derivative (function vector) at one point, we can dot product to find the function vector anywhere. Specifically, if we know the value at one boundary, we can obtain the value at the other boundary without concern for the function within the layer.

4. Example application of the transfer matrix method: reflection and refraction revisited

4.1 TE case

The formulism above is of general use and is not just for the case of many layers. Let’s apply this formulism to a single interface. First let’s review the TE case

Let’s take a look at (3.2.8) and (3.2.9) again:
                                       (Subscript[(Subscript[(({{(Subscript[E, y])}, {(Subscript[H, z])}}))|, med 1])=(({{(Subscript[E, y])}, {(Subscript[H, z])}}))|, med 2])            (3.2.8a) (4.1.1a)
                       (({{(Subscript[F, 1])[x=0]}, {(1/(Subscript[μ, 1]))(∂_x)(Subscript[F, 1])[x=0]}}))=(({{(Subscript[F, 2])[x=0]}, {(1/(Subscript[μ, 2]))(∂_x)(Subscript[F, 2])[x=0]}}))       (3.2.8b) (4.1.1b)
Or:                         (({{(Subscript[F, 1])[x=0]}, {(∂_x)(Subscript[F, 1])[x=0]}}))=(({{(Subscript[F, 2])[x=0]}, {(∂_x)(Subscript[F, 2])[x=0]}}))            (3.2.9) (4.1.2)

Let’s apply (4.1.2) to medium 1 and then medium 2:
                            (({{F[x]}, {F'[x]}}))=(({{(Subscript[ψ, 1])[x], (Subscript[ψ, 2])[x]}, {(Subscript[ψ, 1])'[x], (Subscript[ψ, 2])'[x]}})) (({{a}, {b}}))             (3.2.14) (4.1.3)

First, for medium 1, we choose:
                            (Subscript[ψ, 1])[x]=(e^(i (Subscript[k, 1]) x))  ; (Subscript[ψ, 2])[x]=(e^(-i (Subscript[k, 1]) x))                    (4.1.4)
Then:               (Subscript[(({{F[x]}, {F'[x]}}))|, med 1])=(({{(e^(i (Subscript[k, 1]) x)), (e^(-i (Subscript[k, 1]) x))}, {i (Subscript[k, 1]) (e^(i (Subscript[k, 1]) x)), -i (Subscript[k, 1]) (e^(-i (Subscript[k, 1]) x))}})) (({{a}, {b}}))       (4.1.5)

Do the same thing for medium 2:
                        (Subscript[(({{F[x]}, {F'[x]}}))|, med 2])=(({{(e^(i (Subscript[k, 2]) x)), (e^(-i (Subscript[k, 2]) x))}, {i (Subscript[k, 2]) (e^(i (Subscript[k, 2]) x)), -i (Subscript[k, 2]) (e^(-i (Subscript[k, 2]) x))}})) (({{c}, {d}}))       (4.1.6)

Now, applying (4.1.2) at the boundary, which is where x=0:
          (Subscript[(({{F[x]}, {F'[x]}}))|, med 1
x=0])=(({{1, 1}, {i (Subscript[k, 1]), -i (Subscript[k, 1]) }})) (({{a}, {b}})) =(Subscript[(({{F[x]}, {F'[x]}}))|, med 2
x=0])=(({{1, 1}, {i (Subscript[k, 2]), -i (Subscript[k, 2]) }})) (({{c}, {d}}))    (4.1.7a)
Or:                    (({{1, 1}, {i (Subscript[k, 1]), -i (Subscript[k, 1]) }})) (({{a}, {b}})) =(({{1, 1}, {i (Subscript[k, 2]), -i (Subscript[k, 2]) }})) (({{c}, {d}}))        (4.1.7b)

What should we choose for (({{a}, {b}})) and (({{c}, {d}}))?
Remember that we choose the solution for waves in medium 1 as:
                                (Subscript[E, 1])= (Subscript[E, inc]) +(Subscript[E, refl])                                                   (2.1.7)
where:                     (Subscript[E, inc])= (OverHat[y])    (e^(i  (Subscript[k, 1]) x )) (e^(i  (β z -ω t )))                                    (2.1.8)      
and:                          (Subscript[E, refl])=  (OverHat[y]) (Subscript[b, y])  (e^(-i  (Subscript[k, 1]) x ))(e^(i  (β z -ω t ))) =  (OverHat[y]) r  (e^(-i  (Subscript[k, 1]) x ))(e^(i  (β z -ω t )))    (2.2.12)     
Hence:                       (Subscript[E, 1,y])=  (({{(e^(i  (Subscript[k, 1]) x )), (e^(-i  (Subscript[k, 1]) x ))}}))  . (({{1}, {r}}))           (4.1.8)
or:                                     (({{a}, {b}}))= (({{1}, {r}}))                                 (4.1.9)
and clearly for region 2:
                               (Subscript[E, 2,y])=  (({{(e^(i  (Subscript[k, 2]) x )), (e^(-i  (Subscript[k, 2]) x ))}}))  . (({{t}, {0}}))           (4.1.10)    
or:                                     (({{c}, {d}}))= (({{t}, {0}}))                               (4.1.11)

Hence  (4.1.7b) becomes:      
                       (({{1, 1}, {i (Subscript[k, 1]), -i (Subscript[k, 1]) }})) (({{1}, {r}})) =(({{1, 1}, {i (Subscript[k, 2]), -i (Subscript[k, 2]) }})) (({{t}, {0}}))        (4.1.12)

Solve[(({{1, 1}, {I (Subscript[k, 1]), -I (Subscript[k, 1]) }})) .(({{1}, {r}})) == (({{1, 1}, {I (Subscript[k, 2]), -I (Subscript[k, 2]) }})) .(({{t}, {0}})),{r,t}]

The result is:            r=(((Subscript[k, 1])-(Subscript[k, 2]))/((Subscript[k, 1])+(Subscript[k, 2])))    ; t=((2 (Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))                     (4.1.13)

Simplify[{{r->-(((Subscript[k, 2])-(Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2]))),1-(((Subscript[k, 2])-(Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))}} /. (Subscript[k, 1])->(Subscript[n, 1]) (Subscript[k, 0]) Cos[(Subscript[θ, i])]   /. (Subscript[k, 2])->(Subscript[n, 2]) (Subscript[k, 0]) Cos[(Subscript[θ, r])] ]

Note the 2 cases:
If (Subscript[k, 2])>(Subscript[k, 1]),  (from low index to high index)   r=(((Subscript[k, 1])-(Subscript[k, 2]))/((Subscript[k, 1])+(Subscript[k, 2])))<0 the reflection has 180 phase difference from the incident (analogy, rope hits a brick wall) 
If (Subscript[k, 1])>(Subscript[k, 2]),  (from high index to low index)  r=(((Subscript[k, 1])-(Subscript[k, 2]))/((Subscript[k, 1])+(Subscript[k, 2])))>0 the reflection has the same phase as the incident.

4.2 HW: reflection and refraction for TM case

Now, let’s appy to the case of transverse magnetic: H is polarized perpendicular to the plane of incident and E is in the plane of incident.

We will need to go through the Maxwell boundary condition again, but this time we choose the wave solution of interest to be H instead of E, because it is simpler with only (Subscript[H, y]) component:
                                      (Subscript[H, 1])= (Subscript[H, inc]) +(Subscript[H, refl])                                                (4.2.1a)
where:                            (Subscript[H, inc])= (OverHat[y])    (e^(i  (Subscript[k, 1]) x )) (e^(i  (β z -ω t )))= (OverHat[y])    F[x] (e^(i  (β z -ω t )))        (4.2.1b)      
and:                                (Subscript[H, refl])=  (OverHat[y]) (Subscript[r, H;TM])  (e^(-i  (Subscript[k, 1]) x ))(e^(i  (β z -ω t )))                           (4.2.1c)     
hence:                            (Subscript[H, 1])=  (OverHat[y]) ((e^(i  (Subscript[k, 1]) x ))+(Subscript[r, H;TM])  (e^(-i  (Subscript[k, 1]) x )))(e^(i  (β z -ω t )))               (4.2.1d)   
hence:                            (Subscript[H, 1;y])=    (({{(e^(i  (Subscript[k, 1]) x )), (e^(-i  (Subscript[k, 1]) x ))}}))  . (({{1}, {(Subscript[r, H;TM])}}))(e^(i  (β z -ω t )))         (4.2.1e)    
and:                                (Subscript[H, 2])=  (OverHat[y]) (Subscript[t, H;TM])  (e^(i  (Subscript[k, 2]) x ))(e^(i  (β z -ω t )))                                (4.2.2a)     
hence:                            (Subscript[H, 2;y])=    (({{(e^(i  (Subscript[k, 2]) x )), (e^(-i  (Subscript[k, 2]) x ))}}))  . (({{(Subscript[t, H;TM])}, {0}}))(e^(i  (β z -ω t )))          (4.2.2b)

Note that we label (Subscript[r, H;TM]) and  (Subscript[t, H;TM]) to indicate that these coefficients are for TM polarization and for H component, which are NOT the same as those for TE and E component. They are of different nature.

Now, applying these conditions at the boundary:
                                                    (Subscript[(OverVector[E]), //;1])=(Subscript[(OverVector[E]), //;2])  ;                                (2.2.1a)
                                                   (Subscript[(OverVector[H]), //;1])=(Subscript[(OverVector[H]), //;2])  ;                                 (2.2.1b)
                                                (Subscript[ϵ, 1]) (Subscript[E, ⊥;1])=(Subscript[ϵ, 2])(Subscript[E, ⊥;2])  ;                             (2.2.1c)        
                                                (Subscript[μ, 1])(Subscript[H, ⊥;1])=(Subscript[μ, 2])(Subscript[H, ⊥;2])  ;                           (2.2.1d)

Write them out explicitly:
                                                    (Subscript[E, z;1])=(Subscript[E, z;2])  ;                                (4.2.3a)
                                                   (Subscript[H, y;1])=(Subscript[H, y;1])  ;                                (4.2.3b)
                                                (Subscript[ϵ, 1]) (Subscript[E, x;1])=(Subscript[ϵ, 2])(Subscript[E, x;2])  ;                            (4.2.3c)

We need to obtain E field, which is from:
                                        (1/c)ϵ ((∂ (Overscript[E, ->]))/(∂ t))  = ∇×(Overscript[H, ->])  
Or:          ((-i ω)/c)ϵ (Overscript[E, ->])   = ∇×(Overscript[H, ->])  =  (({{(OverHat[x]), (OverHat[y]), (OverHat[z])}, {(∂_x), (∂_y), (∂_z)}, {0, F[x], 0}})) = (({{(OverHat[x]), (OverHat[y]), (OverHat[z])}}))(({{-i β F[x]}, {0}, {(∂_x)F[x]}}))(e^(i (β z-ω t)))
               (Subscript[k, 0])  (Overscript[E, ->])  =(1/ϵ) (({{(OverHat[x]), (OverHat[y]), (OverHat[z])}}))(({{β F[x]}, {0}, {i (∂_x)F[x]}}))(e^(i (β z-ω t)))                        (4.2.4)

Clearly, we don’t need the (Subscript[E, x]) condition, because it is the same as (3.3.12b). Hence, it boils down to:
                                           (Subscript[(Subscript[(({{(Subscript[H, y])}, {(Subscript[E, z])}}))|, med 1])=(({{(Subscript[H, y])}, {(Subscript[E, z])}}))|, med 2])                    (4.2.5) 
Or:                              (({{(Subscript[F, 1])[x=0]}, {(1/(Subscript[ϵ, 1]))(∂_x)(Subscript[F, 1])[x=0]}}))=(({{(Subscript[F, 2])[x=0]}, {(1/(Subscript[ϵ, 2]))(∂_x)(Subscript[F, 2])[x=0]}}))       (4.2.6)
The key difference here is that (Subscript[ϵ, 1])≠(Subscript[ϵ, 2]), hence, the boundary condition becomes:
                          (({{(Subscript[F, 1])[x=0]}, {(∂_x)(Subscript[F, 1])[x=0]}}))=(({{1, 0}, {0, ((Subscript[ϵ, 1])/(Subscript[ϵ, 2]))}}))(({{(Subscript[F, 2])[x=0]}, {(∂_x)(Subscript[F, 2])[x=0]}}))             (4.2.7a)            
or:                      (({{(Subscript[F, 1])[x=0]}, {(∂_x)(Subscript[F, 1])[x=0]}}))=M (({{(Subscript[F, 2])[x=0]}, {(∂_x)(Subscript[F, 2])[x=0]}}))             (4.2.7b)            
where:                                    M=(({{1, 0}, {0, ((Subscript[ϵ, 1])/(Subscript[ϵ, 2]))}}))                          (4.2.7c)

Substitute similarly to (4.1.12), we obtain:
                       (({{1, 1}, {i (Subscript[k, 1]), -i (Subscript[k, 1]) }})) (({{1}, {(Subscript[r, H;TM])}})) =(({{1, 0}, {0, ((Subscript[ϵ, 1])/(Subscript[ϵ, 2]))}}))(({{1, 1}, {i (Subscript[k, 2]), -i (Subscript[k, 2]) }})) (({{(Subscript[t, H;TM])}, {0}}))        (3.3.9)

Solve[ (({{1, 1}, {I (Subscript[k, 1]), -I (Subscript[k, 1]) }})). (({{1}, {(Subscript[r, H;TM])}})) ==(({{1, 0}, {0, ((Subscript[ϵ, 1])/(Subscript[ϵ, 2]))}})).(({{1, 1}, {I (Subscript[k, 2]), -I (Subscript[k, 2]) }})) .(({{(Subscript[t, H;TM])}, {0}}))  ,{(Subscript[r, H;TM]),(Subscript[t, H;TM]) }]

Thus:                 (Subscript[r, H;TM])=(((Subscript[k, 1]) (Subscript[ϵ, 2])-(Subscript[k, 2]) (Subscript[ϵ, 1]))/((Subscript[k, 2]) (Subscript[ϵ, 1])+(Subscript[k, 1]) (Subscript[ϵ, 2])))  ;    (Subscript[t, H;TM])->((2(Subscript[k, 1]) (Subscript[ϵ, 2]))/((Subscript[k, 2]) (Subscript[ϵ, 1])+(Subscript[k, 1]) (Subscript[ϵ, 2])))                 (3.3.10)

4.3 Brewster’s angle and glare reducing polarizer (HW)

4.3.1 Homework

In HW, we will study what happens when TM light is incident at certain angle, known as Brewster’s angle. And we will discuss the implication of this effect on application such as below:

Sketch a drawing explaining the polarization effect above. (explaning what polarizer you use and what orientation you set to obtain the picture without glare in each case).

Here is a demonstration of TM: Vary the incident angle and describe what you observe. Compare with the previous case for TE. Also, vary the index of refraction and see what happens to the Brewster’s angle.

Short code version

Manipulate[   λ=1.; ω=2 π ; ϵ2=(((n+I κ))^2) ; k0=2 π/λ ; β=k0 Sin[θ]; 
k1=k0 Cos[θ] ;k2=k0 (Sqrt[(((n+I κ))^2) -((Sin[θ])^2) ])  ; w1=Min[8 Cos[θ],3] ;
  Crefr=((Re[k2])/(Sqrt[(k0^(2 ))((Sin[θ])^2)+((Re[k2])^2)])) ;w2=(w1/(Cos[θ]))Crefr   ;
  Srefr=(( k0 Sin[θ])/(Sqrt[(k0^(2 ))((Sin[θ])^2)+((Re[k2])^2)]))  ;
r=  ((ϵ2 k1-k2)/(ϵ2 k1+k2)) ; tr=   ((2 ϵ2 k1)/(ϵ2 k1+k2)) ;

U=DensityPlot[ If[y≥0, 
Re[ UnitBox[ (x  Cos[θ]+y Sin[θ])/w1] * Exp[I* (β x  -y k1 -ω  t)]
                   +UnitBox[(x  Cos[θ]-y Sin[θ])/w1] * r  Exp[I* (β x +y k1 -ω t ) ]]
,UnitBox[ (x  Crefr+y Srefr)/w2 ] *Re[tr* Exp[I* (x  β -y k2 -ω t)] ]
] ,{x,-4,4},{y,-2.5,5.5}
,PlotPoints->{60,80},PlotRange-> All,Mesh-> False, ColorFunction->"Rainbow"] ;
Show[U,Graphics[{White,Opacity[0.25],Line[{{-4,0},{4,0}}] }] ]
, {t,0,1}, {{θ, 0.926},0,85.*Pi/180} ,{{n,1.33},1.33,2},{κ,0,0.1}]

Demo TM reflection lightwave on water (preset)

This is TM on water

This is TE on water

Here is a demo of just amplitude

Obtain an expression for the Brewster’s angle

See more illustration below:

Sketch a drawing explaining the polarization effect above. (explaning what polarizer you use and what orientation you set to obtain the picture on the right).

4.3.2 Home work on plotting relectivity and normal E field

Homework

Source code HW help: plotting reflectivity

rTEf[θ_,{n1_,n2_,κ2_}]:=Module[{ϵ1,ϵ2,k1,k2} ,
ϵ1=(n1^2) ; ϵ2=(((n2+I κ2))^2)  ;
k1=n1 Cos[θ] ;k2=(Sqrt[ϵ2 -ϵ1 ((Sin[θ])^2) ]);
 ((k1-k2)/(k1+k2)) ]  ;
rTMf[θ_,{n1_,n2_,κ2_}]:=Module[{ϵ1,ϵ2,k1,k2} ,
ϵ1=(n1^2) ; ϵ2=(((n2+I κ2))^2)  ;
k1=n1 Cos[θ] ;k2=(Sqrt[ϵ2 -ϵ1 ((Sin[θ])^2) ]) ;
((k2 ϵ1-k1 ϵ2)/(k1 ϵ2+k2 ϵ1)) ]  ;
  
Manipulate[r0=rTEf[0.,{1,n2,κ2}] ;
 { Plot[{rTEf[θ*Pi/180.,{1,n2,κ2}],rTMf[θ*Pi/180.,{1,n2,κ2}] }
,{θ,0,90}
, PlotRange->All,Frame-> True, GridLines->{{0,15,30,45,60,75.,90},Automatic}, PlotStyle-> {Red,Blue, Purple}
,FrameTicks->{{0,15,30,45,60,75.,90},Automatic}
,Filling-> {{1-> {r0,Hue[1,1,1,0.4]}},{2-> {Axis,Hue[0.6,1,1,0.5]}}}
]
, Plot[{((Abs[rTEf[θ*Pi/180.,{1,n2,κ2}]])^2),((Abs[rTMf[θ*Pi/180.,{1,n2,κ2}]])^2) }
,{θ,0,90}
, PlotRange->All,Frame-> True, GridLines->{{0,15,30,45,60,75.,90},Automatic}, PlotStyle-> {Red,Blue, Purple}
,FrameTicks->{{0,15,30,45,60,75.,90},Automatic}
,Filling-> {{1-> {{2},Hue[1,1,1,0.4]}},{2-> {Axis,Hue[0.6,1,1,0.5]}}}
]}
, {{n2,1.6},1.33,2},{κ2,0,0.1}]

4.4 Total internal reflection

4.4.1 Discussion

Not all cases of reflection and refraction has a transmitted propagating wave. Sometimes, we have cases like the below:

From Snell's law (Subscript[n, 1]) Sin[(Subscript[θ, 1])]=(Subscript[n, 2]) Sin[(Subscript[θ, 2])]
or:                     Sin[(Subscript[θ, 2])]=((Subscript[n, 1])/(Subscript[n, 2]))Sin[(Subscript[θ, 1])] 
If  (Subscript[n, 1]) >(Subscript[n, 2]) , there will be values of (Subscript[θ, 1]) such that Sin[(Subscript[θ, 2])]>1, which does not make sense, unless (Subscript[θ, 2]) is complex. In fact, complex (Subscript[θ, 2]) would give the type of wave in the refracted medium that we have seen before: evanescent wave. We know that when this happens, total internal reflection occurs for the incident medium, and the critical angle is (Subscript[θ, c])=ArcSin[((Subscript[n, 2])/(Subscript[n, 1]))] .

Let’s look for the each polarization.

4.4.2 TE polarization

Actually, we already had the solutions from the above:
                        (Subscript[E, 1])= (Subscript[E, inc]) +(Subscript[E, refl])                                     (2.1.7)  (4.4.1a)
where:             (Subscript[E, inc])= (OverHat[y])    (e^(i  (Subscript[k, 1]) x )) (e^(i  (β z -ω t )))                       (2.1.8)     (4.4.1b)
and:                 (Subscript[E, refl])= (OverHat[y]) r  (e^(-i  (Subscript[k, 1]) x ))(e^(i  (β z -ω t )))                    (2.2.12)       (4.4.1c)
                        (Subscript[E, 2])=    (OverHat[y])  t  (e^(i  (Subscript[k, 2]) x ))(e^(i  (β z -ω t )))                     (2.2.13)     (4.4.2)

where:             β=((2 π)/λ)(Sqrt[(Subscript[ϵ, 1]) (Subscript[μ, 1])]) Sin[θ] =(Subscript[k, 0]) (Subscript[n, 1]) Sin[θ]      (1.1.1b)  (4.4.3)
                        (Subscript[k, 1])=(Sqrt[(Subscript[ϵ, 1]) (Subscript[μ, 1]) ((Subscript[k, 0])^2) -(β^2) ])=(Subscript[k, 0]) (Subscript[n, 1]) Cos[θ]               (4.4.4) 
There is nothing here that says there must be a propagating refracted wave.
Note that the only difference now is that we assume medium 1 has index of refraction (Subscript[n, 1]) (and no gain or absorption) instead of 1 for air. But that is all. The rest is the same.
And:               (Subscript[k, 2])= (Sqrt[(Subscript[ϵ, 2]) (Subscript[μ, 2]) ((Subscript[k, 0])^2) -(β^2) ])= (Subscript[k, 0])(Sqrt[(Subscript[ϵ, 2]) (Subscript[μ, 2])-((((Subscript[n, 1]) Sin[θ]))^2) ])      (4.4.5)
The coefficients are:     r=(((Subscript[k, 1])-(Subscript[k, 2]))/((Subscript[k, 1])+(Subscript[k, 2])))   and   t=((2(Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))                    (4.4.6)

We can plot the solutions:

Short code version Demo total internal reflection

Manipulate[   ω=1;  β=n1 Sin[θ]  ;
k1=n1 Cos[θ] ;k2=(Sqrt[(((n2+I κ2))^2) -(n1^2) ((Sin[θ])^2) ])  ;
w1=Min[8 Cos[θ],3] ; w2=(w1/(Cos[θ]))Re[k2]   ;
dGH= Re[I  Sin[θ]/(π k2)] ;
r=  ((k1-k2)/(k1+k2)) ; tr=   ((2 k1)/(k1+k2)) ;

U=DensityPlot[ If[y≥0, 
Re[ UnitBox[ (x  Cos[θ]+y Sin[θ])/w1] * Exp[I*2 π (x  β-y k1 -ω t)]
                   +If[Re[k2]>0,
UnitBox[(x  Cos[θ]-y Sin[θ])/w1] ,UnitBox[(x  Cos[θ]-y Sin[θ]-dGH)/w1]]
* r  Exp[I*2 π (x  β+y k1 -ω t ) ]]
,If[Re[k2]>0,
UnitBox[ (x  Re[k2]+y n1 Sin[θ])/w2 ] ,  UnitBox[ (x-0.5*dGH/Cos[θ]) Cos[θ]/w1 ]]*Re[tr* Exp[I*2 π (x  β-y k2 -ω t)] ]
] ,{x,-4,4},{y,-2.5,5.5}
,PlotPoints->{60,80},PlotRange->{{-4,4},{-2.5,5.5}, All},Mesh-> False, ColorFunction->"Rainbow"] ;
Show[U,Graphics[{White,Opacity[0.25],Line[{{-4,0},{4,0}}] }] ]
, {t,0,1}, {θ, 0,80*Pi/180} ,{{n1,2},1.33,2},{{n2,1},1,1.5},{κ2,0,0.1}]

Demo total internal reflection 1

Note what happens when θ is larger than some value: threre is no wave in medium 2. Let’s zoom in the region near the boundary.

Short code version Demo total internal reflection

Manipulate[  ω=1;  β=n1 Sin[θ]  ;
k1=n1 Cos[θ] ;k2=(Sqrt[(((n2+I κ2))^2) -(n1^2) ((Sin[θ])^2) ])  ;
w1=Min[8 Cos[θ],3] ; w2=(w1/(Cos[θ]))Re[k2]   ;
dGH= Re[I  Sin[θ]/(π k2)] ;
r=  ((k1-k2)/(k1+k2)) ; tr=   ((2 k1)/(k1+k2)) ;

U=DensityPlot[ If[y≥0, 
Re[ UnitBox[ (x  Cos[θ]+y Sin[θ])/w1] * Exp[I*2 π (x  β-y k1 -ω t)]
                   +If[Re[k2]>0,
UnitBox[(x  Cos[θ]-y Sin[θ])/w1] ,UnitBox[(x  Cos[θ]-y Sin[θ]-dGH)/w1]]
* r  Exp[I*2 π (x  β+y k1 -ω t ) ]]
,If[Re[k2]>0,
UnitBox[ (x  Re[k2]+y n1 Sin[θ])/w2 ] ,  UnitBox[ (x-0.5*dGH/Cos[θ]) Cos[θ]/w1 ]]*Re[tr* Exp[I*2 π (x  β-y k2 -ω t)] ]
] ,{x,-3,3},{y,-0.8,1.2}, AspectRatio->2/6.
,PlotPoints->{50,50},PlotRange-> {{-3,3},{-0.8,1.2},All},Mesh-> False, ColorFunction->"Rainbow"] ;
Show[U,Graphics[{White,Opacity[0.25],Line[{{-3,0},{3,0}}] }] ]
, {t,0,1}, {θ, 0,80*Pi/180} ,{{n1,2},1.33,2},{{n2,1},1,1.5},{κ2,0,0.1}]

Demo total internal reflection 2: zoom in

It appears the wave penetrates just a little into 2nd medium and it travels along the surface instead of into the medium (the edge of the beam is cut off only for illustration and NOT an accurate simulation)
The reason is that for the incident angle θ where: 
                             (Subscript[ϵ, 2]) (Subscript[μ, 2])-((((Subscript[n, 1]) Sin[θ]))^2) <0                        (4.4.7)
we have        (Subscript[k, 2])=  (Subscript[k, 0])(Sqrt[(Subscript[ϵ, 2]) (Subscript[μ, 2])-((((Subscript[n, 1]) Sin[θ]))^2) ]) = i κ                 (4.4.8a)
where       κ=  (Subscript[k, 0])(Sqrt[((((Subscript[n, 1]) Sin[θ]))^2)-(Subscript[ϵ, 2]) (Subscript[μ, 2]) ])                          (4.4.8b)
Thus:      (Subscript[E, 2])=    (OverHat[y])  t  (e^(i  (Subscript[k, 2]) x ))(e^(i  (β z -ω t ))) =    (OverHat[y])  t  (e^(-κ x ))(e^(i  (β z -ω t )))   (1.2.2) (4.4.9)
The component (e^(-κ x )) is called evanescent, as we have studied above.
If that is the case, what can we expect of reflection? there is no power flowing into medium 2, then where does it go?
We know that        r=(((Subscript[k, 1])-(Subscript[k, 2]))/((Subscript[k, 1])+(Subscript[k, 2])))=(((Subscript[k, 1])-i κ)/((Subscript[k, 1])+i κ))    and              (4.4.10)
                             ((|r|)^2)=((|(((Subscript[k, 1])-i κ)/((Subscript[k, 1])+i κ))|)^2)=((((Subscript[k, 1])^2)+ (κ^2))/(((Subscript[k, 1])^2)+ (κ^2)))=1          (4.4.11)
which means that the reflected power is 100%: this is why we call total internal reflection.
The transmission coefficient 
                              t=((2(Subscript[k, 1]))/((Subscript[k, 1])+(Subscript[k, 2])))=((2(Subscript[k, 1]))/((Subscript[k, 1])+i κ))                    (4.4.12)
 is NOT zero, but it doesn’t mean it carries power, because it is not the coefficient t that indicates power, which is only a ratio of the transmitted field amplitude at the boundary vs the incident field. The field decays to zero as x-> ∞, hence there is no power flowing into the medium.

Notice that  ((|r|)^2)=1 , but it is complex, hence it has a phase:
                  Arg[r]=Arg[(((Subscript[k, 1])-i κ)/((Subscript[k, 1])+i κ)) ]= -2 ArcTan[(κ/(Subscript[k, 1]))]     (4.4.13)

Demo reflection phase and wave - TIR

Here, we plot the reflected wave by folding it over to let it continue in the same direction as the incident only to illustrate the meaning of the negative phase shift.  
(e^(i ((Subscript[k, 1]) x -ω t-ϕ)))=(e^(i ((Subscript[k, 1]) x -ω (t+(ϕ/ω)))))  : a time delay relative to the incident wave (although it might be counter intuitive to see that it seems to run “ahead” of the incident wave).

The negative phase shift is related to Goos-Hanchen shift (not included in this study; One can simulate with a Gaussian beam for example and observe GH shift).

Note: some convention denotes the reflectivity as: r=|r| (e^(-i φ)) 
so that φ is positive. Regardless of convention, as long as one uses the correct value, one should obtain correct results.

4.4.3 TM polarization

The solution copied from the above:
                                       (Subscript[H, 1])= (Subscript[H, inc]) +(Subscript[H, refl])                                                (4.2.1a)
where:                            (Subscript[H, inc])= (OverHat[y])    (e^(i  (Subscript[k, 1]) x )) (e^(i  (β z -ω t )))= (OverHat[y])    F[x] (e^(i  (β z -ω t )))        (4.2.1b)      
and:                                (Subscript[H, refl])=  (OverHat[y]) (Subscript[r, H;TM])  (e^(-i  (Subscript[k, 1]) x ))(e^(i  (β z -ω t )))                         (4.2.1c)     
hence:                            (Subscript[H, 1])=  (OverHat[y]) ((e^(i  (Subscript[k, 1]) x ))+(Subscript[r, H;TM])  (e^(-i  (Subscript[k, 1]) x )))(e^(i  (β z -ω t )))             (4.2.1d)   
hence:                            (Subscript[H, 1;y])=    (({{(e^(i  (Subscript[k, 1]) x )), (e^(-i  (Subscript[k, 1]) x ))}}))  . (({{1}, {(Subscript[r, H;TM])}}))(e^(i  (β z -ω t )))             (4.2.1e)    
and:                                (Subscript[H, 2])=  (OverHat[y]) (Subscript[t, H;TM])  (e^(i  (Subscript[k, 2]) x ))(e^(i  (β z -ω t )))                                (4.2.2a)     
hence:                            (Subscript[H, 2;y])=    (({{(e^(i  (Subscript[k, 2]) x )), (e^(-i  (Subscript[k, 2]) x ))}}))  . (({{(Subscript[t, H;TM])}, {0}}))(e^(i  (β z -ω t )))         (4.2.2b)    
Thus:                           (Subscript[r, H;TM])=(((Subscript[k, 1]) (Subscript[ϵ, 2])-(Subscript[k, 2]) (Subscript[ϵ, 1]))/((Subscript[k, 2]) (Subscript[ϵ, 1])+(Subscript[k, 1]) (Subscript[ϵ, 2])))  ;    (Subscript[t, H;TM])->((2(Subscript[k, 1]) (Subscript[ϵ, 2]))/((Subscript[k, 2]) (Subscript[ϵ, 1])+(Subscript[k, 1]) (Subscript[ϵ, 2])))                 (4.4.14)

Below is a plot of transverse magnetic field (Subscript[H, y]):

Short code version demo (Subscript[H, y]) for TM TIR

Manipulate[  ω=1 ; β=n1 Sin[θ]  ; ϵ1=(n1^2) ; ϵ2=(((n2+I κ2))^2)  ;
k1=n1 Cos[θ] ;k2=(Sqrt[ϵ2 -ϵ1 ((Sin[θ])^2) ])  ;
w1=Min[8 Cos[θ],3] ; w2=(w1/(Cos[θ]))Re[k2]   ;
dGH= Re[I  Sin[θ]/(π k2)] ;
r=  ((k1 ϵ2-k2 ϵ1)/(k1 ϵ2+k2 ϵ1)) ; tr=   ((2 k1 ϵ2)/(k1 ϵ2+k2 ϵ1)) ;

U=DensityPlot[If[y≥0, 
Re[ UnitBox[ (x  Cos[θ]+y Sin[θ])/w1] * Exp[I*2 π (x  β-y k1 -ω t)]
                   +If[Re[k2]>0,
UnitBox[(x  Cos[θ]-y Sin[θ])/w1] ,UnitBox[(x  Cos[θ]-y Sin[θ]-dGH)/w1]]
* r  Exp[I*2 π (x  β+y k1 -ω t ) ]]
,If[Re[k2]>0,
UnitBox[ (x  Re[k2]+y n1 Sin[θ])/w2 ] ,  UnitBox[ (x-0.5*dGH/Cos[θ]) Cos[θ]/w1 ]]*Re[tr* Exp[I*2 π (x  β-y k2 -ω t)] ]
] ,{x,-3,3},{y,-.8,1.2}, AspectRatio->2/6.
,PlotPoints->{50,50},PlotRange-> {{-3,3},{-0.8,1.2},All},Mesh-> False, ColorFunction->"Rainbow"] ;
Show[U,Graphics[{White,Opacity[0.25],Line[{{-4,0},{4,0}}] }] ]
, {t,0,1}, {θ, 0,80*Pi/180} ,{{n1,2},1.33,2},{{n2,1},1,1.5},{κ2,0,0.1}]

Demo Total internal reflection for TM - (Subscript[H, y])

There is nothing here that appears different dramatically from the case of TE. But that is because we are plotting (Subscript[H, y]). To really compare, we should plot (Subscript[E, x]), which is the normal E component:
              (Subscript[k, 0])  (Overscript[E, ->])  =(1/ϵ)  (({{(OverHat[x]), (OverHat[y]), (OverHat[z])}}))(({{β F[x]}, {0}, {i (∂_x)F[x]}}))(e^(i (β z-ω t)))                        (4.4.15)
             (Subscript[E, x])  =(1/ϵ) (β/(Subscript[k, 0])) F[x]  (e^(i (β z-ω t)))                            (4.4.16)
Hence:           (Subscript[E, 1;x])  =(1/(Subscript[ϵ, 1])) (β/(Subscript[k, 0]))  ((e^(i  (Subscript[k, 1]) x ))+(Subscript[r, H;TM])  (e^(-i  (Subscript[k, 1]) x ))) (e^(i (β z-ω t)))
                      (Subscript[E, 2;x])  =(1/(Subscript[ϵ, 2])) (β/(Subscript[k, 0]))  (Subscript[t, H;TM])  (e^(i  (Subscript[k, 2]) x )) (e^(i (β z-ω t)))

For completeness:           (Subscript[E, z])  =(1/(ϵ (Subscript[k, 0])))  i (∂_x)F[x]  (e^(i (β z-ω t)))  
Thus:              (Subscript[E, 1;z])  =-(1/(Subscript[ϵ, 1])) ((Subscript[k, 1])/(Subscript[k, 0]))  ((e^(i  (Subscript[k, 1]) x ))-(Subscript[r, H;TM])  (e^(-i  (Subscript[k, 1]) x )) ) (e^(i (β z-ω t)))  
                       (Subscript[E, 2;z])  =-(1/(Subscript[ϵ, 2])) ((Subscript[k, 2])/(Subscript[k, 0])) (Subscript[t, H;TM]) (e^(i  (Subscript[k, 2]) x ))  (e^(i (β z-ω t)))

Notice the continuity and discontinuity:
- For (Subscript[E, x]), the expression  ((e^(i  (Subscript[k, 1]) x ))+(Subscript[r, H;TM])  (e^(-i  (Subscript[k, 1]) x ))) which is proportional to (Subscript[H, y]) is continuous across an interface. But (Subscript[ϵ, 1]) and (Subscript[ϵ, 2]) are not equal, which means that (Subscript[E, x]) must be discontinuous, as should be, because only the normal component of D, not E should be continuous.
- For (Subscript[E, z]), it is continuous since that is one of the boundary condition that we solve for.

Let’s plot the discontinuity of (Subscript[E, x]):

Short code Demo: Normal E component discontinuity

Manipulate[  ω=2 π ;  β=n1 Sin[θ]  ; ϵ1=(n1^2) ; ϵ2=(((n2+I κ2))^2)  ;
k1=n1 Cos[θ] ;k2=(Sqrt[ϵ2 -ϵ1 ((Sin[θ])^2) ])  ;
w1=Min[8 Cos[θ],3] ; w2=(w1/(Cos[θ]))Re[k2]   ;
dGH= Re[I  Sin[θ]/(π k2)] ;
r=  ((k1 ϵ2-k2 ϵ1)/(k1 ϵ2+k2 ϵ1)) ; tr=   ((2 k1 ϵ2)/(k1 ϵ2+k2 ϵ1)) ;

U=DensityPlot[ If[y≥0, 
Re[ (UnitBox[ (x  Cos[θ]+y Sin[θ])/w1] * Exp[I*2 π (x  β-y k1 -ω t)]
                   +If[Re[k2]>0,
UnitBox[(x  Cos[θ]-y Sin[θ])/w1] ,UnitBox[(x  Cos[θ]-y Sin[θ]-dGH)/w1]]
* r  Exp[I*2 π (x  β+y k1 -ω t ) ])/ϵ1]
,If[Re[k2]>0,
UnitBox[ (x  Re[k2]+y n1 Sin[θ])/w2 ] ,  UnitBox[ (x-0.5*dGH/Cos[θ]) Cos[θ]/w1 ]]*Re[tr* Exp[I*2 π (x  β-y k2 -ω t)]/ϵ2 ]
] ,{x,-3,3},{y,-.8,1.2}, AspectRatio->2/6.
,PlotPoints->{50,50},PlotRange->  {{-3,3},{-0.8,1.2},All},Mesh-> False, ColorFunction->"Rainbow"] ;
Show[U,Graphics[{White,Opacity[0.25],Line[{{-4,0},{4,0}}] }] ]
, {t,0,1}, {θ, 0,80*Pi/180} ,{{n1,2},1.33,2},{{n2,1},1,1.5},{κ2,0,0.1}]

First, notice what happens at the interface (for both refraction and TIR). Here is a 3D plot:

Short code Demo: Normal E component discontinuity 3 D plot

Manipulate[  ω=2 π ; β=n1 Sin[θ]  ; ϵ1=(n1^2) ; ϵ2=(((n2+I κ2))^2)  ;
k1=n1 Cos[θ] ;k2=(Sqrt[ϵ2 -ϵ1 ((Sin[θ])^2) ])  ;
w1=Min[8 Cos[θ],3] ; w2=(w1/(Cos[θ]))Re[k2]   ;
dGH= Re[I  Sin[θ]/(π k2)] ;
r=  ((k1 ϵ2-k2 ϵ1)/(k1 ϵ2+k2 ϵ1)) ; tr=   ((2 k1 ϵ2)/(k1 ϵ2+k2 ϵ1)) ;

U=Plot3D[If[y≥0, 
Re[ (UnitBox[ (x  Cos[θ]+y Sin[θ])/w1] * Exp[I*2 π (x  β-y k1 -ω t)]
                   +If[Re[k2]>0,
UnitBox[(x  Cos[θ]-y Sin[θ])/w1] ,UnitBox[(x  Cos[θ]-y Sin[θ]-dGH)/w1]]
* r  Exp[I*2 π (x  β+y k1 -ω t ) ])/ϵ1]
,If[Re[k2]>0,
UnitBox[ (x  Re[k2]+y n1 Sin[θ])/w2 ] ,  UnitBox[ (x-0.5*dGH/Cos[θ]) Cos[θ]/w1 ]]*Re[tr* Exp[I*2 π (x  β-y k2 -ω t)]/ϵ2 ]
] ,{x,-3,3},{y,-.8,1.2}
,PlotPoints->{50,50},PlotRange-> All,Mesh-> False] ;
Show[U ]
, {t,0,1}, {θ, 0,80*Pi/180} ,{{n1,2},1.33,2},{{n2,1},1,1.5},{κ2,0,0.1}]

Why is there such a big discontinuity at the interface? (see homework)

The second important aspect is the reflection phase. Remember, if we want to compare TE to TM, we must compare apple to apple and orange to orange, which means that we must compare E field with E field, H with H, not mix. 
Thus, the reflection coefficient of (Subscript[E, y]) in TE case is:
                                        (Subscript[r, (Subscript[E, y]);TE])=(((Subscript[k, 1])-(Subscript[k, 2]))/((Subscript[k, 2])+(Subscript[k, 1]) ))           (4.4.17)
should not be compared directly with:
                                       (Subscript[r, (Subscript[H, y]);TM])=(((Subscript[k, 1]) (Subscript[ϵ, 2])-(Subscript[k, 2]) (Subscript[ϵ, 1]))/((Subscript[k, 2]) (Subscript[ϵ, 1])+(Subscript[k, 1]) (Subscript[ϵ, 2])))        (4.4.18)
We should find  (Subscript[r, (Subscript[E, x]);TM]) or (Subscript[r, (Subscript[E, z]);TM]). Since the ratio of the 2 components is the same as in incident wave, both components have the same coeff. 
In HW, we can show:     (Subscript[r, (Subscript[E, z]);TM])=-(Subscript[r, (Subscript[H, y]);TM])=-(((Subscript[k, 1]) (Subscript[ϵ, 2])-(Subscript[k, 2]) (Subscript[ϵ, 1]))/((Subscript[k, 2]) (Subscript[ϵ, 1])+(Subscript[k, 1]) (Subscript[ϵ, 2])))=(((Subscript[k, 2]) (Subscript[ϵ, 1])-(Subscript[k, 1]) (Subscript[ϵ, 2]))/((Subscript[k, 2]) (Subscript[ϵ, 1])+(Subscript[k, 1]) (Subscript[ϵ, 2])))  .      (4.4.19)
Here is the phase comparison:

Demo E field transverse and normal phase - rhomb & prism - full version

at θ~0, both reflections are the same (TE is the same as TM)

At Brewster’s angle, TM reflection vanishes

Larger than Brewster’s, TE phase is the same as incident, but TM phase changes by 180.

At TIR: What we see here is: red: (Subscript[E, y;TE]): negative reflection phase shift indicates phase delay of the reflection compared with the incident wave (see discussion in previous section). Blue:  (Subscript[E, {x;z};TM]): positive reflection phase shift indicates advance of the reflection compared with the incident wave. Note the large phase difference between TE and TM.  This phase can be made into specific value such as 3 π/4 as shown below.

Homework on plotting reflectivity

We can obtain an expression for relative phase shift between TE and TM, which can lead to useful application such as Fresnel rhomb. Note also that because at TIR, the sign of TM reflectivity is flipped 180, some assigns the - sign as a part of the reflection coefficient (convention).

Homework on the Jones matrix for TIR: calculate and plot the polarization of TIR light. The incident E field is polarized at an angle θ with respect to the normal axis of the incident plane.

Note: For the Jones matrix, the system of coordinates is based on the plane of incident and the incident k vector, not the interface plane that we use it here. Hence, you can choose x to be perpendicular to the incident plane and y to be parallel to the incident plane. That way, (Subscript[r, TE]) is (Subscript[r, x]) or (Subscript[T, 11]) and (Subscript[r, E;TM]) is (Subscript[r, y]) or (Subscript[T, 22]). Compare this case with the perfect metal mirror case in earlier chapter and note the difference in phase.

4.4.4 Example: Fresnel rhomb

We can use the phase difference in TIR for two polarizations to change the polarization state in Fresnel rhomb. (see HW above).

HW Fresnel rhomb

rTEf[θ_,{n1_,n2_,κ2_}]:=Module[{ϵ1,ϵ2,k1,k2} ,
ϵ1=(n1^2) ; ϵ2=(((n2+I κ2))^2)  ;
k1=n1 Cos[θ] ;k2=(Sqrt[ϵ2 -ϵ1 ((Sin[θ])^2) ]);
 ((k1-k2)/(k1+k2)) ]  ;
rTMf[θ_,{n1_,n2_,κ2_}]:=Module[{ϵ1,ϵ2,k1,k2} ,
ϵ1=(n1^2) ; ϵ2=(((n2+I κ2))^2)  ;
k1=n1 Cos[θ] ;k2=(Sqrt[ϵ2 -ϵ1 ((Sin[θ])^2) ]) ;
((k2 ϵ1-k1 ϵ2)/(k1 ϵ2+k2 ϵ1)) ]  ;
  
Manipulate[  Plot[{Arg[rTEf[θ*Pi/180.,{n1,n2,κ2}]]/π,Arg[rTMf[θ*Pi/180.,{n1,n2,κ2}] ]/π
,(Arg[rTMf[θ*Pi/180.,{n1,n2,κ2}]]-Arg[rTEf[θ*Pi/180.,{n1,n2,κ2}]])/π},{θ,0,90}
, PlotRange->All,Frame-> True, GridLines->{{0,15,30,45,60,75,90},{-0.75,-0.5,-0.25,0,0.25,0.5,0.75}}, PlotStyle-> {Red,Blue, Purple}
,FrameTicks->{{0,15,30,45,60,75,90},{-0.75,-0.5,-0.25,0,0.25,0.5,0.75}}
,Filling-> {{1-> {Axis,Hue[1,1,1,0.4]}},{2-> {Axis,Hue[0.6,1,1,0.5]}},{3-> {Axis,Hue[0.8,1,1,0.3]}}}
]

, {{n1,2},1.33,2},{{n2,1},1,1.5},{κ2,0,0.1}]