To find the derivative, we have to use the Quotient Rule, and, the Chain Rule, given below for ready reference :-
The Quotient Rule :- d/dx(u/v)={v(du)/dx-u(dv)/dx}/v^2ddx(uv)=vdudx−udvdxv2.
By the Chain Rule, d/dxe^(ax)=e^(ax)*d/dx(ax)=a*e^(ax)ddxeax=eax⋅ddx(ax)=a⋅eax.
As a particular case of this, we have, d/dxe^-x=-e^-xddxe−x=−e−x.
Hence,
(dY)/dxdYdx
={(e^x+e^-x)d/dx(e^x-e^-x)-(e^x-e^-x)d/dx(e^x+e^-x)}/(e^x+e^-x)^2=(ex+e−x)ddx(ex−e−x)−(ex−e−x)ddx(ex+e−x)(ex+e−x)2
={(e^x+e^-x)(e^x-(-e^-x))-(e^x-e^-x)(e^x-e^-x)}/(e^x+e^-x)^2=(ex+e−x)(ex−(−e−x))−(ex−e−x)(ex−e−x)(ex+e−x)2
={(e^x+e^-x)^2-(e^x-e^-x)^2}/(e^x+e^-x)^2=(ex+e−x)2−(ex−e−x)2(ex+e−x)2
=4/(e^x+e^-x)^2=4(ex+e−x)2.
In fact, if we use hyperbolic funs., then, since Y=tanhxY=tanhx, we can directly say that (dY)/dx=sech^2x=4/(e^x+e^-x)^2dYdx=sech2x=4(ex+e−x)2.