# Refraction across two interfaces: is it correct to use Snell's law as constraint in an application of Fermat's principle?

The problem area is geometric optics, namely refraction across homogeneous media with constant speed of light.
I explain the three steps of a methodological doubt that popped up.

### Step 1: Where Snell's law comes from

I am aware that Snell's law is derived from Fermat's principle of least time.

Snell's law is derived upon applying Fermat's principle to an idealized ray between two points, say $$A$$ and $$B$$, at either side of a single refractive surface, $$\sigma$$, a plane for simplicity.
Once you determine the traversal time $$T$$ and minimize it with respect to the position of the point of incidence $$R$$ on the refractive surface, say with coordinate $$r$$, the statement $$\delta T(r)=0$$ tells us that the quantity $$\sin \theta/c$$ has to be the same across the refractive interface $$\sigma$$.
There is no need to develop the algebra further and determine the position of $$R$$, neither do the positions of $$A$$ and $$B$$ need to be specified. Snell's law is in fact a necessary and sufficient condition for a point of incidence $$R$$ to be found, so it applies to any ray and any point on the refractive interface $$\sigma$$. (Leaving aside the rays resulting into reflection, for simplicity.)

Broadly speaking, if I phrase it right, Snell's law is a corollary of Fermat's principle.
So far, plain sailing.

### Step 2: A similar refraction problem with a single interface

Let's turn to drawing a real ray between an illuminated point $$A$$ and an eye point $$B$$ at either side of a single refractive surface $$\sigma$$. The positions of $$A$$ and $$B$$ are now meaningful for this problem. The objective is to determine the position of the point of incidence $$R$$.

Fermat's principle can be used for this problem of course. You need to move on from where Snell's reasoning stopped. The minimization problem $$\delta T(r)=0$$ is one algebraic equation in one unknown. You solve it and find the coordinate of $$R$$ on the refracting interface that is physically meaningful. Of course, Snell's law is implicit in this result.

This too is plain sailing.

### Step 3: Refraction across two interfaces

Now, suppose that between $$A$$ and $$B$$ (known) there are two refractive interfaces, $$\sigma_1$$ and $$\sigma_2$$ (planes, for simplicity). The ray between $$A$$ and $$B$$ crosses three media with a different speed of light. I want to determine the ray path between $$A$$ and $$B$$ as before: the challenge is to determine the two points of incidence of the ray on the interfaces, $$R_1$$ and $$R_2$$.

Fermat's principle applies here too. The traversal time $$T$$ is the sum of the times to traverse the three media across the segments $$AR_1$$, $$R_1 R_2$$, $$R_2 B$$. The traversal time has to be minimized. Here, this statement gives one equation with two unknowns, $$\delta T(r_1, r_2) = 0$$. I then looked for one more geometric condition to link $$r_1$$ and $$r_2$$ and use the same algebra as the system with a single refractive interface.

Here, I thought of calling in Snell's law. Using the prior knowledge of the relationship between the angles of incidence and refraction at each interface, I could express the traversal time as $$T(r_1)$$ or $$T(r_2)$$, minimize it, and fix either $$R_1$$ or $$R_2$$ first.

This is where the methodological doubt kicked in.

• Snell's law is in itself a corollary of Fermat's principle, that is the result of a minimization problem, $$\delta T = 0$$.
• If I use Snell's law to anticipate the ray behaviour across two interfaces, I am basically feeding into the new $$T$$ the result of a prior $$\delta T = 0$$. The new $$T$$ has to be minimized yet, though. The new minimization problem should bring about, as a corollary, that the Snell's law applies on the same interfaces where I had imposed it.

Basically, I would be sneaking into the problem's givens a part of the solution, with a potential to corrupt the method that guarantees the correctness of the solution.

So, the main question is whether this concern is well posed in the first place.

• If so, which other non-Snell condition should be imposed to solve for $$r_1$$ and $$r_2$$?
• If not, what makes the trick or rather what debunks the concern?
• Dec 22, 2021 at 13:27


