Linear First Order ODE/y' + y = 1 over (1 + exp 2 x)

Theorem
The linear first order ODE:
 * $(1): \quad y' + y = \dfrac 1 {1 + e^{2 x} }$

has the solution:
 * $y = e^{-x} \arctan \left({e^x}\right) + C e^{-x}$

Proof
$(1)$ is in the form:
 * $\dfrac {\mathrm d y}{\mathrm d x} + P \left({x}\right) y = Q \left({x}\right)$

where $P \left({x}\right) = 1$.

Thus:

Thus from Solution by Integrating Factor, $(1)$ can be rewritten as:
 * $\dfrac {\mathrm d} {\mathrm d x} \left({e^x y}\right) = \dfrac {e^x} {1 + e^{2 x} }$

and the general solution becomes:
 * $\displaystyle y {e^x} = \int \frac {e^x} {1 + e^{2 x} } \, \mathrm d x$

The integral on the can be solved by substituting:
 * $u = e^x \implies \mathrm d u = e^x \, \mathrm d x$

and so:

or:
 * $y = e^{-x} \arctan \left({e^x}\right) + C e^{-x}$