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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [F(-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)} \]

[Out]

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

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {2321, 2222, 2215, 2221, 2611, 2320, 6724} \[ \int \frac {x^3}{\left (b f^{-x}+a f^x\right )^2} \, dx=\frac {3 \operatorname {PolyLog}\left (3,-\frac {a f^{2 x}}{b}\right )}{8 a b \log ^4(f)}-\frac {3 x \operatorname {PolyLog}\left (2,-\frac {a f^{2 x}}{b}\right )}{4 a b \log ^3(f)}-\frac {x^3}{2 a \log (f) \left (a f^{2 x}+b\right )}-\frac {3 x^2 \log \left (\frac {a f^{2 x}}{b}+1\right )}{4 a b \log ^2(f)}+\frac {x^3}{2 a b \log (f)} \]

[In]

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

[Out]

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

Rule 2215

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] - Dist[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 2221

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]
 - Dist[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 2222

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] - Dist[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 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{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 2321

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 2611

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] + Dist[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 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> 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]

Rubi steps \begin{align*} \text {integral}& = \int \frac {f^{2 x} x^3}{\left (b+a f^{2 x}\right )^2} \, dx \\ & = -\frac {x^3}{2 a \left (b+a f^{2 x}\right ) \log (f)}+\frac {3 \int \frac {x^2}{b+a f^{2 x}} \, dx}{2 a \log (f)} \\ & = \frac {x^3}{2 a b \log (f)}-\frac {x^3}{2 a \left (b+a f^{2 x}\right ) \log (f)}-\frac {3 \int \frac {f^{2 x} x^2}{b+a f^{2 x}} \, dx}{2 b \log (f)} \\ & = \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 \int x \log \left (1+\frac {a f^{2 x}}{b}\right ) \, dx}{2 a b \log ^2(f)} \\ & = \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 \text {Li}_2\left (-\frac {a f^{2 x}}{b}\right )}{4 a b \log ^3(f)}+\frac {3 \int \text {Li}_2\left (-\frac {a f^{2 x}}{b}\right ) \, dx}{4 a b \log ^3(f)} \\ & = \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 \text {Li}_2\left (-\frac {a f^{2 x}}{b}\right )}{4 a b \log ^3(f)}+\frac {3 \text {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {a x}{b}\right )}{x} \, dx,x,f^{2 x}\right )}{8 a b \log ^4(f)} \\ & = \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 \text {Li}_2\left (-\frac {a f^{2 x}}{b}\right )}{4 a b \log ^3(f)}+\frac {3 \text {Li}_3\left (-\frac {a f^{2 x}}{b}\right )}{8 a b \log ^4(f)} \\ \end{align*}

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)} \]

[In]

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

[Out]

-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])

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\)

[In]

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

[Out]

-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

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 )}} \]

[In]

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

[Out]

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*sqr
t(-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)

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 )}} \]

[In]

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

[Out]

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))

Maxima [A] (verification not implemented)

none

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}} \]

[In]

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

[Out]

-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) - polylog(3, -a*f^(2*x)/b))/(a*b*log(f)^4)

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 } \]

[In]

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

[Out]

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

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 \]

[In]

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

[Out]

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