Consider that in Figure 01 above the givens are $$v_1,v_2,v_3,\alpha,y_1,y_2,\beta$$. The two equations of Snell's Law on the surfaces $$\sigma_1\,$$ and $$\sigma_2$$ will give a system with respect to the unknown variables $$x_1,x_2$$ and identify the points $$\texttt C$$ and $$\texttt D$$ respectively.

\begin{align} t & \e t_1\p t_2\p t_3 \tl{01}\\ t_1\plr{x_1} & \e \dfrac{\sqrt{x^2_1\p \plr{\alpha\m y_1}^2}}{v_1} \tl{02.1}\\ t_2\plr{x_1,x_2} & \e \dfrac{\sqrt{\plr{x_2\m x_1}^2\p \plr{y_2\m y_1}^2}}{v_2} \tl{02.2}\\ t_3\plr{x_2} & \e \dfrac{\sqrt{\plr{\beta\m x_2}^2\p y^2_2}}{v_3} \tl{02.3} \end{align}

Therefore: $$$$t\plr{x_1,x_2}\e \dfrac{\sqrt{x^2_1\p \plr{\alpha\m y_1}^2}}{v_1}\p\dfrac{\sqrt{\plr{x_2\m x_1}^2\p \plr{y_2\m y_1}^2}}{v_2}\p\dfrac{\sqrt{\plr{\beta\m x_2}^2\p y^2_2}}{v_3} \tl{03}$$$$

\begin{align} \mathrm dt & \e \dfrac{\partial t}{\partial x_1}\mathrm dx_1\p\dfrac{\partial t}{\partial x_2}\mathrm dx_2\e 0 \quad\bl\implies \tl{04}\\ \dfrac{\partial t}{\partial x_1} & \e\left[\dfrac{1}{v_1}\dfrac{x_1}{\sqrt{x^2_1\p \plr{\alpha\m y_1}^2}}\m\dfrac{1}{v_2}\dfrac{x_2\m x_1}{\sqrt{\plr{x_2\m x_1}^2\p \plr{y_2\m y_1}^2}}\right]\e0 \tl{04.1}\\ \dfrac{\partial t}{\partial x_2} & \e\left[\dfrac{1}{v_2}\dfrac{x_2\m x_1}{\sqrt{\plr{x_2\m x_1}^2\p \plr{y_2\m y_1}^2}} \m\dfrac{1}{v_3}\dfrac{\beta\m x_2}{\sqrt{\plr{\beta\m x_2}^2\p y^2_2}} \right]\e 0 \tl{04.2} \end{align}

The surface in Figure 02 represents the function $$t\plr{x_1,x_2}$$ of Equation \eqref{03}. The graticule of $$x_1$$- and $$x_2$$-parameter curves is shown on the surface. The drawing was produced with the following data: $$$$\begin{split} \alpha &\e 10 \qquad \beta \e 10\\ y_1 &\e 7 \qquad y_2 \e 4\\ v_1 &\e 5 \qquad v_2 \e 4 \qquad v_3 \e 3\\ x_1 &\bl\in \blr{-5,21} \qquad x_2 \bl\in \blr{-5,21} \end{split} \tl{05}$$$$ Note that the solution with respect to $$x_1,x_2$$ depends on the ratios of the speeds and not on their values. For example, instead of the speeds in \eqref{05}, we could equivalently have used the following refraction indices:
$$$$n_1 \e 1 \qquad n_2 \e \frac54\e 1.25 \qquad n_3 \e\frac53\approx 1.67 \tl{06}$$$$

