<s>[INST] Calculating angle of min deviation of prism Two rays incident with angle 40 and 60 on one face of equilateral triangular prism  the angle of deviation are equal .find angle of minimum deviation?
 [/INST] The graph of angle of deviation vs angle of incidence is a $U$ shape.  The fact that the angle of deviation is the same for these two rays means that a ray which is incident at $40$ degrees to the normal will emerge at $60$ degrees to the normal. This allows us to find the refractive index.
$$\sin i_1 = \sin 40 = n\sin r_1$$
$$n\sin i_2 = \sin r_2 = \sin 60$$
From geometry, $r_1+i_2 = A = 60$ therefore
$$\sin r_1 = \sin (60-i_2) = \sin60\cos i_2 - \cos 60\sin i_2$$
hence
$$\begin{eqnarray} \sin 40 &=& n\left(\sin 60\cos i_2 - \cos 60\sin i_2\right)\\
&=& \sin 60 \;n\cos i_2 - \cos 60 \;n\sin i_2\\  
&=& \sin60 \;n\cos i_2 - \cos 60\sin 60\end{eqnarray}$$
$$n\cos i_2 = \frac{\sin 40}{\sin 60} + \cos 60 = 1.24223$$
$$n^2\cos^2 i_2 = n^2 - (n\sin i_2)^2 = n^2 - (\sin 60)^2 = n^2 - 0.75 = 1.54313$$
$$n^2 = 2.29313$$
$$n = 1.51431$$  
When deviation is a minimum then
$$\sin \frac{A+D}2 = n\sin \frac A2 = 1.51431\times\sin 30 = 0.75715$$
$$\frac{A+D}2 = 49.2\; degrees$$
$$D = 98.4 - 60  
= 38.4 \;degrees$$
</s>