another way is to let y=x-x^2, then use the power relation: y'=1-2x
You can ask a new question or answer this question.