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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 87 \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^3} \, dx=-\frac {f^x}{4 a \left (b+a f^{2 x}\right )^2 \log (f)}+\frac {f^x}{8 a b \left (b+a f^{2 x}\right ) \log (f)}+\frac {\arctan \left (\frac {\sqrt {a} f^x}{\sqrt {b}}\right )}{8 a^{3/2} b^{3/2} \log (f)} \]

[Out]

-1/4*f^x/a/(b+a*f^(2*x))^2/ln(f)+1/8*f^x/a/b/(b+a*f^(2*x))/ln(f)+1/8*arctan(f^x*a^(1/2)/b^(1/2))/a^(3/2)/b^(3/
2)/ln(f)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.267, Rules used = {2320, 294, 205, 211} \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^3} \, dx=\frac {\arctan \left (\frac {\sqrt {a} f^x}{\sqrt {b}}\right )}{8 a^{3/2} b^{3/2} \log (f)}+\frac {f^x}{8 a b \log (f) \left (a f^{2 x}+b\right )}-\frac {f^x}{4 a \log (f) \left (a f^{2 x}+b\right )^2} \]

[In]

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

[Out]

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

Rule 205

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(-x)*((a + b*x^n)^(p + 1)/(a*n*(p + 1))), x] + Dist[(n*(p
 + 1) + 1)/(a*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && LtQ[p, -1] && (
IntegerQ[2*p] || (n == 2 && IntegerQ[4*p]) || (n == 2 && IntegerQ[3*p]) || Denominator[p + 1/n] < Denominator[
p])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 294

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^
n)^(p + 1)/(b*n*(p + 1))), x] - Dist[c^n*((m - n + 1)/(b*n*(p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

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

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x^2}{\left (b+a x^2\right )^3} \, dx,x,f^x\right )}{\log (f)} \\ & = -\frac {f^x}{4 a \left (b+a f^{2 x}\right )^2 \log (f)}+\frac {\text {Subst}\left (\int \frac {1}{\left (b+a x^2\right )^2} \, dx,x,f^x\right )}{4 a \log (f)} \\ & = -\frac {f^x}{4 a \left (b+a f^{2 x}\right )^2 \log (f)}+\frac {f^x}{8 a b \left (b+a f^{2 x}\right ) \log (f)}+\frac {\text {Subst}\left (\int \frac {1}{b+a x^2} \, dx,x,f^x\right )}{8 a b \log (f)} \\ & = -\frac {f^x}{4 a \left (b+a f^{2 x}\right )^2 \log (f)}+\frac {f^x}{8 a b \left (b+a f^{2 x}\right ) \log (f)}+\frac {\tan ^{-1}\left (\frac {\sqrt {a} f^x}{\sqrt {b}}\right )}{8 a^{3/2} b^{3/2} \log (f)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.60 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.80 \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^3} \, dx=\frac {\frac {\sqrt {a} \sqrt {b} f^x \left (-b+a f^{2 x}\right )}{\left (b+a f^{2 x}\right )^2}+\arctan \left (\frac {\sqrt {a} f^x}{\sqrt {b}}\right )}{8 a^{3/2} b^{3/2} \log (f)} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.15 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.71

method result size
derivativedivides \(\frac {\frac {\frac {f^{3 x}}{8 b}-\frac {f^{x}}{8 a}}{\left (b +a \,f^{2 x}\right )^{2}}+\frac {\arctan \left (\frac {a \,f^{x}}{\sqrt {a b}}\right )}{8 b a \sqrt {a b}}}{\ln \left (f \right )}\) \(62\)
default \(\frac {\frac {\frac {f^{3 x}}{8 b}-\frac {f^{x}}{8 a}}{\left (b +a \,f^{2 x}\right )^{2}}+\frac {\arctan \left (\frac {a \,f^{x}}{\sqrt {a b}}\right )}{8 b a \sqrt {a b}}}{\ln \left (f \right )}\) \(62\)
risch \(\frac {f^{x} \left (a \,f^{2 x}-b \right )}{8 \ln \left (f \right ) b a \left (b +a \,f^{2 x}\right )^{2}}-\frac {\ln \left (f^{x}-\frac {b}{\sqrt {-a b}}\right )}{16 \sqrt {-a b}\, b a \ln \left (f \right )}+\frac {\ln \left (f^{x}+\frac {b}{\sqrt {-a b}}\right )}{16 \sqrt {-a b}\, b a \ln \left (f \right )}\) \(102\)

[In]

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

[Out]

1/ln(f)*((1/8/b*(f^x)^3-1/8/a*f^x)/((f^x)^2*a+b)^2+1/8/b/a/(a*b)^(1/2)*arctan(a*f^x/(a*b)^(1/2)))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 261, normalized size of antiderivative = 3.00 \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^3} \, dx=\left [\frac {2 \, a^{2} b f^{3 \, x} - 2 \, a b^{2} f^{x} - {\left (\sqrt {-a b} a^{2} f^{4 \, x} + 2 \, \sqrt {-a b} a b f^{2 \, x} + \sqrt {-a b} b^{2}\right )} \log \left (\frac {a f^{2 \, x} - 2 \, \sqrt {-a b} f^{x} - b}{a f^{2 \, x} + b}\right )}{16 \, {\left (a^{4} b^{2} f^{4 \, x} \log \left (f\right ) + 2 \, a^{3} b^{3} f^{2 \, x} \log \left (f\right ) + a^{2} b^{4} \log \left (f\right )\right )}}, \frac {a^{2} b f^{3 \, x} - a b^{2} f^{x} - {\left (\sqrt {a b} a^{2} f^{4 \, x} + 2 \, \sqrt {a b} a b f^{2 \, x} + \sqrt {a b} b^{2}\right )} \arctan \left (\frac {\sqrt {a b}}{a f^{x}}\right )}{8 \, {\left (a^{4} b^{2} f^{4 \, x} \log \left (f\right ) + 2 \, a^{3} b^{3} f^{2 \, x} \log \left (f\right ) + a^{2} b^{4} \log \left (f\right )\right )}}\right ] \]

