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

Optimal. Leaf size=22 \[ -\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]
time = 0.01, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2320, 267} \begin {gather*} -\frac {1}{2 a \log (f) \left (a f^{2 x}+b\right )} \end {gather*}

Antiderivative was successfully verified.

[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*} \int \frac {1}{\left (b f^{-x}+a f^x\right )^2} \, dx &=\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]
time = 0.03, size = 23, normalized size = 1.05 \begin {gather*} -\frac {1}{2 a b \log (f)+2 a^2 f^{2 x} \log (f)} \end {gather*}

Antiderivative was successfully verified.

[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]
time = 0.02, size = 21, normalized size = 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\)
norman \(-\frac {1}{2 \ln \left (f \right ) a \left (a \,{\mathrm e}^{2 x \ln \left (f \right )}+b \right )}\) \(23\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 23, normalized size = 1.05 \begin {gather*} \frac {1}{2 \, {\left (a b + \frac {b^{2}}{f^{2 \, x}}\right )} \log \left (f\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

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

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 21, normalized size = 0.95 \begin {gather*} -\frac {1}{2 \, {\left (a^{2} f^{2 \, x} \log \left (f\right ) + a b \log \left (f\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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]
time = 0.04, size = 22, normalized size = 1.00 \begin {gather*} \frac {1}{2 a b \log {\left (f \right )} + 2 b^{2} f^{- 2 x} \log {\left (f \right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

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

________________________________________________________________________________________

Giac [A]
time = 1.44, size = 20, normalized size = 0.91 \begin {gather*} -\frac {1}{2 \, {\left (a f^{2 \, x} + b\right )} a \log \left (f\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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]
time = 3.61, size = 20, normalized size = 0.91 \begin {gather*} -\frac {1}{2\,a\,\ln \left (f\right )\,\left (b+a\,f^{2\,x}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________