3.930 \(\int (1+2 x) \sec ^2(1+2 x) \, dx\)

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

[Out]

Log[Cos[1 + 2*x]]/2 + ((1 + 2*x)*Tan[1 + 2*x])/2

________________________________________________________________________________________

Rubi [A]  time = 0.0234298, antiderivative size = 27, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {4184, 3475} \[ \frac{1}{2} (2 x+1) \tan (2 x+1)+\frac{1}{2} \log (\cos (2 x+1)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

Log[Cos[1 + 2*x]]/2 + ((1 + 2*x)*Tan[1 + 2*x])/2

Rule 4184

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp[((c + d*x)^m*Cot[e + f*x])/f, x]
+ Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (1+2 x) \sec ^2(1+2 x) \, dx &=\frac{1}{2} (1+2 x) \tan (1+2 x)-\int \tan (1+2 x) \, dx\\ &=\frac{1}{2} \log (\cos (1+2 x))+\frac{1}{2} (1+2 x) \tan (1+2 x)\\ \end{align*}

Mathematica [A]  time = 0.0145957, size = 30, normalized size = 1.11 \[ x \tan (2 x+1)+\frac{1}{2} \tan (2 x+1)+\frac{1}{2} \log (\cos (2 x+1)) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 24, normalized size = 0.9 \begin{align*}{\frac{\ln \left ( \cos \left ( 1+2\,x \right ) \right ) }{2}}+{\frac{ \left ( 1+2\,x \right ) \tan \left ( 1+2\,x \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1+2*x)*sec(1+2*x)^2,x)

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.44956, size = 132, normalized size = 4.89 \begin{align*} \frac{{\left (\cos \left (4 \, x + 2\right )^{2} + \sin \left (4 \, x + 2\right )^{2} + 2 \, \cos \left (4 \, x + 2\right ) + 1\right )} \log \left (\cos \left (4 \, x + 2\right )^{2} + \sin \left (4 \, x + 2\right )^{2} + 2 \, \cos \left (4 \, x + 2\right ) + 1\right ) + 4 \,{\left (2 \, x + 1\right )} \sin \left (4 \, x + 2\right )}{4 \,{\left (\cos \left (4 \, x + 2\right )^{2} + \sin \left (4 \, x + 2\right )^{2} + 2 \, \cos \left (4 \, x + 2\right ) + 1\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*((cos(4*x + 2)^2 + sin(4*x + 2)^2 + 2*cos(4*x + 2) + 1)*log(cos(4*x + 2)^2 + sin(4*x + 2)^2 + 2*cos(4*x +
2) + 1) + 4*(2*x + 1)*sin(4*x + 2))/(cos(4*x + 2)^2 + sin(4*x + 2)^2 + 2*cos(4*x + 2) + 1)

________________________________________________________________________________________

Fricas [A]  time = 2.02397, size = 104, normalized size = 3.85 \begin{align*} \frac{\cos \left (2 \, x + 1\right ) \log \left (-\cos \left (2 \, x + 1\right )\right ) +{\left (2 \, x + 1\right )} \sin \left (2 \, x + 1\right )}{2 \, \cos \left (2 \, x + 1\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (2 x + 1\right ) \sec ^{2}{\left (2 x + 1 \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral((2*x + 1)*sec(2*x + 1)**2, x)

________________________________________________________________________________________

Giac [B]  time = 1.356, size = 1273, normalized size = 47.15 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/4*(log(4*(tan(1/2)^4 + 2*tan(1/2)^2 + 1)/(tan(1/2)^4*tan(x)^8 - 8*tan(1/2)^3*tan(x)^7 - 2*tan(1/2)^2*tan(x)^
8 - 2*tan(1/2)^4*tan(x)^4 - 8*tan(1/2)^3*tan(x)^5 + 16*tan(1/2)^2*tan(x)^6 + 8*tan(1/2)*tan(x)^7 + tan(x)^8 +
8*tan(1/2)^3*tan(x)^3 + 36*tan(1/2)^2*tan(x)^4 + 8*tan(1/2)*tan(x)^5 + tan(1/2)^4 + 8*tan(1/2)^3*tan(x) + 16*t
an(1/2)^2*tan(x)^2 - 8*tan(1/2)*tan(x)^3 - 2*tan(x)^4 - 2*tan(1/2)^2 - 8*tan(1/2)*tan(x) + 1))*tan(1/2)^2*tan(
x)^2 - 8*x*tan(1/2)^2*tan(x) - 8*x*tan(1/2)*tan(x)^2 - log(4*(tan(1/2)^4 + 2*tan(1/2)^2 + 1)/(tan(1/2)^4*tan(x
)^8 - 8*tan(1/2)^3*tan(x)^7 - 2*tan(1/2)^2*tan(x)^8 - 2*tan(1/2)^4*tan(x)^4 - 8*tan(1/2)^3*tan(x)^5 + 16*tan(1
/2)^2*tan(x)^6 + 8*tan(1/2)*tan(x)^7 + tan(x)^8 + 8*tan(1/2)^3*tan(x)^3 + 36*tan(1/2)^2*tan(x)^4 + 8*tan(1/2)*
tan(x)^5 + tan(1/2)^4 + 8*tan(1/2)^3*tan(x) + 16*tan(1/2)^2*tan(x)^2 - 8*tan(1/2)*tan(x)^3 - 2*tan(x)^4 - 2*ta
n(1/2)^2 - 8*tan(1/2)*tan(x) + 1))*tan(1/2)^2 - 4*log(4*(tan(1/2)^4 + 2*tan(1/2)^2 + 1)/(tan(1/2)^4*tan(x)^8 -
 8*tan(1/2)^3*tan(x)^7 - 2*tan(1/2)^2*tan(x)^8 - 2*tan(1/2)^4*tan(x)^4 - 8*tan(1/2)^3*tan(x)^5 + 16*tan(1/2)^2
*tan(x)^6 + 8*tan(1/2)*tan(x)^7 + tan(x)^8 + 8*tan(1/2)^3*tan(x)^3 + 36*tan(1/2)^2*tan(x)^4 + 8*tan(1/2)*tan(x
)^5 + tan(1/2)^4 + 8*tan(1/2)^3*tan(x) + 16*tan(1/2)^2*tan(x)^2 - 8*tan(1/2)*tan(x)^3 - 2*tan(x)^4 - 2*tan(1/2
)^2 - 8*tan(1/2)*tan(x) + 1))*tan(1/2)*tan(x) - 4*tan(1/2)^2*tan(x) - log(4*(tan(1/2)^4 + 2*tan(1/2)^2 + 1)/(t
an(1/2)^4*tan(x)^8 - 8*tan(1/2)^3*tan(x)^7 - 2*tan(1/2)^2*tan(x)^8 - 2*tan(1/2)^4*tan(x)^4 - 8*tan(1/2)^3*tan(
x)^5 + 16*tan(1/2)^2*tan(x)^6 + 8*tan(1/2)*tan(x)^7 + tan(x)^8 + 8*tan(1/2)^3*tan(x)^3 + 36*tan(1/2)^2*tan(x)^
4 + 8*tan(1/2)*tan(x)^5 + tan(1/2)^4 + 8*tan(1/2)^3*tan(x) + 16*tan(1/2)^2*tan(x)^2 - 8*tan(1/2)*tan(x)^3 - 2*
tan(x)^4 - 2*tan(1/2)^2 - 8*tan(1/2)*tan(x) + 1))*tan(x)^2 - 4*tan(1/2)*tan(x)^2 + 8*x*tan(1/2) + 8*x*tan(x) +
 log(4*(tan(1/2)^4 + 2*tan(1/2)^2 + 1)/(tan(1/2)^4*tan(x)^8 - 8*tan(1/2)^3*tan(x)^7 - 2*tan(1/2)^2*tan(x)^8 -
2*tan(1/2)^4*tan(x)^4 - 8*tan(1/2)^3*tan(x)^5 + 16*tan(1/2)^2*tan(x)^6 + 8*tan(1/2)*tan(x)^7 + tan(x)^8 + 8*ta
n(1/2)^3*tan(x)^3 + 36*tan(1/2)^2*tan(x)^4 + 8*tan(1/2)*tan(x)^5 + tan(1/2)^4 + 8*tan(1/2)^3*tan(x) + 16*tan(1
/2)^2*tan(x)^2 - 8*tan(1/2)*tan(x)^3 - 2*tan(x)^4 - 2*tan(1/2)^2 - 8*tan(1/2)*tan(x) + 1)) + 4*tan(1/2) + 4*ta
n(x))/(tan(1/2)^2*tan(x)^2 - tan(1/2)^2 - 4*tan(1/2)*tan(x) - tan(x)^2 + 1)