Hi, I have a question and the answer but i am slightly uncertain how the answer is achieved and was wondering if someone could please explain it to me.

Q: Using the fact that 2/(e^[2x]+1)=1 - (e^[2x]-1)/(e^[2x]+1)

integrate 1/(e^[2x]+1) with respect to x

A: 1/2{x-ln(e^x+e^-x)}+c

any help would be great thanks