If $$x^2+y^2=2015$$ find the maximum value of $$x^2+2xy-y^2$$
I have actually solved this question but as you see this question is apparently of number theory and I have solved this using trigonometry. I want to know about other methods of solving this question. If they include just number theory concepts then that will be even better. I am sharing my attempt as an answer below. Any contribution is greatly appreciated.