🌱 Tony's Memex Tony's Intertwingled Memex
Digital Garden | OER Curriculum
Home / Digital Garden / Fastest Path Across Media and Snell's Law

Fastest Path Across Media and Snell's Law

Core Definition

The Fastest Path Across Media problem optimizes the trajectory of an entity traveling between two points situated in differing physical media where propagation speeds contrast (v1β‰ v2v_1 \ne v_2). Grounded in Fermat's Principle of Least Time, calculus demonstrates that the quickest path is not a single straight Euclidean line, but a piecewise-linear path refracted at the interface boundary satisfying Snell's Law:

sin⁑θ1v1=sin⁑θ2v2\frac{\sin \theta_1}{v_1} = \frac{\sin \theta_2}{v_2}


Concept Explanation

1. Travel Time Formulation (T=d/vT = d / v)

When traversing a homogeneous medium at a constant velocity vv, elapsed time TT is given by distance divided by rate:

T=dvT = \frac{d}{v}

When an object travels from point A(0,y1)A(0, y_1) in Medium 1 (speed v1v_1) to point B(L,βˆ’y2)B(L, -y_2) in Medium 2 (speed v2v_2), crossing a straight boundary along the xx-axis at coordinate (x,0)(x, 0):

           Medium 1 (Speed v1)
   A(0, y1)
      \
       \   d1 = sqrt(x^2 + y1^2)
        \
  -------*------------------------ (Interface Boundary, y = 0)
       (x, 0)
           \
            \   d2 = sqrt((L - x)^2 + y2^2)
             \
          B(L, -y2)
           Medium 2 (Speed v2)

The total elapsed travel time function is:

T(x)=T1(x)+T2(x)=x2+y12v1+(Lβˆ’x)2+y22v2T(x) = T_1(x) + T_2(x) = \frac{\sqrt{x^2 + y_1^2}}{v_1} + \frac{\sqrt{(L - x)^2 + y_2^2}}{v_2}

The physical domain is restricted to the interval between the two horizontal projections: x∈[0,L]x \in [0, L].

2. Calculus Derivation of Snell's Law

To minimize transit time, differentiate T(x)T(x) with respect to the crossing coordinate xx:

dTdx=1v1β‹…2x2x2+y12+1v2β‹…2(Lβˆ’x)(βˆ’1)2(Lβˆ’x)2+y22\frac{dT}{dx} = \frac{1}{v_1} \cdot \frac{2x}{2\sqrt{x^2 + y_1^2}} + \frac{1}{v_2} \cdot \frac{2(L - x)(-1)}{2\sqrt{(L - x)^2 + y_2^2}}
dTdx=xv1x2+y12βˆ’Lβˆ’xv2(Lβˆ’x)2+y22\frac{dT}{dx} = \frac{x}{v_1 \sqrt{x^2 + y_1^2}} - \frac{L - x}{v_2 \sqrt{(L - x)^2 + y_2^2}}

Setting dTdx=0\frac{dT}{dx} = 0:

xv1x2+y12=Lβˆ’xv2(Lβˆ’x)2+y22\frac{x}{v_1 \sqrt{x^2 + y_1^2}} = \frac{L - x}{v_2 \sqrt{(L - x)^2 + y_2^2}}

Now examine the trigonometry of the two travel legs:

  • Let ΞΈ1\theta_1 be the angle between the travel path in Medium 1 and the interface normal (vertical axis). Then sin⁑θ1=oppositehypotenuse=xx2+y12\sin \theta_1 = \frac{\text{opposite}}{\text{hypotenuse}} = \frac{x}{\sqrt{x^2 + y_1^2}}.
  • Let ΞΈ2\theta_2 be the angle between the travel path in Medium 2 and the interface normal. Then sin⁑θ2=Lβˆ’x(Lβˆ’x)2+y22\sin \theta_2 = \frac{L - x}{\sqrt{(L - x)^2 + y_2^2}}.

Substituting these trigonometric ratios directly into the derivative equation yields:

sin⁑θ1v1=sin⁑θ2v2\frac{\sin \theta_1}{v_1} = \frac{\sin \theta_2}{v_2}

This is Snell's Law of Refraction, proving that light travels along paths that minimize total transit time.

3. Coastal / Highway Boundary Variant

When an entity travels along a defined boundary (such as a runner along a beach road or a utility pipe along a riverbank) before cutting diagonally across an off-road terrain:

T(x)=xvroad+doff2+(Lβˆ’x)2vfieldT(x) = \frac{x}{v_{\text{road}}} + \frac{\sqrt{d_{\text{off}}^2 + (L - x)^2}}{v_{\text{field}}}

Differentiating and setting to zero yields:

