Simplifying the result of integration of $\int\frac{e^x + e^{3x}}{1-e^{2x}+e^{4x}}\mathop{dx}$

Hint: $$ \arctan(x)\pm\arctan(y) = \arctan(z) $$ where $z$ is: $$ z = \frac{x\pm y}{1\mp xy} $$ We have to prove that: $$ \frac{\pi}{2} + \arctan(2\sinh x) = \arctan(2e^x+\sqrt{3})+\arctan(2e^x-\sqrt{3})$$ Looking at the arguments and the fact that $ \arctan(\infty) = \pi/2 $ we conclude: $$ \frac{\infty+2\sinh x}{1-\infty \cdot 2\sinh x} = \frac{(2e^x+\sqrt{3})+(2e^x-\sqrt{3})}{1-(2e^x+\sqrt{3})(2e^x-\sqrt{3})}$$ $$ -\frac{1}{2\sinh x} = \frac{4e^x}{-4e^{2x}+4} = -\frac{1}{e^x-e^{-x}} = -\frac{1}{2\sinh x}$$ qed.


Note that since $$\tan(A\pm B)=\frac{\tan A\pm\tan B}{1\mp\tan A\tan B},$$ replacing $\arctan C:=A$ and $\arctan D:=B$ yields $$\arctan C\pm\arctan D=\arctan\frac{C\pm D}{1\mp CD}\pm\left\{0,\pi\right\}\tag1$$ due to its periodic nature. As $\pm0$ is attained whenever $1\mp CD>0$, \begin{align}\arctan(2e^x+\sqrt3)+\arctan(2e^x-\sqrt3)&=\arctan\frac{2e^x+\sqrt3+2e^x-\sqrt3}{1-(2e^x+\sqrt3)(2e^x-\sqrt3)}\\&=\arctan\frac{4e^x}{4-4e^{2x}}\\&=\arctan\frac{1}{e^x-e^{-x}}\\&=-\arctan\frac1{2\sinh x}\end{align} for $4-4e^{2x}>0\implies x<0$. Now for positive $x$, \begin{align}\arctan(\pm x)+\arctan\frac1{\pm x}=\pm\frac\pi2,\tag2\end{align} and since $2\sinh x>0$, taking the negative sign of $(2)$ gives $$-\arctan\frac1{2\sinh x}=\arctan(2\sinh x)+\frac\pi2,$$ and hence $$\boxed{\arctan(2e^x+\sqrt3)+\arctan(2e^x-\sqrt3)=\arctan(2\sinh x)+\frac\pi2,\quad x<0}$$ so your equality is proven for $x<0$. Finally, for $x>0$, we get from $(1)$ that \begin{align}\arctan(2e^x+\sqrt3)+\arctan(2e^x-\sqrt3)&=-\arctan\frac1{2\sinh x}+\pi\end{align} where the positive sign is taken as the LHS is positive on the whole of $x\in\Bbb R$. Taking the positive sign of $(2)$ yields $$-\arctan\frac1{2\sinh x}=\arctan(2\sinh x)-\frac\pi2$$ and thus $$\boxed{\arctan(2e^x+\sqrt3)+\arctan(2e^x-\sqrt3)=\arctan(2\sinh x)+\frac\pi2,\quad x>0.}$$ After checking the point $x=0$, the result follows. $\square$


Let's start off from $$\sinh(x) = \frac{e^x-e^{-x}}{2} = -\frac{e^{-x}-e^x}{2} = -\frac{\frac{1}{e^x}-e^x}{2} = -\frac{1-e^{2x}}{2e^x} = -\frac{4-4e^{2x}}{8e^{2x}} = \\ = -\frac{1-(4e^{2x}-3)}{8e^x} = -\frac{1-(2e^x+\sqrt{3})(2e^x-\sqrt{3})}{8e^x}.$$ For conveniency, I'll rewrite this as: $$2\sinh(x)=-\frac{1-(2e^x+\sqrt{3})(2e^x-\sqrt{3})}{4e^x}.\tag{1}$$ Now since $$\cot(\arctan(x)) = \frac{1}{\tan(\arctan(x))} = \frac{1}{x}$$ We can just take the $\cot(\arctan())$ of the reciprocal of the right side of $(1)$: $$2\sinh(x) = -\cot\left(\arctan\left(\frac{4e^x}{1-(2e^x+\sqrt{3})(2e^x-\sqrt{3})}\right)\right) = \\ = -\cot\left(\arctan\left(\frac{2e^x+\sqrt{3}+2e^x-\sqrt{3}}{1-(2e^x+\sqrt{3})(2e^x-\sqrt{3})}\right)\right)\tag{2}$$ Now we'll show a formula for $\arctan(x) + \arctan(y)$: $$\tan(\alpha+\beta) = \frac{\tan(\alpha)+\tan(\beta)}{1+\tan(\alpha)\tan(\beta)}$$ $$\alpha+\beta = \arctan\left(\frac{\tan(\alpha)+\tan(\beta)}{1+\tan(\alpha)\tan(\beta)}\right)$$ Now with the substitution $\alpha = \arctan(x)$ and $\beta = \arctan(y) \leftrightarrow x = \tan(\alpha), y = \tan(\beta)$: $$\arctan(x) + \arctan(y) = \arctan\left(\frac{x+y}{1-xy}\right) \tag{3}$$ Now we'll use $(3)$ with $x=2e^x+\sqrt{3}, y=2e^x-\sqrt{3}$ on $(2)$: $$2\sinh(x) = -\cot(\arctan(2e^x+\sqrt{3})+\arctan(2e^x-\sqrt{3}))\tag{4}$$ Now finally, we'll use the equality that $$\tan\left(x-\frac{\pi}{2}\right) = -\cot(x)\tag{5}$$ Putting $(5)$ into $(4)$ we get: $$2\sinh(x) = \tan\left(\arctan(2e^x+\sqrt{3})+\arctan(2e^x-\sqrt{3})-\frac{\pi}{2}\right)$$ Or: $$\arctan(2\sinh(x)) = \arctan(2e^x+\sqrt{3})+\arctan(2e^x-\sqrt{3})-\frac{\pi}{2}.$$