1. Draw out the Reflection and Trasmission.
2. Derive the phase shift in complex condition.

# Before we begin

This is the first time that I write a blog in English, please forgive me if there is any wrong and tell me if you like. :)

Then let’s begin.

I suppose that we have already know those equations.

# More

## Phase shift formula

By Snell's Law, we can change in this form,

If $n_t1)$, electromagnetic wave transport from denser medium to more loosen medium, $\sin\theta_t$ may be bigger than 1, thus $\theta_t$ extend to complex. Then consider the complex condition.

By Fresnel Equations,

Because $\sin\theta_t$ is complex, it can change in this shape.

Combine two forms of $\tilde{r}_\perp​$,

Observe the equations above and half-angle formula (After Google),

we can find out,

The same, we can derive

Thus, the Phase Shift between vertical and parallel is

### Confirm

Compare the formula derived above and the angle() function in MATLAB, two curve overlap (blue and red), thus confirm that the formula is correct.

### Something more

At first, I plot the figure directly,

but find warning that plotting complex.

Go back to see the formula

Plot $(\sin ^{2} \theta_{i}-n^{2}_{ti})​$ merely, which is yellow (or green?) curve in the figure above, before the critical angle (the zero point of the curve), it is negative. Therefore, $\varphi_\perp​$ will be a complex before the critical angle. So we should code it like this

The code will be a bit more beautiful with no warning though it will not change the figure.

## Thinking

1. Why would the $t$ bigger than 1 when $n_i>n_t$, does it still comply with conversation of energy?

Maybe in the light of the Dielectric coefficient difference, $\epsilon_i > \epsilon_t​$, to keep the energy density $u​$ to be constant, $E_t​$ will be smaller than $E_i​$.

2. When $n_i>n_t$, it is Total internal reflection after the critical angle, but why does $t\neq 0$ but even $t>1$?

Those equations just consider near the boundary, $t$ just go like the figure near the boundary and when it goes away from the boundary, it will decreass rapidly to 0.

1. Why use complex mode when plotting $r$ and $t$?

Mode represent the size.

2. Why use abs() when plotting phase shift?

Actually is the difference between ‘A to B’ and ‘B to A’, and because of its periodicty, there is no difference between $\pi$ and $-\pi$.

Thanks Probfia very much for answering $Q_1$ and $Q_2$!