Total internal reflection problem -- could the textbook be wrong? This regards the following problem:
A ray of light is traveling in glass and strikes a glass/liquid interface. The angle of incidence is $58.0^\circ$ and the index of refraction of the glass is $n = 1.50$. What is the largest index of refraction that the liquid can have, such that none of the light is transmitted into the liquid and all of it is reflected back into the glass?
My solution: We have $n_1 \sin \theta_1 = n_2 \sin \theta_2$. We wish to maximize $n_2$ provided $90^\circ \leq \theta \leq 180^\circ$. Plugging in our givens, we have $(1.50)(\sin 58^\circ) = n_2 \sin \theta_2 \rightarrow n_2 = \frac{(1.50)(\sin 58^\circ)}{\sin \theta_2}$. Since we wsh to maximize $n_2$, we should minimize $\sin \theta_2$, which can be any value in $(0, 1]$ so there is no theoretical limit on the size of $n_2$ (according to this math)
However, the textbook says the correct maximum is $1.27$, which is taking $\theta_2 = 90^\circ$. I don't think this is right at all, since if anything that is the minimum. Consider $1 < n_2 < 1.27$. Then $1.27 > \sin \theta_2 > 1$, which is impossible given the range of the sine function over the reals.
Who is right?
 A: The textbook is right, just plug in some numbers:
(let's say $n_2=1.3>1.27$)
$$1.5*\sin 58^\circ = 1.3* \sin \theta_2 $$ $$ \sin \theta_2=\frac{1.5}{1.3}*\sin 58^\circ$$
$$\theta_2=78^\circ <90^\circ$$
And if you go by the usual definition of $\theta_2$ (https://en.wikipedia.org/wiki/File:Snells_law2.svg) then this would mean that the beam would go into the liquid. This is why it's the largest refractive index: because for any larger index, as calculated above, the beam is not reflected.
(You can see your problem this way: the critical angle ($\theta_c=58^\circ$) is already given to you (this is why $\theta_2=90^\circ$) and you're looking for the refractive index of the liquid.)
And considering your $1 < n_2 < 1.27$ and the impossibility of $sin(\theta_2)>1$ argument: this is exactly the point of T.I.R.
Say you have n=1 for air.
Then $sin(\theta_2)=1.27$ obviously. Now you say this is impossible, and it is. But you have to remember that Snell's law is formulated for the incident and refracted beam. 
http://scienceworld.wolfram.com/physics/SnellsLaw.html
Since $sin(\theta_2)>1$ is not possible for any refracted $\theta$, there is no refraction and only reflection. 
A: for Total internal reflection, $(\theta_2)\ge90$,so we can calculate the minimum $n_2$ required for Total internal reflection by setting $\theta_2=90$. 
$$n_1 sin(\theta_1)=n_2 sin(\theta_2)$$
$$1.50 \cdot sin(58^{o})=n_2 sin(90)$$
$$\dfrac{1.50 \cdot sin(58^{o})}{sin(90)}=n_2$$
$$\therefore n_2=1.27$$
So, your textbook is right
