We'll solve the integral using substitution technique.
Let e^x = t => e^x dx = dt
`int` e^x dx/(e^2x +1) = `int` dt/(t^2 + 1) = arctan t + C
`int` e^x dx/(e^2x +1) = arctan e^x + C
The requested result of the indefinite integral is represented by the primitive function F(x) = arctan e^x + C, where C represents the family of constants.