3.8.40 \(\int (2^{-x}+2^x) \, dx\) [740]

Optimal. Leaf size=20 \[ -\frac {2^{-x}}{\log (2)}+\frac {2^x}{\log (2)} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 1, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2225} \begin {gather*} \frac {2^x}{\log (2)}-\frac {2^{-x}}{\log (2)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2225

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 20, normalized size = 1.00 \begin {gather*} -\frac {2^{-x}}{\log (2)}+\frac {2^x}{\log (2)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 21, normalized size = 1.05

method result size
derivativedivides \(\frac {2^{x}-2^{-x}}{\ln \left (2\right )}\) \(17\)
risch \(\frac {\left (2^{2 x}-1\right ) 2^{-x}}{\ln \left (2\right )}\) \(18\)
default \(-\frac {2^{-x}}{\ln \left (2\right )}+\frac {2^{x}}{\ln \left (2\right )}\) \(21\)
norman \(\left (\frac {{\mathrm e}^{2 x \ln \left (2\right )}}{\ln \left (2\right )}-\frac {1}{\ln \left (2\right )}\right ) {\mathrm e}^{-x \ln \left (2\right )}\) \(28\)
meijerg \(\frac {1-{\mathrm e}^{-x \ln \left (2\right )}}{\ln \left (2\right )}-\frac {1-{\mathrm e}^{x \ln \left (2\right )}}{\ln \left (2\right )}\) \(32\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(2^x)+2^x,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 20, normalized size = 1.00 \begin {gather*} \frac {2^{x}}{\log \left (2\right )} - \frac {1}{2^{x} \log \left (2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2^x/log(2) - 1/(2^x*log(2))

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 17, normalized size = 0.85 \begin {gather*} \frac {2^{2 \, x} - 1}{2^{x} \log \left (2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(2^(2*x) - 1)/(2^x*log(2))

________________________________________________________________________________________

Sympy [A]
time = 0.04, size = 17, normalized size = 0.85 \begin {gather*} \frac {2^{x} \log {\left (2 \right )} - 2^{- x} \log {\left (2 \right )}}{\log {\left (2 \right )}^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(2**x*log(2) - log(2)/2**x)/log(2)**2

________________________________________________________________________________________

Giac [A]
time = 4.78, size = 20, normalized size = 1.00 \begin {gather*} \frac {2^{x}}{\log \left (2\right )} - \frac {1}{2^{x} \log \left (2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2^x/log(2) - 1/(2^x*log(2))

________________________________________________________________________________________

Mupad [B]
time = 3.45, size = 17, normalized size = 0.85 \begin {gather*} \frac {2^{2\,x}-1}{2^x\,\ln \left (2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(2^(2*x) - 1)/(2^x*log(2))

________________________________________________________________________________________