3.64 \(\int \frac{x^2}{\left (b f^{-x}+a f^x\right )^3} \, dx\)

Optimal. Leaf size=316 \[ \frac{i \text{PolyLog}\left (3,-\frac{i \sqrt{a} f^x}{\sqrt{b}}\right )}{8 a^{3/2} b^{3/2} \log ^3(f)}-\frac{i \text{PolyLog}\left (3,\frac{i \sqrt{a} f^x}{\sqrt{b}}\right )}{8 a^{3/2} b^{3/2} \log ^3(f)}-\frac{i x \text{PolyLog}\left (2,-\frac{i \sqrt{a} f^x}{\sqrt{b}}\right )}{8 a^{3/2} b^{3/2} \log ^2(f)}+\frac{i x \text{PolyLog}\left (2,\frac{i \sqrt{a} f^x}{\sqrt{b}}\right )}{8 a^{3/2} b^{3/2} \log ^2(f)}+\frac{x^2 \tan ^{-1}\left (\frac{\sqrt{a} f^x}{\sqrt{b}}\right )}{8 a^{3/2} b^{3/2} \log (f)}-\frac{\tan ^{-1}\left (\frac{\sqrt{a} f^x}{\sqrt{b}}\right )}{4 a^{3/2} b^{3/2} \log ^3(f)}+\frac{x^2 f^x}{8 a b \log (f) \left (a f^{2 x}+b\right )}-\frac{x^2 f^x}{4 a \log (f) \left (a f^{2 x}+b\right )^2}+\frac{x f^x}{4 a b \log ^2(f) \left (a f^{2 x}+b\right )} \]

[Out]

-ArcTan[(Sqrt[a]*f^x)/Sqrt[b]]/(4*a^(3/2)*b^(3/2)*Log[f]^3) + (f^x*x)/(4*a*b*(b
+ a*f^(2*x))*Log[f]^2) - (f^x*x^2)/(4*a*(b + a*f^(2*x))^2*Log[f]) + (f^x*x^2)/(8
*a*b*(b + a*f^(2*x))*Log[f]) + (x^2*ArcTan[(Sqrt[a]*f^x)/Sqrt[b]])/(8*a^(3/2)*b^
(3/2)*Log[f]) - ((I/8)*x*PolyLog[2, ((-I)*Sqrt[a]*f^x)/Sqrt[b]])/(a^(3/2)*b^(3/2
)*Log[f]^2) + ((I/8)*x*PolyLog[2, (I*Sqrt[a]*f^x)/Sqrt[b]])/(a^(3/2)*b^(3/2)*Log
[f]^2) + ((I/8)*PolyLog[3, ((-I)*Sqrt[a]*f^x)/Sqrt[b]])/(a^(3/2)*b^(3/2)*Log[f]^
3) - ((I/8)*PolyLog[3, (I*Sqrt[a]*f^x)/Sqrt[b]])/(a^(3/2)*b^(3/2)*Log[f]^3)

_______________________________________________________________________________________

Rubi [A]  time = 1.91856, antiderivative size = 316, normalized size of antiderivative = 1., number of steps used = 43, number of rules used = 14, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.737 \[ \frac{i \text{PolyLog}\left (3,-\frac{i \sqrt{a} f^x}{\sqrt{b}}\right )}{8 a^{3/2} b^{3/2} \log ^3(f)}-\frac{i \text{PolyLog}\left (3,\frac{i \sqrt{a} f^x}{\sqrt{b}}\right )}{8 a^{3/2} b^{3/2} \log ^3(f)}-\frac{i x \text{PolyLog}\left (2,-\frac{i \sqrt{a} f^x}{\sqrt{b}}\right )}{8 a^{3/2} b^{3/2} \log ^2(f)}+\frac{i x \text{PolyLog}\left (2,\frac{i \sqrt{a} f^x}{\sqrt{b}}\right )}{8 a^{3/2} b^{3/2} \log ^2(f)}+\frac{x^2 \tan ^{-1}\left (\frac{\sqrt{a} f^x}{\sqrt{b}}\right )}{8 a^{3/2} b^{3/2} \log (f)}-\frac{\tan ^{-1}\left (\frac{\sqrt{a} f^x}{\sqrt{b}}\right )}{4 a^{3/2} b^{3/2} \log ^3(f)}+\frac{x^2 f^x}{8 a b \log (f) \left (a f^{2 x}+b\right )}-\frac{x^2 f^x}{4 a \log (f) \left (a f^{2 x}+b\right )^2}+\frac{x f^x}{4 a b \log ^2(f) \left (a f^{2 x}+b\right )} \]