In Figure 03 the two curves $$\mathcal C_1$$ and $$\mathcal C_2$$ on the surface are the geometrical loci of the minimum with respect to $$t$$ of the $$\,x_1$$- and $$\,x_2$$-parameter curves respectively. Their projections $$\mathcal C'_{\,\!1}$$ and $$\mathcal C'_{\,\!2}$$ on the $$\,x_1x_2$$-plane intersect at a point $$\texttt P$$, the coordinates of which are the solution $$(x_1,x_2)$$ of the system of Equations \eqref{04.1}-\eqref{04.2}.

As an example we determine the values of $$(x_1,x_2)$$ for the configuration in Figure 01 given the data in Equation \eqref{05}.

Squaring the Snell's Law equations \eqref{04.1} and \eqref{04.2} the pair of unknowns $$(x_1,x_2)$$ must satisfy the following non-linear system: \begin{align} v^2_2x^2_1\left[\plr{x_2\m x_1}^2\p \plr{y_2\m y_1}^2\vp\right]\m v^2_1\plr{x_2\m x_1}^2\left[x^2_1\p \plr{\alpha\m y_1}^2\vp\right] &\e0 \tl{07.1}\\ \!\!\!\!\!\!\!\!\!\!\!\!\!\!v^2_3\plr{x_2\m x_1}^2\left[\plr{\beta\m x_2}^2\p y^2_2\vp\right]\m v^2_2\plr{\beta\m x_2}^2\left[\plr{x_2\m x_1}^2\p \plr{y_2\m y_1}^2\vp\right]&\e0 \tl{07.2} \end{align} After inserting the data of \eqref{05}, these equations are represented by the curves on the $$x_1x_2$$-plane shown in Figure 04. More precisely, Equation \eqref{07.1} is represented by the two-branch curve $$\mathcal C'_{\,\!1}\bl\cup\mathcal C''_{\,\!1}$$, while Equation \eqref{07.2} is represented by the two-branch curve $$\mathcal C'_{\,\!2}\bl\cup\mathcal C''_{\,\!2}$$.

The branches $$\mathcal C'_{\,\!1}$$ and $$\mathcal C'_{\,\!2}$$ are accepted while the branches $$\mathcal C''_{\,\!1}$$ and $$\mathcal C''_{\,\!2}$$ are rejected based on the following reasoning.
Equation \eqref{04.1} is identical with the Snell's Law at point $$\texttt C$$ in Figure 01: $$$$n_1\sin\theta_1\plr{x_1,x_2}\e n_2\sin\theta_2\plr{x_1,x_2} \tl{08}$$$$ Equation \eqref{07.1} is equivalent to the square of Equation \eqref{08}: $$$$n^2_1\sin^2\theta_1\plr{x_1,x_2}\e n^2_2\sin^2\theta_2\plr{x_1,x_2} \tl{09}$$$$ On the one hand, the solution pairs $$(x_1,x_2)$$ of Equation \eqref{09} represented by the branch $$\mathcal C'_{\,\!1}$$ satisfy \eqref{08} and are accepted. On the other hand, those represented by the branch $$\mathcal C''_{\,\!1}$$ satisfy Equation \eqref{10} below and are rejected.
$$$$n_1\sin\theta_1\plr{x_1,x_2}\e \m n_2\sin\theta_2\plr{x_1,x_2} \tl{10}$$$$ Similarly, Equation \eqref{04.2} is identical with the Snell's Law at point $$\texttt D\,$$ in Figure 01: $$$$n_2\sin\theta_2\plr{x_1,x_2}\e n_3\sin\theta_3\plr{x_1,x_2} \tl{11}$$$$ Equation \eqref{07.2} is equivalent to the square of Equation \eqref{11}: $$$$n^2_2\sin^2\theta_2\plr{x_1,x_2}\e n^2_3\sin^2\theta_3\plr{x_1,x_2} \tl{12}$$$$ On the one hand, the solution pairs $$(x_1,x_2)$$ of Equation \eqref{12} represented by the branch $$\mathcal C'_{\,\!2}$$ satisfy Equation \eqref{11} and are accepted. On the other hand, those represented by the branch $$\mathcal C''_{\,\!2}$$ satisfy \eqref{13} below and are rejected.
$$$$n_2\sin\theta_2\plr{x_1,x_2}\e \m n_3\sin\theta_3\plr{x_1,x_2} \tl{13}$$$$

