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

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

[Out]

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

_______________________________________________________________________________________

Rubi [A]  time = 0.0550176, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154 \[ x-\frac{2 \log \left (2^x+1\right )}{\log (2)}+\frac{2^x}{\log (2)} \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 9.90242, size = 26, normalized size = 1.18 \[ \frac{2^{x}}{\log{\left (2 \right )}} + \frac{\log{\left (2^{x} \right )}}{\log{\left (2 \right )}} - \frac{2 \log{\left (2^{x} + 1 \right )}}{\log{\left (2 \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((1+4**x)/(1+2**x),x)

[Out]

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

_______________________________________________________________________________________

Mathematica [A]  time = 0.00962701, size = 22, normalized size = 1. \[ x-\frac{2 \log \left (2^x+1\right )}{\log (2)}+\frac{2^x}{\log (2)} \]

Antiderivative was successfully verified.

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

[Out]

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

_______________________________________________________________________________________

Maple [A]  time = 0.017, size = 27, normalized size = 1.2 \[ x+{\frac{{{\rm e}^{x\ln \left ( 2 \right ) }}}{\ln \left ( 2 \right ) }}-2\,{\frac{\ln \left ( 1+{{\rm e}^{x\ln \left ( 2 \right ) }} \right ) }{\ln \left ( 2 \right ) }} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((1+4^x)/(1+2^x),x)

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 0.829554, size = 30, normalized size = 1.36 \[ x + \frac{2^{x}}{\log \left (2\right )} - \frac{2 \, \log \left (2^{x} + 1\right )}{\log \left (2\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Fricas [A]  time = 0.275077, size = 28, normalized size = 1.27 \[ \frac{x \log \left (2\right ) + 2^{x} - 2 \, \log \left (2^{x} + 1\right )}{\log \left (2\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.106709, size = 19, normalized size = 0.86 \[ \frac{2^{x}}{\log{\left (2 \right )}} + x - \frac{2 \log{\left (2^{x} + 1 \right )}}{\log{\left (2 \right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((1+4**x)/(1+2**x),x)

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{4^{x} + 1}{2^{x} + 1}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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