The angles around theta add up to 180 (they are on a straight line)
Can you differenciate that? looks like it might get messy...
use with the length of the hypotenuse defined by ; the length of the hypotenuse defined by ; and the hypotenuse of the triangle spanning the two apexes = . The angle will be maximized when is minimized.
So simply differentiate the function with respect to to find the minimum.