1vroadβˆ’Lβˆ’xvfielddoff2+(Lβˆ’x)2=0β€…β€ŠβŸΉβ€…β€Šcos⁑α=Lβˆ’xdoff2+(Lβˆ’x)2=vfieldvroad\frac{1}{v_{\text{road}}} - \frac{L - x}{v_{\text{field}}\sqrt{d_{\text{off}}^2 + (L - x)^2}} = 0 \implies \cos \alpha = \frac{L - x}{\sqrt{d_{\text{off}}^2 + (L - x)^2}} = \frac{v_{\text{field}}}{v_{\text{road}}}

Because cos⁑α≀1\cos \alpha \le 1, a distinct interior turn-off point exists whenever vfield<vroadv_{\text{field}} < v_{\text{road}}. If the off-road speed equals or exceeds the road speed, the optimal strategy degenerates to a direct Euclidean straight line (x=0x = 0).


Engineering Applications & Context

In UNLV engineering practice, the mathematical framework of the fastest path applies directly to infrastructure routing and resource transport:

  • Civil & Environmental Engineering: Sizing subsea and terrestrial wastewater pipelines, oil pipelines, and municipal water mains across wetlands, rivers, and dry easements where underwater trenching costs $/m\$ / \text{m} differ drastically from overland excavation costs.
  • Electrical & Computer Engineering: Deploying submarine high-voltage direct current (HVDC) power cables and transatlantic fiber-optic telecommunications lines.
  • Robotics & Autonomous Ground Vehicles: Motion planners on unstructured off-road terrains navigate variable surface traction (e.g., pavement vs. sand vs. mud) by balancing path length against allowable speed.
  • Acoustics & Geophysics: Seismic wave refraction modeling through stratified rock strata for subsurface geothermal and structural soil exploration.

Example Problems

Example Problem 1: Coastal Transit Optimization (The Lifeguard Problem)

A lifeguard at point AA on a straight sandy beach must reach an offshore swimmer at point BB. Point BB is located 30Β meters30\text{ meters} offshore and 80Β meters80\text{ meters} downshore from AA. The lifeguard can run along the shoreline at 5Β m/s5\text{ m/s} and swim through the water at 3Β m/s3\text{ m/s}. Find the distance xx along the shoreline the lifeguard should run before entering the water to minimize total rescue time.

Solution

