$ \int_{-\infty}^{\infty} \frac{e^{2x}}{ae^{3x}+b} dx,$ where $a,b \gt 0$ Evaluate
$$ \int_{-\infty}^{\infty} \frac{e^{2x}}{ae^{3x}+b} dx,$$ where $a,b \gt 0$ 
I tried using $y=e^x$, but I still can't solve it.
I get $\displaystyle\int_0^\infty \frac y{ay^3+b} \, dy.$
Is there any different method to solve it?
 A: It suffices to compute:
$$\int \frac{y}{y^3 - r^3}dy$$
(putting $r = - \sqrt[3]{\frac{b}{a} }$). Let's assume that $a, b > 0$.
After decomposing into partial fractions, i.e.:
$$\frac{y}{y^3 - r^3} = \frac1{3r} \left( \frac1{y - r} - \frac{y - r}{y^2 + ry + r^2} \right)$$
we find:
$$\int\frac{y}{y^3 -r^3} dy = \frac1{3r}\left[ \log\left( \frac{y-r}{\sqrt{y^2 + ry + r^2}} \right) + \sqrt 3 \arctan \left( \frac{2y + r}{r \sqrt 3} \right) \right]$$
Hence, 
$$\int_0^{\infty} \frac{y}{y^3-  r^3} dy = \frac{1}{r\sqrt 3} \left( \arctan (-\infty) - \arctan\left( \frac1{\sqrt 3} \right) \right)=  -\frac{2\pi}{3r\sqrt 3}$$
and so,
$$\int_{-\infty}^{\infty} \frac{e^{3x}}{ae^{2x} + b} dx  = \frac{2\pi}{3\sqrt 3 \sqrt[3]{a^2 b}}$$
A: $$
\begin{align}
\int_{-\infty}^\infty\frac{e^{2x}}{ae^{3x}+b}\,\mathrm{d}x
&=\frac1{3b}\left(\frac ba\right)^{2/3}\int_0^\infty\frac{u^{-1/3}}{u+1}\,\mathrm{d}u\tag{1}\\
&=\frac13\left(\frac1{ba^2}\right)^{1/3}\pi\csc\left(\frac23\pi\right)\tag{2}\\
&=\frac{2\pi}{3\sqrt3}\left(\frac1{ba^2}\right)^{1/3}\tag{3}
\end{align}
$$
Explanation:
$(1)$: $u=\frac abe^{3x}$
$(2)$: result from this answer
$(3)$: $\csc\left(\frac23\pi\right)=\frac2{\sqrt3}$
A: Dividing both numerator and denominator by $e^{3x}$, we get $$\frac{e^{2x}}{ae^{3x}+b} dx=\frac{e^{-x}}{a+be^{-3x}} dx$$ 
If you use $y=e^{-x}$, then you get $$-\frac{dy}{a+by^3}=-\frac{1}{b}\cdot\frac{dy}{y^3+r^3}$$ where $r=\sqrt[3]{\frac{b}{a}}$
Now if you substitute $y=r\tan^\frac{2}{3} \theta$ and $dy=\frac{2}{3}r\tan^{-\frac{1}{3}} \theta \sec^2 \theta \, d\theta$, your integrand will become
$$-\frac{1}{b}\cdot\frac{\frac{2}{3}r\tan^{-\frac{1}{3}} \theta \sec^2 \theta \, d\theta}{r^3\sec^2 \theta}=-\frac{2}{3br^2}\cdot\tan^{-\frac{1}{3}} \theta \, d\theta$$
If you change the limits properly, then I think you will be able to complete the integration. Hope this helps.
A: WLOG, $a=b=1$. Then factoring the denominator, we decompose in simple fractions
$$\frac y{y^3+1}=A\frac1{y+1}+B\frac{2y-1}{y^2-y+1}+C\frac1{y^2-y+1}=\frac{(A+2B)y^2+(-A+B+C)y+(A-B+C)}{y^3+1}.$$
Identifying,
$$\frac y{y^3+1}=\frac13\frac1{y+1}-\frac16\frac{2y-1}{y^2-y+1}+\frac12\frac1{y^2-y+1}.$$
The first two terms have an obvious antiderivative. The third one also becomes easy by completing the square
$$\frac1{y^2-y+1}=\frac1{\left(y-\frac12\right)^2+\frac34}=\frac43\frac1{\left(\sqrt{\frac43}(y-\frac12)\right)^2+1}$$ which yields an arctangent.
A: $$
ay^3 + b = a\left( y^3 + \frac b a \right)
$$
$$
y^3 + \frac b a = y^3 +c^3 = (y+c)(y^2 - yc + c^2) \quad\text{where } c = \sqrt[3]\frac b a.
$$
So use partial fractions to get
$$
\frac \bullet {y+c} + \frac {((\bullet\, y) + \bullet)} {y^2 - yc + c^2}.
$$
To integrate the second term, you have
$$
\frac {ey+f}{y^2 - yc + c^2},
$$
and letting $u=y^2-yc+c^2$ so $du = (2y-c)\,dy$. Multiplying both sides of the last equality by $e/2$, we get
$$
\frac e 2 \, du = \left( ey+\frac{ce}{2} \right) \, dy.
$$
So
$$
(ey+f)\,dy = \left( \underbrace{\left( ey + \frac{ce}2 \right)\,dy} + \left( f - \frac{ce}2 \right) \, dy  \right).
$$
The substitution handles the part over the $\underbrace{\text{underbrace}}.$  Then you have
$$
\int \frac{dy}{y^2-yc+c^2}. 
$$
Complete the square
$$
y^2 - yc + c^2 = \left( y^2 - yc + \frac{c^2} 4 \right) + \frac{3c^2} 4 = \left( y - \frac c 2 \right)^2 + \frac{3c^2} 4.
$$
So when you integrate, you get an arctangent.
