y(x) = e^(-x^2) = 1-x^2+x^4/2!-x^6/3!+...

y' = ?

First method :

y' = (1-x^2+x^4/2!-x^6/3!+...)' = -2x+4x^3/2!-6x^5/3!+...

y' = -2x+2x^3-x^5+...

Second method :

y' = -2x e^(-x^2)

y' = -2x (1-x^2+x^4/2!-x^6/3!+...)

y' = -2x+2x^3-2x^5/2!+2x^7/3!+...

y' = -2x+2x^3-x^5+...

Both methods lead to the same result.