En Joy said:
I know calculus and the derivation of Shell's law because I have completed graduation (Physics honours) and I am a primary school teacher also. The problem came to my mind suddenly while studying calculus of variation, so this is not a school homework. Trust me.
Yes, calculus will need here to sove this problem but I tried my best and did already show my attempt in the picture.
En Joy said:
I want to know the value of θm
The solution is pretty horrible.
First, I will change the picture to put point A on the y-axis at ##(0,h)## and point B to the right at ##(a,-b)##. So, the path crosses the horizontal axis at ##x \in (0,a)##. (Basically, instead of putting the origin at the crossing point and the having variable endpoints, I prefer to fix the ends---but of course, it is equivalent.) We have two equations. Since ##x = h \tan(\theta_m)## and ##a-x = b \tan(\theta_p)## we have
$$h \tan(\theta_m) + b\tan(\theta_p) = a.$$
We also have ##\sin(\theta_p) = r \sin(\theta_m)##, where ##r = v_p/v_m##. Expressing everything in terms of ##z = \sin(\theta_m)## the problem reduces to the solution of the equation
$$ (1)\;\;\frac{h z}{\sqrt{1-z^2}}+\frac{b r z}{\sqrt{1-r^2 z^2}} = a.$$
This can be re-written as a rather horrible 4th degree polynomial in ##u =z^2## that is too long and complicated to reproduce here. Using 4th degree solution formulas, the equation can be solved in principle, but the results are not pretty. Maple takes about 59 pages of nasty, and complicated formulas to write out all four solutions to the polynomial. I'm not sure what use that would be to anybody.
Note added in edit: a much easier equation results if we look at the crossing point ##x## as the variable, instead of the angles. Snell's law gives
$$(2) \;\;\frac{1}{v_m} \frac{x}{\sqrt{x^2+h^2}} = \frac{1}{v_p} \frac{a-x}{\sqrt{(a-x)^2+b^2}}.$$
Squaring both sides leads to a relatively tractable 4th degree polynomial. Exact solutions are still lengthy and un-enlightening. However, numerical solution of the ##x##-problem is simpler than for the ##\theta_m##-problem. Eq. (2) also follows directly by setting the ##x##-derivative to zero of the total time function ##T = \sqrt{x^2+h^2} / v_m + \sqrt{(a-x)^2 + b^2} / v_p.##