3.1.61 \(\int \frac {x^3}{(b f^{-x}+a f^x)^2} \, dx\) [61]

3.1.61.1 Optimal result
3.1.61.2 Mathematica [A] (verified)
3.1.61.3 Rubi [A] (verified)
3.1.61.4 Maple [A] (verified)
3.1.61.5 Fricas [B] (verification not implemented)
3.1.61.6 Sympy [F]
3.1.61.7 Maxima [A] (verification not implemented)
3.1.61.8 Giac [F]
3.1.61.9 Mupad [F(-1)]

3.1.61.1 Optimal result

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

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

Time = 0.08 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.97 \[ \int \frac {x^3}{\left (b f^{-x}+a f^x\right )^2} \, dx=-\frac {x^3}{2 a \left (b+a f^{2 x}\right ) \log (f)}+\frac {3 \left (\frac {x^3}{3 b}-\frac {x^2 \log \left (1+\frac {a f^{2 x}}{b}\right )}{2 b \log (f)}-\frac {x \operatorname {PolyLog}\left (2,-\frac {a f^{2 x}}{b}\right )}{2 b \log ^2(f)}+\frac {\operatorname {PolyLog}\left (3,-\frac {a f^{2 x}}{b}\right )}{4 b \log ^3(f)}\right )}{2 a \log (f)} \]

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

Time = 0.64 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.05, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {2721, 2621, 2615, 2620, 3011, 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}{\left (a f^x+b f^{-x}\right )^2} \, dx\)

\(\Big \downarrow \) 2721

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

\(\Big \downarrow \) 2621

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

\(\Big \downarrow \) 2615

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

\(\Big \downarrow \) 2620

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

\(\Big \downarrow \) 3011

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

\(\Big \downarrow \) 2720

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

\(\Big \downarrow \) 7143

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

input
Int[x^3/(b/f^x + a*f^x)^2,x]
 
output
-1/2*x^3/(a*(b + a*f^(2*x))*Log[f]) + (3*(x^3/(3*b) - (a*((x^2*Log[1 + (a* 
f^(2*x))/b])/(2*a*Log[f]) - (-1/2*(x*PolyLog[2, -((a*f^(2*x))/b)])/Log[f] 
+ PolyLog[3, -((a*f^(2*x))/b)]/(4*Log[f]^2))/(a*Log[f])))/b))/(2*a*Log[f])
 

3.1.61.3.1 Defintions of rubi rules used

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

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

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

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 2721
Int[(u_.)*((a_.)*(F_)^(v_) + (b_.)*(F_)^(w_))^(n_), x_Symbol] :> Int[u*F^(n 
*v)*(a + b*F^ExpandToSum[w - v, x])^n, x] /; FreeQ[{F, a, b, n}, x] && ILtQ 
[n, 0] && LinearQ[{v, w}, 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 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]
 
3.1.61.4 Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 119, normalized size of antiderivative = 0.93

method result size
risch \(\frac {x^{3}}{2 a b \ln \left (f \right )}-\frac {x^{3}}{2 a \left (b +a \,f^{2 x}\right ) \ln \left (f \right )}-\frac {3 x^{2} \ln \left (1+\frac {a \,f^{2 x}}{b}\right )}{4 a b \ln \left (f \right )^{2}}-\frac {3 x \,\operatorname {Li}_{2}\left (-\frac {a \,f^{2 x}}{b}\right )}{4 a b \ln \left (f \right )^{3}}+\frac {3 \,\operatorname {Li}_{3}\left (-\frac {a \,f^{2 x}}{b}\right )}{8 a b \ln \left (f \right )^{4}}\) \(119\)

input
int(x^3/(b/(f^x)+a*f^x)^2,x,method=_RETURNVERBOSE)
 
output
-1/2/ln(f)*x^3/a/((f^x)^2*a+b)+1/2*x^3/a/b/ln(f)-3/4*x^2*ln(1+a*f^(2*x)/b) 
/a/b/ln(f)^2-3/4*x*polylog(2,-a*f^(2*x)/b)/a/b/ln(f)^3+3/8*polylog(3,-a*f^ 
(2*x)/b)/a/b/ln(f)^4
 
3.1.61.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 241 vs. \(2 (117) = 234\).

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

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

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

input
integrate(x**3/(b/(f**x)+a*f**x)**2,x)
 
output
x**3/(2*a*b*log(f) + 2*b**2*log(f)/f**(2*x)) - 3*Integral(f**(2*x)*x**2/(a 
*f**(2*x) + b), x)/(2*b*log(f))
 
3.1.61.7 Maxima [A] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.84 \[ \int \frac {x^3}{\left (b f^{-x}+a f^x\right )^2} \, dx=-\frac {x^{3}}{2 \, {\left (a^{2} f^{2 \, x} \log \left (f\right ) + a b \log \left (f\right )\right )}} + \frac {x^{3}}{2 \, a b \log \left (f\right )} - \frac {3 \, {\left (2 \, x^{2} \log \left (\frac {a f^{2 \, x}}{b} + 1\right ) \log \left (f\right )^{2} + 2 \, x {\rm Li}_2\left (-\frac {a f^{2 \, x}}{b}\right ) \log \left (f\right ) - {\rm Li}_{3}(-\frac {a f^{2 \, x}}{b})\right )}}{8 \, a b \log \left (f\right )^{4}} \]

input
integrate(x^3/(b/(f^x)+a*f^x)^2,x, algorithm="maxima")
 
output
-1/2*x^3/(a^2*f^(2*x)*log(f) + a*b*log(f)) + 1/2*x^3/(a*b*log(f)) - 3/8*(2 
*x^2*log(a*f^(2*x)/b + 1)*log(f)^2 + 2*x*dilog(-a*f^(2*x)/b)*log(f) - poly 
log(3, -a*f^(2*x)/b))/(a*b*log(f)^4)
 
3.1.61.8 Giac [F]

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

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

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

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