What's the difference between (-x)^y and -x^y?
THEY ARE NOT THE SAME :)
\((-x)^y = (-1)^y\times x^y\\~\\ -x^y=-1\times x^y\\~\\ \text{these two expressions will be the same only if }(-1)^y=-1\\ \text{when will this be true?}\\~\\ \text{Well, it will be true if y is odd, it will be false if y is even}\\ \text{so they are definitely not the same thing.}\)