Answer
$$\frac{1}{3}\ln (2e^x-1)- \frac{1}{3}\ln (e^x+1)+c$$
Work Step by Step
Given
$$ \int \frac{1}{1+2 e^x-e^{-x}} d x$$
Since
$$ \int \frac{e^x}{e^x+2 e^{2x}-1} d x$$
Let
$$u=e^x \ \to \ \ du e^xdx $$
Then
\begin{aligned}
\int \frac{e^x}{e^x+2 e^{2x}-1} d x&= \int \frac{1}{2u^2+u-1}du\\
&=\int \frac{1}{\left(2u-1\right)\left(u+1\right)}du
\end{aligned}
Use partial fractions
\begin{aligned} \frac{1}{\left(2u-1\right)\left(u+1\right)}&=\frac{a_0}{2u-1}+\frac{a_1}{u+1}\\
1&= a_0\left(u+1\right)+a_1\left(2u-1\right)\end{aligned}
at $u=-1\to \ a_1 =-1/3,\ \ u= 1/2\to a_0 =2/3$, then
\begin{aligned}
\int \frac{e^x}{e^x+2 e^{2x}-1} d x&= \int \frac{1}{2u^2+u-1}du\\
&=\int \frac{1}{\left(2u-1\right)\left(u+1\right)}du\\
&=\int \frac{2}{3\left(2u-1\right)}du-\int\frac{1}{3\left(u+1\right)}du\\
&= \frac{1}{3}\ln (2u-1)- \frac{1}{3}\ln (u+1)+c\\
&= \frac{1}{3}\ln (2e^x-1)- \frac{1}{3}\ln (e^x+1)+c
\end{aligned}