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

   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 = 22 \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^2} \, dx=-\frac {1}{2 a \left (b+a f^{2 x}\right ) \log (f)} \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2320, 267} \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^2} \, dx=-\frac {1}{2 a \log (f) \left (a f^{2 x}+b\right )} \]

[In]

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

[Out]

-1/2*1/(a*(b + a*f^(2*x))*Log[f])

Rule 267

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a + b*x^n)^(p + 1)/(b*n*(p + 1)), x] /; FreeQ
[{a, b, m, n, p}, x] && EqQ[m, n - 1] && 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]]]

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

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.05 \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^2} \, dx=-\frac {1}{2 a b \log (f)+2 a^2 f^{2 x} \log (f)} \]

[In]

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

[Out]

-(2*a*b*Log[f] + 2*a^2*f^(2*x)*Log[f])^(-1)

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.95

method result size
derivativedivides \(-\frac {1}{2 a \left (b +a \,f^{2 x}\right ) \ln \left (f \right )}\) \(21\)
default \(-\frac {1}{2 a \left (b +a \,f^{2 x}\right ) \ln \left (f \right )}\) \(21\)
risch \(-\frac {1}{2 a \left (b +a \,f^{2 x}\right ) \ln \left (f \right )}\) \(21\)
parallelrisch \(-\frac {1}{2 a \left (b +a \,f^{2 x}\right ) \ln \left (f \right )}\) \(21\)
norman \(-\frac {1}{2 \ln \left (f \right ) a \left (a \,{\mathrm e}^{2 x \ln \left (f \right )}+b \right )}\) \(23\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.95 \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^2} \, dx=-\frac {1}{2 \, {\left (a^{2} f^{2 \, x} \log \left (f\right ) + a b \log \left (f\right )\right )}} \]

[In]

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

[Out]

-1/2/(a^2*f^(2*x)*log(f) + a*b*log(f))

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00 \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^2} \, dx=\frac {1}{2 a b \log {\left (f \right )} + 2 b^{2} f^{- 2 x} \log {\left (f \right )}} \]

[In]

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

[Out]

1/(2*a*b*log(f) + 2*b**2*log(f)/f**(2*x))

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.05 \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^2} \, dx=\frac {1}{2 \, {\left (a b + \frac {b^{2}}{f^{2 \, x}}\right )} \log \left (f\right )} \]

[In]

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

[Out]

1/2/((a*b + b^2/f^(2*x))*log(f))

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.91 \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^2} \, dx=-\frac {1}{2 \, {\left (a f^{2 \, x} + b\right )} a \log \left (f\right )} \]

[In]

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

[Out]

-1/2/((a*f^(2*x) + b)*a*log(f))

Mupad [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.91 \[ \int \frac {1}{\left (b f^{-x}+a f^x\right )^2} \, dx=-\frac {1}{2\,a\,\ln \left (f\right )\,\left (b+a\,f^{2\,x}\right )} \]

[In]

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

[Out]

-1/(2*a*log(f)*(b + a*f^(2*x)))