3.1.57 \(\int \frac {x^3}{b f^{-x}+a f^x} \, dx\) [57]

3.1.57.1 Optimal result
3.1.57.2 Mathematica [A] (verified)
3.1.57.3 Rubi [A] (verified)
3.1.57.4 Maple [F]
3.1.57.5 Fricas [A] (verification not implemented)
3.1.57.6 Sympy [F]
3.1.57.7 Maxima [F]
3.1.57.8 Giac [F]
3.1.57.9 Mupad [F(-1)]

3.1.57.1 Optimal result

Integrand size = 19, antiderivative size = 268 \[ \int \frac {x^3}{b f^{-x}+a f^x} \, dx=\frac {x^3 \arctan \left (\frac {\sqrt {a} f^x}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} \log (f)}-\frac {3 i x^2 \operatorname {PolyLog}\left (2,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b} \log ^2(f)}+\frac {3 i x^2 \operatorname {PolyLog}\left (2,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{2 \sqrt {a} \sqrt {b} \log ^2(f)}+\frac {3 i x \operatorname {PolyLog}\left (3,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} \log ^3(f)}-\frac {3 i x \operatorname {PolyLog}\left (3,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} \log ^3(f)}-\frac {3 i \operatorname {PolyLog}\left (4,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} \log ^4(f)}+\frac {3 i \operatorname {PolyLog}\left (4,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} \log ^4(f)} \]

output
x^3*arctan(f^x*a^(1/2)/b^(1/2))/ln(f)/a^(1/2)/b^(1/2)-3/2*I*x^2*polylog(2, 
-I*f^x*a^(1/2)/b^(1/2))/ln(f)^2/a^(1/2)/b^(1/2)+3/2*I*x^2*polylog(2,I*f^x* 
a^(1/2)/b^(1/2))/ln(f)^2/a^(1/2)/b^(1/2)+3*I*x*polylog(3,-I*f^x*a^(1/2)/b^ 
(1/2))/ln(f)^3/a^(1/2)/b^(1/2)-3*I*x*polylog(3,I*f^x*a^(1/2)/b^(1/2))/ln(f 
)^3/a^(1/2)/b^(1/2)-3*I*polylog(4,-I*f^x*a^(1/2)/b^(1/2))/ln(f)^4/a^(1/2)/ 
b^(1/2)+3*I*polylog(4,I*f^x*a^(1/2)/b^(1/2))/ln(f)^4/a^(1/2)/b^(1/2)
 
3.1.57.2 Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 224, normalized size of antiderivative = 0.84 \[ \int \frac {x^3}{b f^{-x}+a f^x} \, dx=\frac {i \left (x^3 \log ^3(f) \log \left (1-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )-x^3 \log ^3(f) \log \left (1+\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )-3 x^2 \log ^2(f) \operatorname {PolyLog}\left (2,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )+3 x^2 \log ^2(f) \operatorname {PolyLog}\left (2,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )+6 x \log (f) \operatorname {PolyLog}\left (3,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )-6 x \log (f) \operatorname {PolyLog}\left (3,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )-6 \operatorname {PolyLog}\left (4,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )+6 \operatorname {PolyLog}\left (4,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )\right )}{2 \sqrt {a} \sqrt {b} \log ^4(f)} \]

input
Integrate[x^3/(b/f^x + a*f^x),x]
 
output
((I/2)*(x^3*Log[f]^3*Log[1 - (I*Sqrt[a]*f^x)/Sqrt[b]] - x^3*Log[f]^3*Log[1 
 + (I*Sqrt[a]*f^x)/Sqrt[b]] - 3*x^2*Log[f]^2*PolyLog[2, ((-I)*Sqrt[a]*f^x) 
/Sqrt[b]] + 3*x^2*Log[f]^2*PolyLog[2, (I*Sqrt[a]*f^x)/Sqrt[b]] + 6*x*Log[f 
]*PolyLog[3, ((-I)*Sqrt[a]*f^x)/Sqrt[b]] - 6*x*Log[f]*PolyLog[3, (I*Sqrt[a 
]*f^x)/Sqrt[b]] - 6*PolyLog[4, ((-I)*Sqrt[a]*f^x)/Sqrt[b]] + 6*PolyLog[4, 
(I*Sqrt[a]*f^x)/Sqrt[b]]))/(Sqrt[a]*Sqrt[b]*Log[f]^4)
 
3.1.57.3 Rubi [A] (verified)

Time = 0.76 (sec) , antiderivative size = 235, normalized size of antiderivative = 0.88, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {2696, 27, 5666, 3011, 7163, 2720, 7143}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {x^3}{a f^x+b f^{-x}} \, dx\)

\(\Big \downarrow \) 2696

\(\displaystyle \frac {x^3 \arctan \left (\frac {\sqrt {a} f^x}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} \log (f)}-3 \int \frac {x^2 \arctan \left (\frac {\sqrt {a} f^x}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} \log (f)}dx\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {x^3 \arctan \left (\frac {\sqrt {a} f^x}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} \log (f)}-\frac {3 \int x^2 \arctan \left (\frac {\sqrt {a} f^x}{\sqrt {b}}\right )dx}{\sqrt {a} \sqrt {b} \log (f)}\)

\(\Big \downarrow \) 5666

\(\displaystyle \frac {x^3 \arctan \left (\frac {\sqrt {a} f^x}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} \log (f)}-\frac {3 \left (\frac {1}{2} i \int x^2 \log \left (1-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )dx-\frac {1}{2} i \int x^2 \log \left (\frac {i \sqrt {a} f^x}{\sqrt {b}}+1\right )dx\right )}{\sqrt {a} \sqrt {b} \log (f)}\)

\(\Big \downarrow \) 3011

\(\displaystyle \frac {x^3 \arctan \left (\frac {\sqrt {a} f^x}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} \log (f)}-\frac {3 \left (\frac {1}{2} i \left (\frac {2 \int x \operatorname {PolyLog}\left (2,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )dx}{\log (f)}-\frac {x^2 \operatorname {PolyLog}\left (2,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log (f)}\right )-\frac {1}{2} i \left (\frac {2 \int x \operatorname {PolyLog}\left (2,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )dx}{\log (f)}-\frac {x^2 \operatorname {PolyLog}\left (2,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log (f)}\right )\right )}{\sqrt {a} \sqrt {b} \log (f)}\)

\(\Big \downarrow \) 7163

\(\displaystyle \frac {x^3 \arctan \left (\frac {\sqrt {a} f^x}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} \log (f)}-\frac {3 \left (\frac {1}{2} i \left (\frac {2 \left (\frac {x \operatorname {PolyLog}\left (3,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log (f)}-\frac {\int \operatorname {PolyLog}\left (3,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )dx}{\log (f)}\right )}{\log (f)}-\frac {x^2 \operatorname {PolyLog}\left (2,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log (f)}\right )-\frac {1}{2} i \left (\frac {2 \left (\frac {x \operatorname {PolyLog}\left (3,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log (f)}-\frac {\int \operatorname {PolyLog}\left (3,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )dx}{\log (f)}\right )}{\log (f)}-\frac {x^2 \operatorname {PolyLog}\left (2,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log (f)}\right )\right )}{\sqrt {a} \sqrt {b} \log (f)}\)

\(\Big \downarrow \) 2720

\(\displaystyle \frac {x^3 \arctan \left (\frac {\sqrt {a} f^x}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} \log (f)}-\frac {3 \left (\frac {1}{2} i \left (\frac {2 \left (\frac {x \operatorname {PolyLog}\left (3,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log (f)}-\frac {\int f^{-x} \operatorname {PolyLog}\left (3,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )df^x}{\log ^2(f)}\right )}{\log (f)}-\frac {x^2 \operatorname {PolyLog}\left (2,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log (f)}\right )-\frac {1}{2} i \left (\frac {2 \left (\frac {x \operatorname {PolyLog}\left (3,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log (f)}-\frac {\int f^{-x} \operatorname {PolyLog}\left (3,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )df^x}{\log ^2(f)}\right )}{\log (f)}-\frac {x^2 \operatorname {PolyLog}\left (2,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log (f)}\right )\right )}{\sqrt {a} \sqrt {b} \log (f)}\)

\(\Big \downarrow \) 7143

\(\displaystyle \frac {x^3 \arctan \left (\frac {\sqrt {a} f^x}{\sqrt {b}}\right )}{\sqrt {a} \sqrt {b} \log (f)}-\frac {3 \left (\frac {1}{2} i \left (\frac {2 \left (\frac {x \operatorname {PolyLog}\left (3,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log (f)}-\frac {\operatorname {PolyLog}\left (4,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log ^2(f)}\right )}{\log (f)}-\frac {x^2 \operatorname {PolyLog}\left (2,\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log (f)}\right )-\frac {1}{2} i \left (\frac {2 \left (\frac {x \operatorname {PolyLog}\left (3,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log (f)}-\frac {\operatorname {PolyLog}\left (4,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log ^2(f)}\right )}{\log (f)}-\frac {x^2 \operatorname {PolyLog}\left (2,-\frac {i \sqrt {a} f^x}{\sqrt {b}}\right )}{\log (f)}\right )\right )}{\sqrt {a} \sqrt {b} \log (f)}\)

input
Int[x^3/(b/f^x + a*f^x),x]
 
output
(x^3*ArcTan[(Sqrt[a]*f^x)/Sqrt[b]])/(Sqrt[a]*Sqrt[b]*Log[f]) - (3*((-1/2*I 
)*(-((x^2*PolyLog[2, ((-I)*Sqrt[a]*f^x)/Sqrt[b]])/Log[f]) + (2*((x*PolyLog 
[3, ((-I)*Sqrt[a]*f^x)/Sqrt[b]])/Log[f] - PolyLog[4, ((-I)*Sqrt[a]*f^x)/Sq 
rt[b]]/Log[f]^2))/Log[f]) + (I/2)*(-((x^2*PolyLog[2, (I*Sqrt[a]*f^x)/Sqrt[ 
b]])/Log[f]) + (2*((x*PolyLog[3, (I*Sqrt[a]*f^x)/Sqrt[b]])/Log[f] - PolyLo 
g[4, (I*Sqrt[a]*f^x)/Sqrt[b]]/Log[f]^2))/Log[f])))/(Sqrt[a]*Sqrt[b]*Log[f] 
)
 

3.1.57.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2696
Int[(x_)^(m_.)/((b_.)*(F_)^(v_) + (a_.)*(F_)^((c_.) + (d_.)*(x_))), x_Symbo 
l] :> With[{u = IntHide[1/(a*F^(c + d*x) + b*F^v), x]}, Simp[x^m*u, x] - Si 
mp[m   Int[x^(m - 1)*u, x], x]] /; FreeQ[{F, a, b, c, d}, x] && EqQ[v, -(c 
+ d*x)] && GtQ[m, 0]
 

rule 2720
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] 
   Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct 
ionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ 
[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) 
*(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
 

rule 3011
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) 
*(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + 
b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F]))   Int[(f + g*x)^( 
m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e 
, f, g, n}, x] && GtQ[m, 0]
 

rule 5666
Int[ArcTan[(a_.) + (b_.)*(f_)^((c_.) + (d_.)*(x_))]*(x_)^(m_.), x_Symbol] : 
> Simp[I/2   Int[x^m*Log[1 - I*a - I*b*f^(c + d*x)], x], x] - Simp[I/2   In 
t[x^m*Log[1 + I*a + I*b*f^(c + d*x)], x], x] /; FreeQ[{a, b, c, d, f}, x] & 
& IntegerQ[m] && m > 0
 

rule 7143
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S 
ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d 
, e, n, p}, x] && EqQ[b*d, a*e]
 

rule 7163
Int[((e_.) + (f_.)*(x_))^(m_.)*PolyLog[n_, (d_.)*((F_)^((c_.)*((a_.) + (b_. 
)*(x_))))^(p_.)], x_Symbol] :> Simp[(e + f*x)^m*(PolyLog[n + 1, d*(F^(c*(a 
+ b*x)))^p]/(b*c*p*Log[F])), x] - Simp[f*(m/(b*c*p*Log[F]))   Int[(e + f*x) 
^(m - 1)*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p], x], x] /; FreeQ[{F, a, b, c 
, d, e, f, n, p}, x] && GtQ[m, 0]
 
3.1.57.4 Maple [F]

\[\int \frac {x^{3}}{b \,f^{-x}+a \,f^{x}}d x\]

input
int(x^3/(b/(f^x)+a*f^x),x)
 
output
int(x^3/(b/(f^x)+a*f^x),x)
 
3.1.57.5 Fricas [A] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 239, normalized size of antiderivative = 0.89 \[ \int \frac {x^3}{b f^{-x}+a f^x} \, dx=-\frac {x^{3} \sqrt {-\frac {a}{b}} \log \left (f^{x} \sqrt {-\frac {a}{b}} + 1\right ) \log \left (f\right )^{3} - x^{3} \sqrt {-\frac {a}{b}} \log \left (-f^{x} \sqrt {-\frac {a}{b}} + 1\right ) \log \left (f\right )^{3} - 3 \, x^{2} \sqrt {-\frac {a}{b}} {\rm Li}_2\left (f^{x} \sqrt {-\frac {a}{b}}\right ) \log \left (f\right )^{2} + 3 \, x^{2} \sqrt {-\frac {a}{b}} {\rm Li}_2\left (-f^{x} \sqrt {-\frac {a}{b}}\right ) \log \left (f\right )^{2} + 6 \, x \sqrt {-\frac {a}{b}} \log \left (f\right ) {\rm polylog}\left (3, f^{x} \sqrt {-\frac {a}{b}}\right ) - 6 \, x \sqrt {-\frac {a}{b}} \log \left (f\right ) {\rm polylog}\left (3, -f^{x} \sqrt {-\frac {a}{b}}\right ) - 6 \, \sqrt {-\frac {a}{b}} {\rm polylog}\left (4, f^{x} \sqrt {-\frac {a}{b}}\right ) + 6 \, \sqrt {-\frac {a}{b}} {\rm polylog}\left (4, -f^{x} \sqrt {-\frac {a}{b}}\right )}{2 \, a \log \left (f\right )^{4}} \]

input
integrate(x^3/(b/(f^x)+a*f^x),x, algorithm="fricas")
 
output
-1/2*(x^3*sqrt(-a/b)*log(f^x*sqrt(-a/b) + 1)*log(f)^3 - x^3*sqrt(-a/b)*log 
(-f^x*sqrt(-a/b) + 1)*log(f)^3 - 3*x^2*sqrt(-a/b)*dilog(f^x*sqrt(-a/b))*lo 
g(f)^2 + 3*x^2*sqrt(-a/b)*dilog(-f^x*sqrt(-a/b))*log(f)^2 + 6*x*sqrt(-a/b) 
*log(f)*polylog(3, f^x*sqrt(-a/b)) - 6*x*sqrt(-a/b)*log(f)*polylog(3, -f^x 
*sqrt(-a/b)) - 6*sqrt(-a/b)*polylog(4, f^x*sqrt(-a/b)) + 6*sqrt(-a/b)*poly 
log(4, -f^x*sqrt(-a/b)))/(a*log(f)^4)
 
3.1.57.6 Sympy [F]

\[ \int \frac {x^3}{b f^{-x}+a f^x} \, dx=\int \frac {f^{x} x^{3}}{a f^{2 x} + b}\, dx \]

input
integrate(x**3/(b/(f**x)+a*f**x),x)
 
output
Integral(f**x*x**3/(a*f**(2*x) + b), x)
 
3.1.57.7 Maxima [F]

\[ \int \frac {x^3}{b f^{-x}+a f^x} \, dx=\int { \frac {x^{3}}{a f^{x} + \frac {b}{f^{x}}} \,d x } \]

input
integrate(x^3/(b/(f^x)+a*f^x),x, algorithm="maxima")
 
output
integrate(x^3/(a*f^x + b/f^x), x)
 
3.1.57.8 Giac [F]

\[ \int \frac {x^3}{b f^{-x}+a f^x} \, dx=\int { \frac {x^{3}}{a f^{x} + \frac {b}{f^{x}}} \,d x } \]

input
integrate(x^3/(b/(f^x)+a*f^x),x, algorithm="giac")
 
output
integrate(x^3/(a*f^x + b/f^x), x)
 
3.1.57.9 Mupad [F(-1)]

Timed out. \[ \int \frac {x^3}{b f^{-x}+a f^x} \, dx=\int \frac {x^3}{\frac {b}{f^x}+a\,f^x} \,d x \]

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