3.725 \(\int \frac {1+4^x}{1+2^{-x}} \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2282, 697} \[ \frac {2 \log \left (2^x+1\right )}{\log (2)}-\frac {2^x}{\log (2)}+\frac {2^{2 x-1}}{\log (2)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 697

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

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+4^x}{1+2^{-x}} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1+x^2}{1+x} \, dx,x,2^x\right )}{\log (2)}\\ &=\frac {\operatorname {Subst}\left (\int \left (-1+x+\frac {2}{1+x}\right ) \, dx,x,2^x\right )}{\log (2)}\\ &=-\frac {2^x}{\log (2)}+\frac {2^{-1+2 x}}{\log (2)}+\frac {2 \log \left (1+2^x\right )}{\log (2)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 23, normalized size = 0.68 \[ \frac {2^x \left (2^x-2\right )+4 \log \left (2^x+1\right )}{\log (4)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 25, normalized size = 0.74 \[ \frac {2^{2 \, x} - 2 \cdot 2^{x} + 4 \, \log \left (2^{x} + 1\right )}{2 \, \log \relax (2)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {4^{x} + 1}{\frac {1}{2^{x}} + 1}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate((4^x + 1)/(1/2^x + 1), x)

________________________________________________________________________________________

maple [A]  time = 0.09, size = 40, normalized size = 1.18 \[ -\frac {{\mathrm e}^{\ln \relax (2) x}}{\ln \relax (2)}+\frac {{\mathrm e}^{2 \ln \relax (2) x}}{2 \ln \relax (2)}+\frac {2 \ln \left ({\mathrm e}^{\ln \relax (2) x}+1\right )}{\ln \relax (2)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 2.14, size = 40, normalized size = 1.18 \[ 2 \, x - \frac {2^{2 \, x - 1} {\left (2^{-x + 1} - 1\right )}}{\log \relax (2)} + \frac {2 \, \log \left (\frac {1}{2^{x}} + 1\right )}{\log \relax (2)} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.03 \[ \int \frac {4^x+1}{\frac {1}{2^x}+1} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.30, size = 39, normalized size = 1.15 \[ 2 x + \frac {2^{2 x} \log {\relax (2 )} - 2 \cdot 2^{x} \log {\relax (2 )}}{2 \log {\relax (2 )}^{2}} + \frac {2 \log {\left (1 + 2^{- x} \right )}}{\log {\relax (2 )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________