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

Optimal. Leaf size=22 \[ -\frac{1}{2 a \log (f) \left (a f^{2 x}+b\right )} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0199484, antiderivative size = 22, normalized size of antiderivative = 1., 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 = {2282, 261} \[ -\frac{1}{2 a \log (f) \left (a f^{2 x}+b\right )} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2282

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 261

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]

Rubi steps

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

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.001, size = 21, normalized size = 1. \begin{align*} -{\frac{1}{2\,\ln \left ( f \right ) a \left ( a \left ({f}^{x} \right ) ^{2}+b \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 1.09949, size = 31, normalized size = 1.41 \begin{align*} \frac{1}{2 \,{\left (a b + \frac{b^{2}}{f^{2 \, x}}\right )} \log \left (f\right )} \end{align*}

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 = 1.54727, size = 54, normalized size = 2.45 \begin{align*} -\frac{1}{2 \,{\left (a^{2} f^{2 \, x} \log \left (f\right ) + a b \log \left (f\right )\right )}} \end{align*}

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.246905, size = 22, normalized size = 1. \begin{align*} \frac{1}{2 a b \log{\left (f \right )} + 2 b^{2} f^{- 2 x} \log{\left (f \right )}} \end{align*}

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*f**(-2*x)*log(f))

________________________________________________________________________________________

Giac [A]  time = 1.23908, size = 27, normalized size = 1.23 \begin{align*} -\frac{1}{2 \,{\left (a f^{2 \, x} + b\right )} a \log \left (f\right )} \end{align*}

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