1. The problem statement, all variables and given/known data A ray of light enters a glass block of refractive index n and thickness d with angle of incidence θ1. Part of the ray refracts at some angle θ2 such that Snell's law is obeyed, and the rest undergoes specular reflection. The refracted ray reflects off the bottom of the block and then refracts back out. How should θ1 be chosen to maximize the perpendicular distance x between the ray which reflects off the surface, and the ray which reflects off the bottom of the block and refracts back into the atmosphere? This problem seems a natural fit for Lagrange multipliers, but I am open to other approaches. 2. Relevant equations If we let x(θ1,θ2) be the objective function and sin(θ1) = n sin(θ2) the constraint, then we get ∇f(θ1,θ2,λ) = 0, where f(θ1,θ2,λ) = x(θ1,θ2) - λ(sin(θ1) - n sin(θ2)) 3. The attempt at a solution I derived x to be equal to d tan(θ2) / sin(θ1), giving a final answer of θ1 = arsin(sqrt(n2-1)), but this does not seem physically reasonable. Can anyone spot where I went wrong?