# Fake proof that $\frac{e^x-1}{e^x+1}=e^x$, via integrating $\operatorname{sech} x$ in two ways

$$\int \text{sech}(x)dx$$

Method 1
\begin{align} \int \text{sech}(x)dx & = \int\frac{2}{e^x+e^{-x}}dx \\ &= \int\frac{2e^x}{e^{2x}+1}dx \end{align} Using the substitution $u=e^x$,
\begin{align} \int \text{sech}(x)dx & = \int\frac{2}{u^2+1}du \\ &= 2\text{ arctan}(u)+c \\ &= 2\text{ arctan}(e^x)+c \end{align}

Method 2
\begin{align} \int \text{sech}(x)dx & = \int\frac{\text{cosh}(x)}{\text{cosh}^2(x)}dx \\ & = \int\frac{\text{cosh}(x)}{\text{sinh}^2(x)+1}dx \end{align} Using the substitution $u=\text{sinh}(x)$, \begin{align} \int \text{sech}(x)dx & = \int\frac{1}{u^2+1}du \\ &= \text{arctan}(\text{sinh}(x))+c \\ &= 2\text{ arctan}(\text{tanh}(\frac{x}{2}))+c \\ &= 2\text{ arctan}(\frac{e^x-1}{e^x+1})+c \end{align}

Thus, we obtain:

$$\frac{e^x-1}{e^x+1}=e^x$$

However, I see no reason why they are equal. Did I do something wrong in the calculation?

• Because $2\arctan\left(\frac{e^x-1}{e^x+1}\right)=2\left(\arctan(e^x)-\frac\pi4\right)=2\arctan(e^x)+C'$ Commented Jun 23, 2016 at 13:55
• Related: "I can't remember a fallacious proof involving integrals and trigonometric identities" with the classic "proof" of $0=1$ via integrating $\sin 2x$ in two ways.
– Blue
Commented Jun 23, 2016 at 14:00
• It is easy to conflate the $+C$ as the same constant whenever you compute an indefinite integral different ways. You are really specifying a(n equivalence) class of functions--those that differ by a constant--and so you can only conclude your two results are in the same class of functions, not that they are equal. Commented Jun 23, 2016 at 14:04
• This particular occurs when dealing with trigonometric integrals because there are many hidden identities that can allow us to express the result in different ways. Commented Jun 23, 2016 at 14:05

Because $2\arctan\left(\frac{e^x-1}{e^x+1}\right)=2\left(\arctan(e^x)-\frac\pi4\right)=2\arctan(e^x)+C'$.
• Can you further explain why $\text{arctan}(\frac{e^x-1}{e^x+1})$ can be transformed into $\text{arctan}(e^x)-\pi/4$? Commented Jun 23, 2016 at 14:08
• Try expanding $\tan(\arctan(e^x)-\frac{\pi}4)$ by sum of angle Commented Jun 23, 2016 at 14:15