Antiderivative was successfully verified.

[In]  Int[x^2/(b/f^x + a*f^x)^3,x]

[Out]

-ArcTan[(Sqrt[a]*f^x)/Sqrt[b]]/(4*a^(3/2)*b^(3/2)*Log[f]^3) + (f^x*x)/(4*a*b*(b
+ a*f^(2*x))*Log[f]^2) - (f^x*x^2)/(4*a*(b + a*f^(2*x))^2*Log[f]) + (f^x*x^2)/(8
*a*b*(b + a*f^(2*x))*Log[f]) + (x^2*ArcTan[(Sqrt[a]*f^x)/Sqrt[b]])/(8*a^(3/2)*b^
(3/2)*Log[f]) - ((I/8)*x*PolyLog[2, ((-I)*Sqrt[a]*f^x)/Sqrt[b]])/(a^(3/2)*b^(3/2
)*Log[f]^2) + ((I/8)*x*PolyLog[2, (I*Sqrt[a]*f^x)/Sqrt[b]])/(a^(3/2)*b^(3/2)*Log
[f]^2) + ((I/8)*PolyLog[3, ((-I)*Sqrt[a]*f^x)/Sqrt[b]])/(a^(3/2)*b^(3/2)*Log[f]^
3) - ((I/8)*PolyLog[3, (I*Sqrt[a]*f^x)/Sqrt[b]])/(a^(3/2)*b^(3/2)*Log[f]^3)

_______________________________________________________________________________________

Rubi in Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**2/(b/(f**x)+a*f**x)**3,x)

[Out]

Timed out

_______________________________________________________________________________________

Mathematica [A]  time = 0.747463, size = 254, normalized size = 0.8 \[ \frac{\frac{3 i \left (2 \text{PolyLog}\left (3,-\frac{i \sqrt{a} f^x}{\sqrt{b}}\right )-2 \text{PolyLog}\left (3,\frac{i \sqrt{a} f^x}{\sqrt{b}}\right )-2 x \log (f) \text{PolyLog}\left (2,-\frac{i \sqrt{a} f^x}{\sqrt{b}}\right )+2 x \log (f) \text{PolyLog}\left (2,\frac{i \sqrt{a} f^x}{\sqrt{b}}\right )+x^2 \log ^2(f) \log \left (1-\frac{i \sqrt{a} f^x}{\sqrt{b}}\right )-x^2 \log ^2(f) \log \left (1+\frac{i \sqrt{a} f^x}{\sqrt{b}}\right )\right )}{b^{3/2}}-\frac{12 \tan ^{-1}\left (\frac{\sqrt{a} f^x}{\sqrt{b}}\right )}{b^{3/2}}-\frac{12 \sqrt{a} x^2 f^x \log ^2(f)}{\left (a f^{2 x}+b\right )^2}+\frac{6 \sqrt{a} x f^x \log (f) (x \log (f)+2)}{b \left (a f^{2 x}+b\right )}}{48 a^{3/2} \log ^3(f)} \]

Antiderivative was successfully verified.

[In]  Integrate[x^2/(b/f^x + a*f^x)^3,x]

[Out]

((-12*ArcTan[(Sqrt[a]*f^x)/Sqrt[b]])/b^(3/2) - (12*Sqrt[a]*f^x*x^2*Log[f]^2)/(b
+ a*f^(2*x))^2 + (6*Sqrt[a]*f^x*x*Log[f]*(2 + x*Log[f]))/(b*(b + a*f^(2*x))) + (
(3*I)*(x^2*Log[f]^2*Log[1 - (I*Sqrt[a]*f^x)/Sqrt[b]] - x^2*Log[f]^2*Log[1 + (I*S
qrt[a]*f^x)/Sqrt[b]] - 2*x*Log[f]*PolyLog[2, ((-I)*Sqrt[a]*f^x)/Sqrt[b]] + 2*x*L
og[f]*PolyLog[2, (I*Sqrt[a]*f^x)/Sqrt[b]] + 2*PolyLog[3, ((-I)*Sqrt[a]*f^x)/Sqrt
[b]] - 2*PolyLog[3, (I*Sqrt[a]*f^x)/Sqrt[b]]))/b^(3/2))/(48*a^(3/2)*Log[f]^3)

_______________________________________________________________________________________

Maple [F]  time = 0.116, size = 0, normalized size = 0. \[ \int{{x}^{2} \left ({\frac{b}{{f}^{x}}}+a{f}^{x} \right ) ^{-3}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^2/(b/(f^x)+a*f^x)^3,x)

[Out]

int(x^2/(b/(f^x)+a*f^x)^3,x)

_______________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^2/(a*f^x + b/f^x)^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.316012, size = 1010, normalized size = 3.2 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^2/(a*f^x + b/f^x)^3,x, algorithm="fricas")

