Solving Math Equations Within Trig Function