Let the height of the long vertical column with transparent liquid be h and dx be the thickness
The angle at which the ray AB enters is θ
Let y be the new height of the liquid
(θ + d θ) is the emerging angle while (y + dy) is the height.
From Snell’s law,
μ(y) sin θ = μ (y + dy) sin (θ + d θ)
After integration we get,
θ = -1/ μ d μ/dy d