[Out]

1/16*(2*(a^2*x^2*log(f)^2 + 2*a^2*x*log(f))*f^(3*x) - 2*(a*b*x^2*log(f)^2 - 2*a*
b*x*log(f))*f^x + 2*(a^2*f^(4*x)*x*sqrt(-a/b)*log(f) + 2*a*b*f^(2*x)*x*sqrt(-a/b
)*log(f) + b^2*x*sqrt(-a/b)*log(f))*dilog(-(a*f^x + b*sqrt(-a/b))/(b*sqrt(-a/b))
 + 1) - 2*(a^2*f^(4*x)*x*sqrt(-a/b)*log(f) + 2*a*b*f^(2*x)*x*sqrt(-a/b)*log(f) +
 b^2*x*sqrt(-a/b)*log(f))*dilog((a*f^x - b*sqrt(-a/b))/(b*sqrt(-a/b)) + 1) - 2*(
a^2*f^(4*x)*sqrt(-a/b) + 2*a*b*f^(2*x)*sqrt(-a/b) + b^2*sqrt(-a/b))*log(2*a*f^x
+ 2*b*sqrt(-a/b)) + 2*(a^2*f^(4*x)*sqrt(-a/b) + 2*a*b*f^(2*x)*sqrt(-a/b) + b^2*s
qrt(-a/b))*log(2*a*f^x - 2*b*sqrt(-a/b)) + (a^2*f^(4*x)*x^2*sqrt(-a/b)*log(f)^2
+ 2*a*b*f^(2*x)*x^2*sqrt(-a/b)*log(f)^2 + b^2*x^2*sqrt(-a/b)*log(f)^2)*log((a*f^
x + b*sqrt(-a/b))/(b*sqrt(-a/b))) - (a^2*f^(4*x)*x^2*sqrt(-a/b)*log(f)^2 + 2*a*b
*f^(2*x)*x^2*sqrt(-a/b)*log(f)^2 + b^2*x^2*sqrt(-a/b)*log(f)^2)*log(-(a*f^x - b*
sqrt(-a/b))/(b*sqrt(-a/b))) + 2*(a^2*f^(4*x)*sqrt(-a/b) + 2*a*b*f^(2*x)*sqrt(-a/
b) + b^2*sqrt(-a/b))*polylog(3, a*f^x/(b*sqrt(-a/b))) - 2*(a^2*f^(4*x)*sqrt(-a/b
) + 2*a*b*f^(2*x)*sqrt(-a/b) + b^2*sqrt(-a/b))*polylog(3, -a*f^x/(b*sqrt(-a/b)))
)/(a^4*b*f^(4*x)*log(f)^3 + 2*a^3*b^2*f^(2*x)*log(f)^3 + a^2*b^3*log(f)^3)

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{f^{- x} \left (a x^{2} \log{\left (f \right )} + 2 a x\right ) + f^{- 3 x} \left (- b x^{2} \log{\left (f \right )} + 2 b x\right )}{8 a^{3} b \log{\left (f \right )}^{2} + 16 a^{2} b^{2} f^{- 2 x} \log{\left (f \right )}^{2} + 8 a b^{3} f^{- 4 x} \log{\left (f \right )}^{2}} + \frac{\int \left (- \frac{2 f^{x}}{a f^{2 x} + b}\right )\, dx + \int \frac{f^{x} x^{2} \log{\left (f \right )}^{2}}{a f^{2 x} + b}\, dx}{8 a b \log{\left (f \right )}^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**2/(b/(f**x)+a*f**x)**3,x)

[Out]

(f**(-x)*(a*x**2*log(f) + 2*a*x) + f**(-3*x)*(-b*x**2*log(f) + 2*b*x))/(8*a**3*b
*log(f)**2 + 16*a**2*b**2*f**(-2*x)*log(f)**2 + 8*a*b**3*f**(-4*x)*log(f)**2) +
(Integral(-2*f**x/(a*f**(2*x) + b), x) + Integral(f**x*x**2*log(f)**2/(a*f**(2*x
) + b), x))/(8*a*b*log(f)**2)

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{x^{2}}{{\left (a f^{x} + \frac{b}{f^{x}}\right )}^{3}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x^2/(a*f^x + b/f^x)^3,x, algorithm="giac")

[Out]

integrate(x^2/(a*f^x + b/f^x)^3, x)