Step 1: State governing formulas

  • Transit Time Function:
    T(x)=drunvrun+dswimvswim=xv1+h2+(Lβˆ’x)2v2T(x) = \frac{d_{\text{run}}}{v_{\text{run}}} + \frac{d_{\text{swim}}}{v_{\text{swim}}} = \frac{x}{v_1} + \frac{\sqrt{h^2 + (L - x)^2}}{v_2}
    (Governing formulas defined in Fastest Path Across Media and Snell's Law.)

Step 2: Assign parameters and formulate objective
Given v1=5Β m/sv_1 = 5\text{ m/s}, v2=3Β m/sv_2 = 3\text{ m/s}, offshore distance h=30Β mh = 30\text{ m}, total downshore distance L=80Β mL = 80\text{ m}.

T(x)=x5+302+(80βˆ’x)23T(x) = \frac{x}{5} + \frac{\sqrt{30^2 + (80 - x)^2}}{3}
Physical domain: x∈[0,80] metersx \in [0, 80]\text{ meters}.

Step 3: Differentiate and find critical numbers

Tβ€²(x)=15+13β‹…2(80βˆ’x)(βˆ’1)2900+(80βˆ’x)2=15βˆ’80βˆ’x3900+(80βˆ’x)2T'(x) = \frac{1}{5} + \frac{1}{3} \cdot \frac{2(80 - x)(-1)}{2\sqrt{900 + (80 - x)^2}} = \frac{1}{5} - \frac{80 - x}{3\sqrt{900 + (80 - x)^2}}
Set Tβ€²(x)=0T'(x) = 0:
80βˆ’x3900+(80βˆ’x)2=15β€…β€ŠβŸΉβ€…β€Š80βˆ’x900+(80βˆ’x)2=35\frac{80 - x}{3\sqrt{900 + (80 - x)^2}} = \frac{1}{5} \implies \frac{80 - x}{\sqrt{900 + (80 - x)^2}} = \frac{3}{5}
Let u=80βˆ’xu = 80 - x:
u900+u2=35β€…β€ŠβŸΉβ€…β€Šu2900+u2=925\frac{u}{\sqrt{900 + u^2}} = \frac{3}{5} \implies \frac{u^2}{900 + u^2} = \frac{9}{25}
25u2=9(900+u2)=8100+9u225u^2 = 9(900 + u^2) = 8100 + 9u^2
16u2=8100β€…β€ŠβŸΉβ€…β€Šu2=810016β€…β€ŠβŸΉβ€…β€Šu=904=22.5Β meters16u^2 = 8100 \implies u^2 = \frac{8100}{16} \implies u = \frac{90}{4} = 22.5\text{ meters}
Solving for xx:
x=80βˆ’22.5=57.5Β metersx = 80 - 22.5 = 57.5\text{ meters}

Step 4: Evaluate endpoints and critical point (Closed Interval Method)

  • Run directly into water (x=0x = 0):
    T(0)=05+302+8023=900+64003=73003β‰ˆ28.48Β sT(0) = \frac{0}{5} + \frac{\sqrt{30^2 + 80^2}}{3} = \frac{\sqrt{900 + 6400}}{3} = \frac{\sqrt{7300}}{3} \approx 28.48\text{ s}
  • Run to perpendicular point then swim (x=80x = 80):
    T(80)=805+302+023=16+10=26.00Β sT(80) = \frac{80}{5} + \frac{\sqrt{30^2 + 0^2}}{3} = 16 + 10 = 26.00\text{ s}
  • Optimal split (x=57.5x = 57.5):
    T(57.5)=57.55+302+(22.5)23=11.5+900+506.253=11.5+1406.253=11.5+37.53=11.5+12.5=24.00Β sT(57.5) = \frac{57.5}{5} + \frac{\sqrt{30^2 + (22.5)^2}}{3} = 11.5 + \frac{\sqrt{900 + 506.25}}{3} = 11.5 + \frac{\sqrt{1406.25}}{3} = 11.5 + \frac{37.5}{3} = 11.5 + 12.5 = 24.00\text{ s}

Absolute minimum transit time is 24.0Β seconds24.0\text{ seconds}, achieved by running 57.5Β meters57.5\text{ meters} on shore before swimming 37.5Β meters37.5\text{ meters} through water.


Example Problem 2: Infrastructure Cost Routing Across a Waterway

A utility pipeline connects a source facility SS on the shore of a 500-meter500\text{-meter} wide canal to a distribution plant DD located 1200Β meters1200\text{ meters} downstream on the opposite shore. Subsea pipe laying costs $250/meter\$250/\text{meter}, while overland pipe laying along the bank costs $150/meter\$150/\text{meter}. Determine the downstream landing point xx that minimizes total pipeline construction costs.

Solution

Step 1: State governing formulas

  • Cost Objective Function:
    C(x)=Cwaterw2+x2+Cland(Lβˆ’x)C(x) = C_{\text{water}} \sqrt{w^2 + x^2} + C_{\text{land}} (L - x)
    (Defined in Fastest Path Across Media and Snell's Law.)

Step 2: Assign parameters
Given width w=500Β mw = 500\text{ m}, downstream distance L=1200Β mL = 1200\text{ m}, Cwater=$250/mC_{\text{water}} = \$250/\text{m}, Cland=$150/mC_{\text{land}} = \$150/\text{m}.

C(x)=2505002+x2+150(1200βˆ’x)forΒ x∈[0,1200]C(x) = 250\sqrt{500^2 + x^2} + 150(1200 - x) \quad \text{for } x \in [0, 1200]

Step 3: Differentiate and find critical numbers

Cβ€²(x)=250β‹…x5002+x2βˆ’150C'(x) = 250 \cdot \frac{x}{\sqrt{500^2 + x^2}} - 150
Set Cβ€²(x)=0C'(x) = 0:
250x250,000+x2=150β€…β€ŠβŸΉβ€…β€Šx250,000+x2=150250=35\frac{250x}{\sqrt{250,000 + x^2}} = 150 \implies \frac{x}{\sqrt{250,000 + x^2}} = \frac{150}{250} = \frac{3}{5}
Squaring both sides:
x2250,000+x2=925β€…β€ŠβŸΉβ€…β€Š25x2=9x2+2,250,000\frac{x^2}{250,000 + x^2} = \frac{9}{25} \implies 25x^2 = 9x^2 + 2,250,000
16x2=2,250,000β€…β€ŠβŸΉβ€…β€Šx2=140,625β€…β€ŠβŸΉβ€…β€Šx=375Β meters16x^2 = 2,250,000 \implies x^2 = 140,625 \implies x = 375\text{ meters}

Step 4: Execute Closed Interval Method

  • At x=0x = 0 (perpendicular water crossing):
    C(0)=250(500)+150(1200)=125,000+180,000=$305,000C(0) = 250(500) + 150(1200) = 125,000 + 180,000 = \$305,000
  • At x=1200x = 1200 (direct diagonal underwater line):
    C(1200)=2505002+12002=250(1300)=$325,000C(1200) = 250\sqrt{500^2 + 1200^2} = 250(1300) = \$325,000
  • At x=375x = 375 (optimal angled crossing):
    C(375)=2505002+3752+150(1200βˆ’375)=250(625)+150(825)=156,250+123,750=$280,000C(375) = 250\sqrt{500^2 + 375^2} + 150(1200 - 375) = 250(625) + 150(825) = 156,250 + 123,750 = \$280,000

The minimum cost is $280,000\$280,000, achieved by landing the subsea pipe 375Β meters375\text{ meters} downstream.


Connections & References