Posted by samuel r. edward on Wednesday, October 12, 2011 at 5:03am.
You have a typo which makes it kind of confusing.
tan x = n tan y
so
sin x/cos x = n sin y/cos y
n = (cos y/cos x)(sin x/sin y)
but
m = (sin x/sin y)
sin y = (1/m) sin x
cos^2 y = 1-sin^2y = 1-(1/m^2) sin^2x
so
n = (cos y / cos x)m
n^2 = (m^2)(cos^2 y/cos^2 x)
n^2 = (m^2/cos^2x) [ 1-(1/m^2)sin^2 x]
n^2 = m^2/cos^2x - sin^2x/cos^2x
n^2 cos^2x = m^2 - (1-cos^2x)
n^2 cos^2 x = m^2 - 1 + cos^2 x
(n^2-1)cos^2 x = m^2-1
so
cos^2 x = (m^2-1)/(n^2-1)