# How to Integrate 1/(e^x + e^-x)

The function f(x) = 1/(e^x + e^-x) is the same as one half of the hyperbolic secant of x, i.e., f(x) = sech(x)/2. The hyperbolic secant is the reciprocal of the hyperbolic cosine function cosh(x). This function looks like a bell curve, with a peak at x = 0 and ends that taper off to zero as x goes to infinity or negative infinity. While the classic bell curve function g(x) = e^(-x^2) has no closed-form antiderivative, the function f(x) = sech(x)/2 does have an antiderivative that can be worked out using the substitution method. You can use the antiderivative to find exact areas under the curve.

## Graph of y = 1/(e^x + e^-x)

## Putting the Integral in a Simpler Form

If you multiply the numerator and the denominator of the function y = 1/(e^x + e^-x) by the expression e^x, then you can write the function in a new form that eliminates negative exponents.

y = [ 1 / (e^x + e^-x) ] * [ e^x / e^x ]

= e^x / [ e^(2x) + 1 ]

## Applying the Substitution Method

If we let u = e^x and du = e^x dx, then the integral

∫ e^x / [e^(2x) + 1] dx

can be transformed into

∫ e^x / [e^(2x) + 1] dx

= ∫ 1/[e^(2x) + 1] * e^x dx

= ∫ 1/(u^2 + 1) du

Since the antiderivative of 1/(u^2 + 1) is arctan(u), we can use reverse substitution to find the integral of the original function.

∫ 1/(u^2 + 1) du

= arctan(u) + c

= arctan(e^x) + c

## Total Area Under the Curve of y = 1/(e^x + e^-x)

With the antiderivative you can calculate the total area under the curve of y = 1/(e^x + e^-x) from x equals negative infinity to positive infinity.

∫ 1/(e^x + e^-x) dx, { -infinity < x < infinity }

= arctan(e^infinity) - arctan(e^-infinity)

The limit of arctan(e^x) as x goes to infinity is π/2. The limit of arctan(e^x) as x goes to negative infinity is 0. Therefore, the exact value of the integral is

π/2 - 0 = π/2.

Even though the interval of integration is infinity, the total area is finite. Since this curve is symmetric, the total area under the curve from x = 0 to x = infinity is one half of the total area computed above.

## Changing the Plus to a Minus: Integrating y = 1/(e^x - e^-x)

If you merely change the sign in the expression in the denominator, the function and its antiderivative completely change. The expression 1/(e^x - e^-x) is equivalent to csch(x)/2, where csch is the hyperbolic cosecant function. This is also equivalent to 1/(2*sinh(x)). The graph of y = 1/(e^x - e^-x) has a vertical asymptote at x = 0, where the function is undefined.

To integrate y = 1/(e^x - e^-x) you apply the same methods as above. The antiderivative works out to be

∫ 1/(e^x - e^-x) dx = (1/2) * Ln |(e^x - 1)/(e^x + 1)| + C

The integral of this function over the interval 0 to infinity does not converge, nor does any integral over an interval of the form (0, k]. Below is a graph of the function.

## Similar Integrals

In another tutorial we showed how to integrate exponential fraction functions of the form y= 1/(e^(ax) + b). Some exponential fraction functions that are superficially similar to y = 1/(e^x + e^-x) are

- y = e^(bx) / (e^x + e^-x)
- y = x / (e^x + e^-x)
- y = x^2 / (e^x + e^-x)
- y = 1 / (e^x + b + e^-x)

The first has a closed-form antiderivative only when the parameter b is a rational number. The second and third cannot be integrated in terms of elementary functions. The last is integrable because it can be reduced to a function of the form y = 1/(ax^2 + bx + c) via substitution. Here are various indefinite and definite integrals involving hyperbolic trig functions and exponential expressions in the denominator.

The definite integrals in the green formula box above cannot be computed with ordinary integration methods from Calculus II. Instead, these integrals can be solved using contour integration, a technique in complex variables.

## More by this Author

- 10
Trigonometry is an area of geometry that deals with lengths and angles of triangles. And since many two-dimensional figures and three-dimensional sold shapes can be broken down into triangles, trigonometry is also used...

- 27
Comprehensive illustrated list of names for both flat shapes and solid shapes. Geometry reference for elementary and middle school, as well as home school. Over 60 pictures of geometric shapes.

- 8
Two simple functions, sin(x)/x and cos(x)/x, can't be integrated the easy way. Here is how it's done.

## Comments

No comments yet.