Solveeit Logo

Question

Question: $\int_{-1}^{1} \frac{\cos x}{1+e^{1/x}} dx = ?$...

11cosx1+e1/xdx=?\int_{-1}^{1} \frac{\cos x}{1+e^{1/x}} dx = ?

Answer

sin1\sin 1

Explanation

Solution

Let

I=11cosx1+e1xdxI=\int_{-1}^{1}\frac{\cos x}{1+e^{\frac{1}{x}}}\,dx.

Define

f(x)=cosx1+e1/xf(x)=\frac{\cos x}{1+e^{1/x}}.

Make the substitution xxx\to -x. Then, we have:

f(x)=cos(x)1+e1/(x)=cosx1+e1/xf(-x)=\frac{\cos(-x)}{1+e^{1/(-x)}}=\frac{\cos x}{1+e^{-1/x}}.

Now, add the two:

f(x)+f(x)=cosx1+e1/x+cosx1+e1/x=cosx(11+e1/x+11+e1/x)f(x)+f(-x)=\frac{\cos x}{1+e^{1/x}}+\frac{\cos x}{1+e^{-1/x}}=\cos x\left( \frac{1}{1+e^{1/x}}+\frac{1}{1+e^{-1/x}}\right).

Notice that for any real number zz, it holds that:

11+ez+11+ez=1\frac{1}{1+e^{z}}+\frac{1}{1+e^{-z}}=1.

Thus,

f(x)+f(x)=cosxf(x)+f(-x)=\cos x.

Changing the order of integration (using the symmetry about 0), we get:

I=11f(x)dx=01[f(x)+f(x)]dx=01cosxdxI=\int_{-1}^{1}f(x)\,dx=\int_{0}^{1}\Big[f(x)+f(-x)\Big]\,dx =\int_{0}^{1}\cos x\,dx.

Now, evaluate the integral:

01cosxdx=sinx01=sin1sin0=sin1\int_{0}^{1}\cos x\,dx=\sin x\Big|_{0}^{1}=\sin 1-\sin 0=\sin 1.