Find the derivative of the function.

y=cos((1-e^x)/(1+e^x))
Please show all work and explain. I am very confused

Going the easy way, note that y = cos(-tanh x/2).

y' = -sin(-tanh x/2)*(-sech^2(x/2))*(1/2)
= 1/2 sech^2(x/2) sin(tanh(x/2))

Doing it the hard way,

y = cos(u/v)
y' = -sin(u/v) * (u'v-uv')/v^2
= -sin((1-e^x)/(1+e^x)) * [(-e^x)(1+e^x)-(1-e^x)*e^x]/(1+e^x)^2

= -sin((1-e^x)/(1+e^x)) * [-e^x - 1 - e^x + 1]/(1+e^x)^2

= sin((1-e^x)/(1+e^x)) * 2e^x/(1+e^x)^2

... I think