3.535 \(\int \frac {1}{2+3^{-x}+3^x} \, dx\)

Optimal. Leaf size=13 \[ -\frac {1}{\left (3^x+1\right ) \log (3)} \]

[Out]

-1/(1+3^x)/ln(3)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2282, 32} \[ -\frac {1}{\left (3^x+1\right ) \log (3)} \]

Antiderivative was successfully verified.

[In]

Int[(2 + 3^(-x) + 3^x)^(-1),x]

[Out]

-(1/((1 + 3^x)*Log[3]))

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

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

Rubi steps

\begin {align*} \int \frac {1}{2+3^{-x}+3^x} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{(1+x)^2} \, dx,x,3^x\right )}{\log (3)}\\ &=-\frac {1}{\left (1+3^x\right ) \log (3)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 13, normalized size = 1.00 \[ -\frac {1}{\left (3^x+1\right ) \log (3)} \]

Antiderivative was successfully verified.

[In]

Integrate[(2 + 3^(-x) + 3^x)^(-1),x]

[Out]

-(1/((1 + 3^x)*Log[3]))

________________________________________________________________________________________

fricas [A]  time = 0.39, size = 13, normalized size = 1.00 \[ -\frac {1}{3^{x} \log \relax (3) + \log \relax (3)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(2+1/(3^x)+3^x),x, algorithm="fricas")

[Out]

-1/(3^x*log(3) + log(3))

________________________________________________________________________________________

giac [A]  time = 0.32, size = 13, normalized size = 1.00 \[ -\frac {1}{{\left (3^{x} + 1\right )} \log \relax (3)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(2+1/(3^x)+3^x),x, algorithm="giac")

[Out]

-1/((3^x + 1)*log(3))

________________________________________________________________________________________

maple [A]  time = 0.01, size = 14, normalized size = 1.08 \[ -\frac {1}{\left (3^{x}+1\right ) \ln \relax (3)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(2+1/(3^x)+3^x),x)

[Out]

-1/(1+3^x)/ln(3)

________________________________________________________________________________________

maxima [A]  time = 1.09, size = 14, normalized size = 1.08 \[ \frac {1}{{\left (\frac {1}{3^{x}} + 1\right )} \log \relax (3)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(2+1/(3^x)+3^x),x, algorithm="maxima")

[Out]

1/((1/3^x + 1)*log(3))

________________________________________________________________________________________

mupad [B]  time = 3.48, size = 13, normalized size = 1.00 \[ -\frac {1}{\ln \relax (3)\,\left (3^x+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(1/3^x + 3^x + 2),x)

[Out]

-1/(log(3)*(3^x + 1))

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 12, normalized size = 0.92 \[ - \frac {1}{3^{x} \log {\relax (3 )} + \log {\relax (3 )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(2+1/(3**x)+3**x),x)

[Out]

-1/(3**x*log(3) + log(3))

________________________________________________________________________________________