So, the solution pair $$(x_1,x_2)$$ is found as the coordinates of the point $$\texttt P\equiv \mathcal C'_{\,\!1}\bl\cap\mathcal C'_{\,\!2}$$. Note that the implicit curves $$\mathcal C'_{\,\!1},\mathcal C'_{\,\!2}$$ and their intersection point $$\texttt P$$ of Figure 04 are also shown in the $$x_1x_2$$-plane of Figure 03.

The coordinates $$(x_1,x_2)$$ with accuracy $$10^{\m10}$$ are: $$$$x_1\e4.8443568078\,,\qquad x_2\e7.6277175213 \tl{14}$$$$ We determine the angles from the geometry of the configuration: $$$$\begin{split} \!\!\!\!\!\!\!\!\!\!\!\!\!\!\sin\theta_1 & \e\dfrac{x_1}{\sqrt{x^2_1\p \plr{\alpha\m y_1}^2}}\e0.8501777598\quad \bl\implies\theta_1\e58.2310087871^{\bl\circ}\\ \!\!\!\!\!\!\!\!\!\!\!\!\!\!\sin\theta_2 & \e\dfrac{x_2\m x_1}{\sqrt{\plr{x_2\m x_1}^2\p \plr{y_2\m y_1}^2}}\e0.6801422079 \quad \bl\implies\theta_2\e42.8547566685^{\bl\circ}\\ \!\!\!\!\!\!\!\!\!\!\!\!\!\!\sin\theta_3 & \e\dfrac{\beta\m x_2}{\sqrt{\plr{\beta\m x_2}^2\p y^2_2}}\e0.51010665593\quad \bl\implies\theta_3\e30.6709342993^{\bl\circ}\\ \end{split} \tl{15}$$$$

The resulting solution is shown in Figure 05. As a check, we have the following running constant along the light path $$\texttt{ACDB}$$: $$$$\dfrac{\sin\theta_1}{v_1} \e \dfrac{\sin\theta_2}{v_2} \e \dfrac{\sin\theta_3}{v_3} \e 0.1700355520 \tl{16}$$$$ or $$$$n_1\sin\theta_1\e n_2\sin\theta_2 \e n_3\sin\theta_3 \e 0.8501777598 \tl{17}$$$$

• Reconnecting to the question, the differential of the traversal time, properly worked out as in Eq. 04, provides two conditions, which make the search for a constraint unnecessary. The Snell's law at the two refracting planes is embedded in the two conditions (04.1) and (04.2). Dec 24, 2021 at 6:21
• @XavierStuvw : Precisely. Dec 24, 2021 at 7:00

It seems the core of OP's question is the following.

Question: When we derived Snell's law for a single interface from Fermat's principle, we held 2 points fixed. How can we then use repeatedly Snell's law for a double interface, since we are not allowed to hold 3 points fixed during the variation?

Answer: Although it is true that we're only allowed to hold 2 points fixed in Fermat's principle [namely the source and the target], Snell's law is a local condition. In fact, Snell's law holds at each point along the optical path(s), not just at the interface point(s). [In the bulk of a medium, Snell's law just says that the angles of incidence and refraction are the same relative to an arbitrary direction, i.e. the light continues along a straight line.]

• The OP was considering to insert a constraint in the expression of the traverse time, so that its minimization had provided one equation in one unknown and a refracted ray could have been traced. This constraint was Snell's law. However, he sensed this was a conceptual mistake since he would have introduced a (local) solution in the set up of the problem. A sort of begging the question. In fact, differentiating the traverse time as a functional of n variables provides n relationships. The Fermat problem of refraction across multiple interfaces leads to a system of Snell statements Dec 24, 2021 at 14:10