[In]

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

[Out]

[1/16*(2*a^2*b*f^(3*x) - 2*a*b^2*f^x - (sqrt(-a*b)*a^2*f^(4*x) + 2*sqrt(-a*b)*a*b*f^(2*x) + sqrt(-a*b)*b^2)*lo
g((a*f^(2*x) - 2*sqrt(-a*b)*f^x - b)/(a*f^(2*x) + b)))/(a^4*b^2*f^(4*x)*log(f) + 2*a^3*b^3*f^(2*x)*log(f) + a^
2*b^4*log(f)), 1/8*(a^2*b*f^(3*x) - a*b^2*f^x - (sqrt(a*b)*a^2*f^(4*x) + 2*sqrt(a*b)*a*b*f^(2*x) + sqrt(a*b)*b
^2)*arctan(sqrt(a*b)/(a*f^x)))/(a^4*b^2*f^(4*x)*log(f) + 2*a^3*b^3*f^(2*x)*log(f) + a^2*b^4*log(f))]

Sympy [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^3} \, dx=\frac {a f^{- x} - b f^{- 3 x}}{8 a^{3} b \log {\left (f \right )} + 16 a^{2} b^{2} f^{- 2 x} \log {\left (f \right )} + 8 a b^{3} f^{- 4 x} \log {\left (f \right )}} + \frac {\operatorname {RootSum} {\left (256 z^{2} a^{3} b^{3} + 1, \left ( i \mapsto i \log {\left (- 16 i a^{2} b + f^{- x} \right )} \right )\right )}}{\log {\left (f \right )}} \]

[In]

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

[Out]

(a/f**x - b/f**(3*x))/(8*a**3*b*log(f) + 16*a**2*b**2*log(f)/f**(2*x) + 8*a*b**3*log(f)/f**(4*x)) + RootSum(25
6*_z**2*a**3*b**3 + 1, Lambda(_i, _i*log(-16*_i*a**2*b + f**(-x))))/log(f)

Maxima [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.03 \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^3} \, dx=-\frac {\frac {b}{f^{3 \, x}} - \frac {a}{f^{x}}}{8 \, {\left (a^{3} b + \frac {a b^{3}}{f^{4 \, x}} + \frac {2 \, a^{2} b^{2}}{f^{2 \, x}}\right )} \log \left (f\right )} - \frac {\arctan \left (\frac {b}{\sqrt {a b} f^{x}}\right )}{8 \, \sqrt {a b} a b \log \left (f\right )} \]

[In]

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

[Out]

-1/8*(b/f^(3*x) - a/f^x)/((a^3*b + a*b^3/f^(4*x) + 2*a^2*b^2/f^(2*x))*log(f)) - 1/8*arctan(b/(sqrt(a*b)*f^x))/
(sqrt(a*b)*a*b*log(f))

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.76 \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^3} \, dx=\frac {\arctan \left (\frac {a f^{x}}{\sqrt {a b}}\right )}{8 \, \sqrt {a b} a b \log \left (f\right )} + \frac {a f^{3 \, x} - b f^{x}}{8 \, {\left (a f^{2 \, x} + b\right )}^{2} a b \log \left (f\right )} \]

[In]

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

[Out]

1/8*arctan(a*f^x/sqrt(a*b))/(sqrt(a*b)*a*b*log(f)) + 1/8*(a*f^(3*x) - b*f^x)/((a*f^(2*x) + b)^2*a*b*log(f))

Mupad [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.30 \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^3} \, dx=\frac {f^x}{8\,\left (a\,b^2\,\ln \left (f\right )+a^2\,b\,f^{2\,x}\,\ln \left (f\right )\right )}-\frac {f^x}{4\,\left (a\,b^2\,\ln \left (f\right )+a^3\,f^{4\,x}\,\ln \left (f\right )+2\,a^2\,b\,f^{2\,x}\,\ln \left (f\right )\right )}+\frac {\mathrm {atan}\left (\frac {f^x\,\sqrt {a^3\,b^3\,{\ln \left (f\right )}^2}}{a\,b^2\,\ln \left (f\right )}\right )}{8\,\sqrt {a^3\,b^3\,{\ln \left (f\right )}^2}} \]

[In]

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

[Out]

f^x/(8*(a*b^2*log(f) + a^2*b*f^(2*x)*log(f))) - f^x/(4*(a*b^2*log(f) + a^3*f^(4*x)*log(f) + 2*a^2*b*f^(2*x)*lo
g(f))) + atan((f^x*(a^3*b^3*log(f)^2)^(1/2))/(a*b^2*log(f)))/(8*(a^3*b^3*log(f)^2)^(1/2))