Given $\int\frac{3e^{2x}-2e^x}{e^{2x}+2e^x-8}dx$
My attempt- Substitute $u=e^x \Rightarrow du=dx.e^x$
The integral becomes
$$\int \frac{3u-2}{u^2+2u-8}du $$
Now, the numerator is a linear function and the denominator is a quadratic function. We can rewrite the numerator as follows
$$\frac{g(x)}{f(x)}=\frac{f^{'}(x)}{f(x)}+\frac{C}{f(x)}$$
Thus the integral may be rewritten as
$$\int \frac{\frac{3}{2}(2u+2)-5}{u^2+2u-8}du$$
Now, break the integral into $2$ sub-integrals
$\Rightarrow \int \frac{\frac{3}{2}(2u+2)}{u^2+2u-8}du-\int \frac{5}{u^2+2u-8}du$
$\Rightarrow \frac{3}{2}\int \frac{(2u+2)}{u^2+2u-8}du-\int \frac{5}{u^2+2u-8}du$
$\Rightarrow \frac{3}{2}\log(u^2+2u-8)-5\int \frac{1}{u^2+2u-8}du$
$\Rightarrow \frac{3}{2}\log(u^2+2u-8)-5\int \frac{1}{(u+1)^2-3^2}du$
$\Rightarrow \frac{3}{2}\log(u^2+2u-8)-\frac{5}{9} \log(\frac{u-2}{u+4})+C$
$\Rightarrow \frac{3}{2}\log(e^{2x}+2e^x-8)-\frac{5}{9} \log(\frac{e^x-2}{e^x+4})+C$
$\Rightarrow \log(\frac{[{e^{2x}+2e^x-8}]^{\frac{3}{2}} } {{[\frac{e^x-2}{e^x+4}}]^{\frac{5}{9}}})+C$
Is my solution correct? Are there other ways to solve such integrals?
Edit: Correction $\Rightarrow \log(\frac{[{e^{2x}+2e^x-8}]^{\frac{3}{2}} } {{[\frac{e^x-2}{e^x+4}}]^{\frac{5}{6}}})+C$
No, it is not correct, since$$\int\frac1{(u+1)^2-3^2}=\frac1{\color{red}6}\log\left(\frac{u-2}{u+4}\right).$$So, your approach should lead to$$\log\left(\frac{\left(e^{2x}+2e^x-8\right)^{\frac32}}{\left(\frac{e^x-2}{e^x+4}\right)^{\frac5{\color{red}6}}}\right)+C.$$But there is a simpler approach: using the fact that$$\frac{3u-2}{u^2+2u-8}=\frac{2}{3(u-2)}+\frac{7}{3(u+4)},$$you get that$$\int\frac{3u-2}{u^2+2u-8}\,\mathrm du=\frac23\log\left(\left|u-2\right|\right)+\frac73\log\left(\left|u+4\right|\right).$$