3.38 \(\int (1+\tan (2 x))^2 \, dx\)

Optimal. Leaf size=16 \[ \frac{1}{2} \tan (2 x)-\log (\cos (2 x)) \]

[Out]

-Log[Cos[2*x]] + Tan[2*x]/2

_______________________________________________________________________________________

Rubi [A]  time = 0.0240698, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25 \[ \frac{1}{2} \tan (2 x)-\log (\cos (2 x)) \]

Antiderivative was successfully verified.

[In]  Int[(1 + Tan[2*x])^2,x]

[Out]

-Log[Cos[2*x]] + Tan[2*x]/2

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 0.550574, size = 12, normalized size = 0.75 \[ - \log{\left (\cos{\left (2 x \right )} \right )} + \frac{\tan{\left (2 x \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

-log(cos(2*x)) + tan(2*x)/2

_______________________________________________________________________________________

Mathematica [A]  time = 0.0150738, size = 16, normalized size = 1. \[ \frac{1}{2} \tan (2 x)-\log (\cos (2 x)) \]

Antiderivative was successfully verified.

[In]  Integrate[(1 + Tan[2*x])^2,x]

[Out]

-Log[Cos[2*x]] + Tan[2*x]/2

_______________________________________________________________________________________

Maple [A]  time = 0.004, size = 19, normalized size = 1.2 \[{\frac{\tan \left ( 2\,x \right ) }{2}}+{\frac{\ln \left ( 1+ \left ( \tan \left ( 2\,x \right ) \right ) ^{2} \right ) }{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((1+tan(2*x))^2,x)

[Out]

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

_______________________________________________________________________________________

Maxima [A]  time = 1.49691, size = 16, normalized size = 1. \[ \log \left (\sec \left (2 \, x\right )\right ) + \frac{1}{2} \, \tan \left (2 \, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

log(sec(2*x)) + 1/2*tan(2*x)

_______________________________________________________________________________________

Fricas [A]  time = 0.255256, size = 27, normalized size = 1.69 \[ -\frac{1}{2} \, \log \left (\frac{1}{\tan \left (2 \, x\right )^{2} + 1}\right ) + \frac{1}{2} \, \tan \left (2 \, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

Sympy [A]  time = 0.177776, size = 17, normalized size = 1.06 \[ \frac{\log{\left (\tan ^{2}{\left (2 x \right )} + 1 \right )}}{2} + \frac{\tan{\left (2 x \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.213304, size = 30, normalized size = 1.88 \[ -\frac{1}{2} \,{\rm ln}\left (\frac{4}{\tan \left (2 \, x\right )^{2} + 1}\right ) + \frac{1}{2} \, \tan \left (2 \, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

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

[Out]

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