assume(v1>0,v2>0,cos(f)>0,sin(f)>0,b>a,a>0);
x1:b*cos(f);
y1:a*sin(f);
r2:x1^2+y1^2;
nx:diff(y1,f,1),ratsimp;
ny:-diff(x1,f,1),ratsimp;
n2:nx^2+ny^2;
sin2r:1-(x1*nx+y1*ny)^2/(r2*n2),ratsimp,factor;
sin2r1:sin2r*(v2/v1)^2;
r1:v2*(t-sqrt(r2)/v1),ratsimp;
kn:r1*sqrt((1-sin2r1)/n2),ratsimp,factor;
kl:-r1*sqrt(sin2r1/n2),ratsimp,factor;
x2:x1+kn*nx-kl*ny,radcan;
y2:y1+kn*ny+kl*nx,radcan;